diff --git a/Lib/email/parser.py b/Lib/email/parser.py index 1aab0121153..752bf35a6e1 100644 --- a/Lib/email/parser.py +++ b/Lib/email/parser.py @@ -9,7 +9,7 @@ import warnings from io import StringIO, TextIOWrapper -from email.feedparser import FeedParser +from email.feedparser import FeedParser, BytesFeedParser from email.message import Message from email._policybase import compat32 diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index 23f062fd80d..eaed26f844f 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -36,6 +36,10 @@ from test.support import unlink from test.test_email import openfile, TestEmailBase +# 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 = '' SPACE = ' ' diff --git a/Misc/ACKS b/Misc/ACKS index 7b5c1064657..537c0973f63 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -172,6 +172,7 @@ Jan-Hein Bührman Dick Bulterman Bill Bumgarner Jimmy Burgett +Edmond Burnett Tommy Burnette Roger Burnham Alastair Burt diff --git a/Misc/NEWS b/Misc/NEWS index 56141064eb5..21d1bc30271 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -193,6 +193,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().