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.

Author serhiy.storchaka
Recipients benjamin.peterson, serhiy.storchaka
Date 2017-09-08.06:12:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504851140.29.0.00676251458119.issue31393@psf.upfronthosting.co.za>
In-reply-to
Content
PyUnicode_READY() raises an exception when returns -1 (MemoryError or ValueError). Not all code that calls PyUnicode_READY() handles this property. The following PR fixes all uses of PyUnicode_READY().

* If PyUnicode_READY() returns -1 the caller should either fail immediately or clear the error.

* The raised exception shouldn't be replaced by PyErr_BadArgument().

* In MCACHE_CACHEABLE_NAME PyUnicode_READY() is replaced with PyUnicode_IS_READY(). This is just the check for fast path.
History
Date User Action Args
2017-09-08 06:12:20serhiy.storchakasetrecipients: + serhiy.storchaka, benjamin.peterson
2017-09-08 06:12:20serhiy.storchakasetmessageid: <1504851140.29.0.00676251458119.issue31393@psf.upfronthosting.co.za>
2017-09-08 06:12:20serhiy.storchakalinkissue31393 messages
2017-09-08 06:12:20serhiy.storchakacreate