[Python-checkins] cpython (merge 3.2 -> default): Merge #11686: add missing entries to email __all__ lists.

r.david.murray python-checkins at python.org
Sat Mar 17 03:46:41 CET 2012


http://hg.python.org/cpython/rev/561fc3b4cc2a
changeset: 75770:561fc3b4cc2a
parent: 75767:63c46a8547fb
parent: 75769:63a6d35fcac8
user: R David Murray <rdmurray at bitdance.com>
date: Fri Mar 16 22:46:14 2012 -0400
summary:
 Merge #11686: add missing entries to email __all__ lists.
Original patch by Steffen Daode Nurpmeso
files:
 Lib/email/__init__.py | 1 +
 Lib/email/feedparser.py | 2 +-
 Lib/email/generator.py | 2 +-
 Lib/test/test_email/test_email.py | 13 +++++--------
 4 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py
--- a/Lib/email/__init__.py
+++ b/Lib/email/__init__.py
@@ -11,6 +11,7 @@
 'charset',
 'encoders',
 'errors',
+ 'feedparser',
 'generator',
 'header',
 'iterators',
diff --git a/Lib/email/feedparser.py b/Lib/email/feedparser.py
--- a/Lib/email/feedparser.py
+++ b/Lib/email/feedparser.py
@@ -19,7 +19,7 @@
 object's .defects attribute.
 """
 
-__all__ = ['FeedParser']
+__all__ = ['FeedParser', 'BytesFeedParser']
 
 import re
 
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
--- 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/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -2600,14 +2600,11 @@
 
 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',
 ])
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /