
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2016-11-26 15:48 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| PyUnicode_CompareWithASCIIString-no-errors.patch | serhiy.storchaka,2016-11-26 16:06 | review | ||
| PyUnicode_CompareWithASCIIString-no-errors-2.patch | serhiy.storchaka,2016-12-02 23:40 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft,2017-03-31 16:36 | |
| Messages (12) | |||
|---|---|---|---|
| msg281783 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-11-26 15:48 | |
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 untilissue28701. 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(). | |||
| msg281842 -(view) | Author: Xiang Zhang (xiang.zhang)*![]() | Date: 2016-11-28 04:51 | |
LGTM.Although at first I am not in favour of this change but searching Github it seems all usages of this API doesn't check the possible error. | |||
| msg281844 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-11-28 07:14 | |
Thanks Xiang.Ned, I ask your permission for committing this patch in 3.6. This is not critical neither new bug, it was introduced in 3.3 and is rarely reproducible. But 3.6b4 is the first version in which the changed behavior was documented, and this patch reverts the documentation change together with fixing the behavior. If release 3.6.0 without this patch, this will encourage users to change their code for handling possible error in PyUnicode_CompareWithASCIIString(), but these changes will be not needed when commit the patch. | |||
| msg281934 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2016-11-29 02:42 | |
I'd like @haypo to review and approve this change as well since he was involved in the predecessor (Issue28701). Victor? | |||
| msg281958 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-11-29 07:46 | |
I reviewed PyUnicode_CompareWithASCIIString-no-errors.patch. | |||
| msg281966 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-11-29 08:17 | |
>> The function was already documented in Python 3.5, so please add a "..>> versionchanged:: 3.6" to document the API chnange.> No, this behavior is not documented in any released Python version. The note about the failure was added inissue28701.Ah wait, you want to push this change into Python 3.5? I would prefer to leave Python 3.5 unchanged.Even if you modify Python 3.5, you still have to mention the "versionchanged", since it's a behaviour change. | |||
| msg281968 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-11-29 08:21 | |
Usually we don't add "versionchanged" for every fixed bug. | |||
| msg282259 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-12-02 23:40 | |
Updated patch addresses some Victor's comments. But I disagree that this bugfix needs a versionchanged directive. | |||
| msg282457 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2016-12-05 20:07 | |
This is currently blocking 360rc1. Victor, Serhiy, we either need to get this in now or wait until 3.6.1. I am leaning towards pushing the latest patch for 3.6 without having a decision about 3.5 yet. | |||
| msg282467 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-12-05 21:58 | |
PyUnicode_CompareWithASCIIString-no-errors-2.patch LGTM. Go ahead Serhiy. | |||
| msg282473 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-12-05 22:20 | |
New changesetb431d39da67f by Serhiy Storchaka in branch '3.5':Issue#28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.https://hg.python.org/cpython/rev/b431d39da67fNew changeset5bdc8e1a50c8 by Serhiy Storchaka in branch '3.6':Issue#28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.https://hg.python.org/cpython/rev/5bdc8e1a50c8New changesetdb56e39ea067 by Serhiy Storchaka in branch 'default':Issue#28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.https://hg.python.org/cpython/rev/db56e39ea067 | |||
| msg282475 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-12-05 22:25 | |
Thanks Ned and Victor. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:40 | admin | set | github: 72994 |
| 2017-03-31 16:36:19 | dstufft | set | pull_requests: +pull_request935 |
| 2016-12-05 22:25:35 | serhiy.storchaka | set | status: open -> closed priority: release blocker -> normal messages: +msg282475 resolution: fixed stage: patch review -> resolved |
| 2016-12-05 22:20:52 | python-dev | set | nosy: +python-dev messages: +msg282473 |
| 2016-12-05 22:02:54 | serhiy.storchaka | set | assignee:serhiy.storchaka |
| 2016-12-05 21:58:05 | vstinner | set | messages: +msg282467 |
| 2016-12-05 20:07:09 | ned.deily | set | messages: +msg282457 |
| 2016-12-02 23:40:09 | serhiy.storchaka | set | files: +PyUnicode_CompareWithASCIIString-no-errors-2.patch messages: +msg282259 |
| 2016-11-29 08:21:58 | serhiy.storchaka | set | messages: +msg281968 |
| 2016-11-29 08:17:59 | vstinner | set | messages: +msg281966 |
| 2016-11-29 07:46:19 | vstinner | set | messages: +msg281958 |
| 2016-11-29 02:42:30 | ned.deily | set | priority: normal -> release blocker nosy: +larry |
| 2016-11-29 02:42:04 | ned.deily | set | messages: +msg281934 |
| 2016-11-28 07:14:00 | serhiy.storchaka | set | nosy: +ned.deily messages: +msg281844 |
| 2016-11-28 04:51:35 | xiang.zhang | set | nosy: +xiang.zhang messages: +msg281842 |
| 2016-11-26 16:06:06 | serhiy.storchaka | set | files: +PyUnicode_CompareWithASCIIString-no-errors.patch |
| 2016-11-26 16:05:20 | serhiy.storchaka | set | files: -PyUnicode_CompareWithASCIIString-no-errors.patch |
| 2016-11-26 15:48:34 | serhiy.storchaka | create | |