summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2008-06-12 04:06:45 (GMT)
committerBarry Warsaw <barry@python.org>2008-06-12 04:06:45 (GMT)
commit820c1200597606f95bb996586be88a3283c6448c (patch)
tree1b914ab96ccc9cd81465a6c3e765c97f128fd464 /Lib/email
parent75f25f2c9a4646746efbc056b4d2a07b40f93964 (diff)
downloadcpython-820c1200597606f95bb996586be88a3283c6448c.zip
cpython-820c1200597606f95bb996586be88a3283c6448c.tar.gz
cpython-820c1200597606f95bb996586be88a3283c6448c.tar.bz2
Patch for issue 2848, mostly by Humberto Diogenes, with a couple of
small fixes by Barry. This removes mimetools from the stdlib.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/parser.py6
-rw-r--r--Lib/email/utils.py2
2 files changed, 2 insertions, 6 deletions
diff --git a/Lib/email/parser.py b/Lib/email/parser.py
index 439a4a0..06014e2 100644
--- a/Lib/email/parser.py
+++ b/Lib/email/parser.py
@@ -68,11 +68,7 @@ class Parser:
data = fp.read(8192)
if not data:
break
- # XXX When Guido fixes TextIOWrapper.read() to act just like
- # .readlines(), this...
- feedparser.feed(str(data))
- # ...gets reverted back to
- #feedparser.feed(data)
+ feedparser.feed(data)
return feedparser.close()
def parsestr(self, text, headersonly=False):
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index 8747110..0439aff 100644
--- a/Lib/email/utils.py
+++ b/Lib/email/utils.py
@@ -25,7 +25,6 @@ import time
import base64
import random
import socket
-import urllib
import warnings
from io import StringIO
@@ -235,6 +234,7 @@ def decode_params(params):
params is a sequence of 2-tuples containing (param name, string value).
"""
+ import urllib
# Copy params so we don't mess with the original
params = params[:]
new_params = []