New submission from Serhiy Storchaka: PyUnicode_CompareWithASCIIString() never set an exception in 3.2 and earlier versions. Since 3.3 it sets an exception and returns -1 if the first argument is not ready Unicode object, but this was not documented until issue28701. Due to undocumenting this behavior many (if not all) callers don't check whether it returned an error.
Proposed patch restores old behavior of PyUnicode_CompareWithASCIIString(). ---------- components: Interpreter Core, Unicode files: PyUnicode_CompareWithASCIIString-no-errors.patch keywords: patch messages: 281783 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Make PyUnicode_CompareWithASCIIString() never failing type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45655/PyUnicode_CompareWithASCIIString-no-errors.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28808> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com