Message250462
Ok, I fixed the bug in Python 2.7, 3.4, 3.5 and 3.6. (Python 2.7 was also impacted for custom *unicode* strings.)
Thanks for your bug report paul!
> ISTM this is a case where Python's core shouldn't be using assert. It's possible for userland code to trigger an assertion failure, which means it should be a regular if(..) raise.
Right, this check is implemented in PyUnicode_AsEncodedString(). Moreover, PyUnicode_AsEncodedString() calls directly the codec, it doesn't call the encode() method of the input string.
(Sorry, I wrote PyUnicode_AsEncodedObject() which has a different purpose.)
> @haypo, what do you mean by "fuzzing"?
This: https://en.wikipedia.org/wiki/Fuzz_testing |
|
Date |
User |
Action |
Args |
2015-09-11 10:45:32 | vstinner | set | recipients:
+ vstinner, python-dev, Rosuav, pkt |
2015-09-11 10:45:32 | vstinner | set | messageid: <1441968332.23.0.388393327585.issue24684@psf.upfronthosting.co.za> |
2015-09-11 10:45:32 | vstinner | link | issue24684 messages |
2015-09-11 10:45:31 | vstinner | create | |
|