R. David Murray added the comment:
Good point, thanks for the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
___
___
Serhiy Storchaka added the comment:
Then special case for iso-2022-* is not needed too.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
___
R. David Murray added the comment:
Yes, in theory that should be true at this point.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
___
Vajrasky Kok added the comment:
Okay, here is the patch on which we removed checking of special case for
iso-2022-*.
--
Added file:
http://bugs.python.org/file33109/minor_refactor_encoders_in_email_lib_v2.patch
___
Python tracker
Roundup Robot added the comment:
New changeset 29e5dd1f608a by R David Murray in branch 'default':
#19957: Simplify encode_7or8bit now that _payload is always str.
http://hg.python.org/cpython/rev/29e5dd1f608a
--
nosy: +python-dev
___
Python tracker
R. David Murray added the comment:
Thanks, Vajrasky and Serhiy.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
New submission from Vajrasky Kok:
In Lib/email/encoders.py:
def encode_7or8bit(msg):
Set the Content-Transfer-Encoding header to 7bit or 8bit.
orig = msg.get_payload(decode=True)
if orig is None:
# There's no payload. For backwards compatibility we use 7bit