diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-03-17 02:43:05 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-03-17 02:43:05 (GMT) |
commit | 1b6c724df01614b446b748c505214afd658e75fe (patch) | |
tree | a39b0df210fb21cdaa02beb7bfd61b97373b056b /Lib/email | |
parent | 41914349adbee033ba48d6c52dc26a7d36cd78fa (diff) | |
download | cpython-1b6c724df01614b446b748c505214afd658e75fe.zip cpython-1b6c724df01614b446b748c505214afd658e75fe.tar.gz cpython-1b6c724df01614b446b748c505214afd658e75fe.tar.bz2 |
#11686: add missing entries to email __all__ lists.
Original patch by Steffen Daode Nurpmeso
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/__init__.py | 1 | ||||
-rw-r--r-- | Lib/email/feedparser.py | 2 | ||||
-rw-r--r-- | Lib/email/generator.py | 2 | ||||
-rw-r--r-- | Lib/email/parser.py | 2 | ||||
-rw-r--r-- | Lib/email/test/test_email.py | 13 |
5 files changed, 9 insertions, 11 deletions
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py index bd316fd..ff16f6a 100644 --- a/Lib/email/__init__.py +++ b/Lib/email/__init__.py @@ -11,6 +11,7 @@ __all__ = [ 'charset', 'encoders', 'errors', + 'feedparser', 'generator', 'header', 'iterators', diff --git a/Lib/email/feedparser.py b/Lib/email/feedparser.py index 60a8325..aa8a2ff 100644 --- a/Lib/email/feedparser.py +++ b/Lib/email/feedparser.py @@ -19,7 +19,7 @@ the current message. Defects are just instances that live on the message object's .defects attribute. """ -__all__ = ['FeedParser'] +__all__ = ['FeedParser', 'BytesFeedParser'] import re diff --git a/Lib/email/generator.py b/Lib/email/generator.py index 430ee73..04c0210 100644 --- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -4,7 +4,7 @@ """Classes to generate plain text from a message object tree.""" -__all__ = ['Generator', 'DecodedGenerator'] +__all__ = ['Generator', 'DecodedGenerator', 'BytesGenerator'] import re import sys diff --git a/Lib/email/parser.py b/Lib/email/parser.py index 6caaff5..1c931ea 100644 --- a/Lib/email/parser.py +++ b/Lib/email/parser.py @@ -4,7 +4,7 @@ """A parser of RFC 2822 and MIME email messages.""" -__all__ = ['Parser', 'HeaderParser'] +__all__ = ['Parser', 'HeaderParser', 'BytesParser'] import warnings from io import StringIO, TextIOWrapper diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 5655938..5db34dc 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -2518,14 +2518,11 @@ class TestMiscellaneous(TestEmailBase): def test__all__(self): module = __import__('email') - # Can't use sorted() here due to Python 2.3 compatibility - all = module.__all__[:] - all.sort() - self.assertEqual(all, [ - 'base64mime', 'charset', 'encoders', 'errors', 'generator', - 'header', 'iterators', 'message', 'message_from_binary_file', - 'message_from_bytes', 'message_from_file', - 'message_from_string', 'mime', 'parser', + self.assertEqual(sorted(module.__all__), [ + 'base64mime', 'charset', 'encoders', 'errors', 'feedparser', + 'generator', 'header', 'iterators', 'message', + 'message_from_binary_file', 'message_from_bytes', + 'message_from_file', 'message_from_string', 'mime', 'parser', 'quoprimime', 'utils', ]) |