Message117906
| Author |
r.david.murray |
| Recipients |
BreamoreBoy, pitrou, r.david.murray |
| Date |
2010年10月03日.04:18:09 |
| SpamBayes Score |
1.4344081e-13 |
| Marked as misclassified |
No |
| Message-id |
<1286079493.41.0.00710763891787.issue6302@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here is a patch that makes the output consistently (bytes, string) pairs. This is definitely a potential backward compatibility issue, but in general code which compensates for the old behavior should work fine with the new behavior, since it was always possible to get a (bytes, None) tuple back as a result, so most code should be handling that case correctly already.
IMO this change is nevertheless worthwhile; especially since if the patch in issue 4661 is accepted decode_header can be enhanced so that it will provide a way to obtain the bytes version of a header containing (RFC invalid) non-ASCII bytes.
Note that this breaks one of the tests in nttplib, so backward compatibility really is an issue, unfortunately. I think nttplib's use case can be satisfied via the issue 4661 patch coupled with the decode_header bytes-recovery enhancement. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年10月03日 04:18:13 | r.david.murray | set | recipients:
+ r.david.murray, pitrou, BreamoreBoy |
| 2010年10月03日 04:18:13 | r.david.murray | set | messageid: <1286079493.41.0.00710763891787.issue6302@psf.upfronthosting.co.za> |
| 2010年10月03日 04:18:11 | r.david.murray | link | issue6302 messages |
| 2010年10月03日 04:18:10 | r.david.murray | create |
|