Commit 1b6c724d authored by R David Murray's avatar R David Murray

#11686: add missing entries to email __all__ lists.

Original patch by Steffen Daode Nurpmeso
parent 41914349
...@@ -11,6 +11,7 @@ __all__ = [ ...@@ -11,6 +11,7 @@ __all__ = [
'charset', 'charset',
'encoders', 'encoders',
'errors', 'errors',
'feedparser',
'generator', 'generator',
'header', 'header',
'iterators', 'iterators',
......
...@@ -19,7 +19,7 @@ the current message. Defects are just instances that live on the message ...@@ -19,7 +19,7 @@ the current message. Defects are just instances that live on the message
object's .defects attribute. object's .defects attribute.
""" """
__all__ = ['FeedParser'] __all__ = ['FeedParser', 'BytesFeedParser']
import re import re
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"""Classes to generate plain text from a message object tree.""" """Classes to generate plain text from a message object tree."""
__all__ = ['Generator', 'DecodedGenerator'] __all__ = ['Generator', 'DecodedGenerator', 'BytesGenerator']
import re import re
import sys import sys
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"""A parser of RFC 2822 and MIME email messages.""" """A parser of RFC 2822 and MIME email messages."""
__all__ = ['Parser', 'HeaderParser'] __all__ = ['Parser', 'HeaderParser', 'BytesParser']
import warnings import warnings
from io import StringIO, TextIOWrapper from io import StringIO, TextIOWrapper
......
...@@ -2518,14 +2518,11 @@ class TestMiscellaneous(TestEmailBase): ...@@ -2518,14 +2518,11 @@ class TestMiscellaneous(TestEmailBase):
def test__all__(self): def test__all__(self):
module = __import__('email') module = __import__('email')
# Can't use sorted() here due to Python 2.3 compatibility self.assertEqual(sorted(module.__all__), [
all = module.__all__[:] 'base64mime', 'charset', 'encoders', 'errors', 'feedparser',
all.sort() 'generator', 'header', 'iterators', 'message',
self.assertEqual(all, [ 'message_from_binary_file', 'message_from_bytes',
'base64mime', 'charset', 'encoders', 'errors', 'generator', 'message_from_file', 'message_from_string', 'mime', 'parser',
'header', 'iterators', 'message', 'message_from_binary_file',
'message_from_bytes', 'message_from_file',
'message_from_string', 'mime', 'parser',
'quoprimime', 'utils', 'quoprimime', 'utils',
]) ])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment