You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent behavior of email.header.decode_header #81320
It returns a list of (decoded_string, charset) pairs. However, decoded_string can be either a string or bytes.
I have no preference but it should really be of one type.
SilentGhost commented on Jun 3, 2019
SilentGhostmannequin
Mannequin
More actions
This seem like a duplicate of bpo-24797. I hope the answer given there applies.
Activity
louisabraham commentedon Jun 3, 2019
Hi,
(this is my first issue btw)
I think <https://docs.python.org/3/library/email.header.html#email.header.decode_header\> has a broken behavior.
It returns a list of
(decoded_string, charset)pairs. However,decoded_stringcan be either a string or bytes.I have no preference but it should really be of one type.
SilentGhost commentedon Jun 3, 2019
This seem like a duplicate of bpo-24797. I hope the answer given there applies.
louisabraham commentedon Jun 3, 2019
Indeed, this is exactly the same (I should have researched more, my bad).
The problem is that I'm using mailbox.Maildir which uses the Compat32 API.
Do you think I should create an issue for Maildir to support the new EmailMessage API?
SilentGhost commentedon Jun 3, 2019
There seems to be some work started in bpo-32975. Perhaps, you'd like to revive it or contribute otherwise?