summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-03-16 00:38:15 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-03-16 00:38:15 (GMT)
commit612528d95db89c9e728db979c65ed7d774291ba1 (patch)
tree17410ea2a9f6bcbf126a7f8b3e18624238cd27ff
parentf3f06817946d149fb401c09fa48a08a2f1fd5a3f (diff)
downloadcpython-612528d95db89c9e728db979c65ed7d774291ba1.zip
cpython-612528d95db89c9e728db979c65ed7d774291ba1.tar.gz
cpython-612528d95db89c9e728db979c65ed7d774291ba1.tar.bz2
#17431: Fix missing import of BytesFeedParser in email.parser.
Initial patch contributed by Edmond Burnett.
-rw-r--r--Lib/email/parser.py2
-rw-r--r--Lib/email/test/test_email.py4
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS2
4 files changed, 8 insertions, 1 deletions
diff --git a/Lib/email/parser.py b/Lib/email/parser.py
index 1c931ea..4e96732 100644
--- a/Lib/email/parser.py
+++ b/Lib/email/parser.py
@@ -9,7 +9,7 @@ __all__ = ['Parser', 'HeaderParser', 'BytesParser']
import warnings
from io import StringIO, TextIOWrapper
-from email.feedparser import FeedParser
+from email.feedparser import FeedParser, BytesFeedParser
from email.message import Message
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index a1ceb7f..6fddd2b 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -38,6 +38,10 @@ from email import quoprimime
from test.support import findfile, run_unittest, unlink
from email.test import __file__ as landmark
+# These imports are documented to work, but we are testing them using a
+# different path, so we import them here just to make sure they are importable.
+from email.parser import FeedParser, BytesFeedParser
+
NL = '\n'
EMPTYSTRING = ''
diff --git a/Misc/ACKS b/Misc/ACKS
index f02ef23..d8533c4 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -156,6 +156,7 @@ Erik de Bueger
Dick Bulterman
Bill Bumgarner
Jimmy Burgett
+Edmond Burnett
Tommy Burnette
Roger Burnham
Alastair Burt
diff --git a/Misc/NEWS b/Misc/NEWS
index fa2f142..cac3957 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -233,6 +233,8 @@ Core and Builtins
Library
-------
+- Issue #17431: Fix missing import of BytesFeedParser in email.parser.
+
- Issue #1285086: Get rid of the refcounting hack and speed up
urllib.parse.unquote() and urllib.parse.unquote_to_bytes().