Brad Bishop | 568ded9 | 2015-11-13 09:03:26 -0500 | [diff] [blame^] | 1 | Index: email-4.0.2/email/__init__.py |
| 2 | =================================================================== |
| 3 | --- email-4.0.2.orig/email/__init__.py |
| 4 | +++ email-4.0.2/email/__init__.py |
| 5 | @@ -8,7 +8,6 @@ __version__ = '4.0.2' |
| 6 | |
| 7 | __all__ = [ |
| 8 | # Old names |
| 9 | - 'base64MIME', |
| 10 | 'Charset', |
| 11 | 'Encoders', |
| 12 | 'Errors', |
| 13 | @@ -16,20 +15,11 @@ __all__ = [ |
| 14 | 'Header', |
| 15 | 'Iterators', |
| 16 | 'Message', |
| 17 | - 'MIMEAudio', |
| 18 | - 'MIMEBase', |
| 19 | - 'MIMEImage', |
| 20 | - 'MIMEMessage', |
| 21 | - 'MIMEMultipart', |
| 22 | - 'MIMENonMultipart', |
| 23 | - 'MIMEText', |
| 24 | 'Parser', |
| 25 | - 'quopriMIME', |
| 26 | 'Utils', |
| 27 | 'message_from_string', |
| 28 | 'message_from_file', |
| 29 | # new names |
| 30 | - 'base64mime', |
| 31 | 'charset', |
| 32 | 'encoders', |
| 33 | 'errors', |
| 34 | @@ -37,9 +27,7 @@ __all__ = [ |
| 35 | 'header', |
| 36 | 'iterators', |
| 37 | 'message', |
| 38 | - 'mime', |
| 39 | 'parser', |
| 40 | - 'quoprimime', |
| 41 | 'utils', |
| 42 | ] |
| 43 | |
| 44 | @@ -94,30 +82,9 @@ _LOWERNAMES = [ |
| 45 | 'Message', |
| 46 | 'Parser', |
| 47 | 'Utils', |
| 48 | - 'base64MIME', |
| 49 | - 'quopriMIME', |
| 50 | - ] |
| 51 | - |
| 52 | -_MIMENAMES = [ |
| 53 | - # email.MIME<old name> -> email.mime.<new name is lowercased old name> |
| 54 | - 'Audio', |
| 55 | - 'Base', |
| 56 | - 'Image', |
| 57 | - 'Message', |
| 58 | - 'Multipart', |
| 59 | - 'NonMultipart', |
| 60 | - 'Text', |
| 61 | ] |
| 62 | |
| 63 | for _name in _LOWERNAMES: |
| 64 | importer = LazyImporter(_name.lower()) |
| 65 | sys.modules['email.' + _name] = importer |
| 66 | setattr(sys.modules['email'], _name, importer) |
| 67 | - |
| 68 | - |
| 69 | -import email.mime |
| 70 | -for _name in _MIMENAMES: |
| 71 | - importer = LazyImporter('mime.' + _name.lower()) |
| 72 | - sys.modules['email.MIME' + _name] = importer |
| 73 | - setattr(sys.modules['email'], 'MIME' + _name, importer) |
| 74 | - setattr(sys.modules['email.mime'], _name, importer) |