cpython: 5a0478bd5f11 (original) (raw)

Mercurial > cpython

changeset 82099:5a0478bd5f11

Merge: #16564: Fix regression in use of encoders.encode_noop with binary data. [#16564]

R David Murray rdmurray@bitdance.com
date Sat, 09 Feb 2013 13:13:14 -0500
parents 80320773d755(current diff)2b1edefc1e99(diff)
children c4512797b879
files Misc/NEWS
diffstat 4 files changed, 28 insertions(+), 0 deletions(-)[+] [-] Lib/email/encoders.py 6 Lib/email/generator.py 3 Lib/test/test_email/test_email.py 16 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/email/encoders.py +++ b/Lib/email/encoders.py @@ -76,3 +76,9 @@ def encode_7or8bit(msg): def encode_noop(msg): """Do nothing."""

--- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -406,6 +406,9 @@ class BytesGenerator(Generator): else: super(BytesGenerator,self)._handle_text(msg)

+ @classmethod def _compile_re(cls, s, flags): return re.compile(s.encode('ascii'), flags)

--- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -1440,6 +1440,22 @@ class TestMIMEApplication(unittest.TestC eq(msg.get_payload().strip(), '+vv8/f7/') eq(msg.get_payload(decode=True), bytesdata)

Test the basic MIMEText class

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -241,6 +241,9 @@ Core and Builtins Library ------- +- Issue #16564: Fixed regression relative to Python2 in the operation of