homepage

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.

classification
Title: email.header.decode_header parses differently
Type: behavior Stage: resolved
Components: email Versions: Python 3.3
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, ddvoinikov, r.david.murray
Priority: normal Keywords:

Created on 2012年08月07日 05:19 by ddvoinikov, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (3)
msg167602 - (view) Author: Dmitry Dvoinikov (ddvoinikov) Date: 2012年08月07日 05:19
The following script
---
import email.header
print(email.header.decode_header("foo =?windows-1251?Q?bar?="))
---
produces
[(b'foo', None), (b'bar', 'windows-1251')]
in Python 3.2 but
[(b'foo ', None), (b'bar', 'windows-1251')]
in Python 3.3.0b1
msg167619 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012年08月07日 12:36
This is an intentional change (see issue 1079). It is entirely possible that this bug fix should be reverted, however, because of backward compatibility concerns. I'm open to that argument, but I'd prefer to keep the fixed behavior, since the unfixed behavior causes us to violate the RFCs in several cases, as you can see from that and the related issues.
Note also the availability in 3.3 of the provisional email policies that will do an automatic full decode-to-unicode of such headers.
msg168921 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012年08月23日 02:12
Absent an argument in favor of reversion, I'm closing this.
History
Date User Action Args
2022年04月11日 14:57:33adminsetgithub: 59775
2012年08月23日 02:12:17r.david.murraysetstatus: open -> closed

messages: + msg168921
stage: resolved
2012年08月07日 12:36:09r.david.murraysetnosy: + barry, r.david.murray
messages: + msg167619
components: + email, - Library (Lib)
2012年08月07日 05:19:23ddvoinikovcreate

AltStyle によって変換されたページ (->オリジナル) /