[New-bugs-announce] [issue28808] Make PyUnicode_CompareWithASCIIString() never failing

Serhiy Storchaka report at bugs.python.org
Sat Nov 26 10:48:34 EST 2016


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 <report at bugs.python.org>
<http://bugs.python.org/issue28808>
_______________________________________


More information about the New-bugs-announce mailing list