]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#11686: add missing entries to email __all__ lists.
authorR David Murray <rdmurray@bitdance.com>
Sat, 17 Mar 2012 02:43:05 +0000 (22:43 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 17 Mar 2012 02:43:05 +0000 (22:43 -0400)
Original patch by Steffen Daode Nurpmeso

Lib/email/__init__.py
Lib/email/feedparser.py
Lib/email/generator.py
Lib/email/parser.py
Lib/email/test/test_email.py

index bd316fdaf3826b92f142f9df2ee77c4c3e3ab2b4..ff16f6af3f3574c7a87a0742e614227b633e0b96 100644 (file)
@@ -11,6 +11,7 @@ __all__ = [
     'charset',
     'encoders',
     'errors',
+    'feedparser',
     'generator',
     'header',
     'iterators',
index 60a83255c0d30820e26f0dd08dd7585eff20bf04..aa8a2ffa644d528a5d179cdd9dc9330861c4c314 100644 (file)
@@ -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
 
index 430ee73ea10c9168a6ce57cec111e2227b21e6ec..04c021018308d4f8ef4172b9abb083a36a3bff77 100644 (file)
@@ -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
index 6caaff53ad40897b6fbc3c024e8365679dfc7fea..1c931ea9dea95d941ba7309a6bb8af122678243b 100644 (file)
@@ -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
index 5655938021c6e0b7b7574323f3fceab8aa1342c3..5db34dc9d77bdaf72248c9e63d4bb19c0469af21 100644 (file)
@@ -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',
             ])