Commit b35e8344 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Tatuya Kamada

fixup! speed up email parsing is included in python 2.7.9.

parent d8509852
......@@ -41,7 +41,7 @@ if sys.version_info < (2, 7):
if sys.version_info[:3] < (2, 7, 9):
# Speed up email parsing (see also http://bugs.python.org/issue1243730)
from email import parser, feedparser
from email import feedparser
NLCRE_crack_split = feedparser.NLCRE_crack.split
def push(self, data):
......@@ -72,7 +72,9 @@ if sys.version_info[:3] < (2, 7, 9):
self.pushlines(lines)
feedparser.BufferedSubFile.push = push
FeedParser = feedparser.FeedParser
if 1:
from email import parser
from email.feedparser import FeedParser
def parse(self, fp, headersonly=False):
"""Create a message structure from the data in a file.
......
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