This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author py.user
Recipients barry, py.user, r.david.murray
Date 2014-11-10.02:42:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It depends on encoded part in the header, what email.header.decode_header() returns.
If the header has both raw part and encoded part, the function returns (bytes, None) for the raw part. But if the header has only raw part, the function returns (str, None) for it.

>>> import email.header
>>> s = 'abc=?koi8-r?q?\xc1\xc2\xd7?='
>>> email.header.decode_header(s)
[(b'abc', None), (b'\xc1\xc2\xd7', 'koi8-r')]
>>> s = 'abc'
>>> email.header.decode_header(s)
[('abc', None)]

There should be (bytes, None) for both cases.
Date User Action Args
2014-11-10 02:42:41py.usersetrecipients: + py.user, barry, r.david.murray
2014-11-10 02:42:40py.usersetmessageid: <>
2014-11-10 02:42:40py.userlinkissue22833 messages
2014-11-10 02:42:40py.usercreate