R. David Murray rdmur...@bitdance.com added the comment:
Committed to trunk in r80800.
However, when I ported it to py3k, it turns out the test fails there, but
passes if the original fix from this issue has been applied. More
investigation is needed, but clearly something changed in the
R. David Murray rdmur...@bitdance.com added the comment:
It turns out that email5 (py3k), because it is using unicode for the payload,
doesn't do the encoding to the output character set until later in the process.
Specifically, charset.body_encode no longer does the input-to-output charset
Shashwat Anand anand.shash...@gmail.com added the comment:
Adding unit-test for the patch
--
keywords: +patch
Added file: http://bugs.python.org/file17212/test_email.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7472
R. David Murray rdmur...@bitdance.com added the comment:
Comments on patch:
We prefer patches to be generated from the top level directory of the checkout,
so that it can be applied by doing 'patch -p0 xxx.patch' from the top level
directory without having to look in the patch file to see
Shashwat Anand anand.shash...@gmail.com added the comment:
I was getting a feel that the inner if-test is not being used in any case.
Submitting the patch which removes the inner if test and adding a unittest.
--
___
Python tracker
Changes by Shashwat Anand anand.shash...@gmail.com:
Added file: http://bugs.python.org/file17215/encoders.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7472
___
R. David Murray rdmur...@bitdance.com added the comment:
I've applied the fix to trunk in r79994, and py3k in r79996, but I'm leaving
this open because I still want a unit test for it.
--
keywords: +easy -patch
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
After tracing the code further I now understand what the original patch is
doing, and yes the spelling correction is the correct fix. (The issue is that
there are two different encodings involved: the input encoding in which the
body
Shashwat Anand anand.shash...@gmail.com added the comment:
I am submitting the patch as suggested by Yukihiro
--
keywords: +patch
nosy: +l0nwlf
Added file: http://bugs.python.org/file16789/encoders.diff
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
Well, as I said, I think it would be better to delete the conditional instead.
(That is, that fixing the typo is more likely to lead to a bug).
--
assignee: barry - r.david.murray
___
Python
Yukihiro Nakadaira yukihiro.nakada...@gmail.com added the comment:
In other words, I think the correct thing to do is to delete that if test.
I think so too.
Do you have a case where the code produces incorrect behavior that your patch
turns into correct behavior?
No, I don't. I just
R. David Murray rdmur...@bitdance.com added the comment:
Hmm. I suspect that that typo is fortunate rather than the source of a bug.
As far as I can see, if a message contains valid iso-2022 characters, it will
always encode to ASCII successfully and therefore be given a
Changes by R. David Murray rdmur...@bitdance.com:
--
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7472
___
New submission from Yukihiro Nakadaira yukihiro.nakada...@gmail.com:
email.encoders.encode_7or8bit(): typo iso-2202. iso-2022 is correct.
Index: Lib/email/encoders.py
===
--- Lib/email/encoders.py (revision 76749)
+++
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - barry
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7472
___
___
15 matches
Mail list logo