Issue38643
Created on 2019-10-30 14:20 by ZackerySpytz, last changed 2020-03-12 08:18 by serhiy.storchaka. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 16996 | closed | ZackerySpytz, 2019-10-30 14:24 | |
| PR 18863 | merged | serhiy.storchaka, 2020-03-08 21:08 | |
| PR 18954 | merged | serhiy.storchaka, 2020-03-12 06:52 | |
| PR 18955 | merged | serhiy.storchaka, 2020-03-12 07:37 | |
| Messages (6) | |||
|---|---|---|---|
| msg355715 - (view) | Author: Zackery Spytz (ZackerySpytz) * | Date: 2019-10-30 14:20 | |
If a base other than 2, 8, or 16 is passed to PyNumber_ToBase(), an assertion failure will occur. An exception should be raised instead. This was mentioned in bpo-38249 (msg353039). |
|||
| msg363686 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2020-03-08 21:10 | |
Sorry Zackery, I did not know about this issue so I wrote different PR to fix this problem. And only after writing it I have found this issue. There are several differences between your PR and PR 18863. * SystemError is raised instead of ValueError because this is incorrect use of the C API. * The error message mentions also base 10. * The test is written mostly in Python. For these reasons I prefer my PR. Please let me know if you need a review for other PRs. |
|||
| msg363758 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2020-03-09 18:03 | |
New changeset e5ccc94bbb153431698b2391df625e8d47a93276 by Serhiy Storchaka in branch 'master': bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863) https://github.com/python/cpython/commit/e5ccc94bbb153431698b2391df625e8d47a93276 |
|||
| msg363994 - (view) | Author: Zackery Spytz (ZackerySpytz) * | Date: 2020-03-12 05:09 | |
Okay, Serhiy. I think your patch is a better choice. |
|||
| msg363999 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2020-03-12 07:31 | |
New changeset ab9c72912178cfdb4d0637be036d78913b769154 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18954) https://github.com/python/cpython/commit/ab9c72912178cfdb4d0637be036d78913b769154 |
|||
| msg364002 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2020-03-12 08:15 | |
New changeset 6f4e7fcfca6923d0422b20fc8702240bd4e56ebd by Serhiy Storchaka in branch '3.7': [3.7] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18955) https://github.com/python/cpython/commit/6f4e7fcfca6923d0422b20fc8702240bd4e56ebd |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-03-12 08:18:44 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2020-03-12 08:15:23 | serhiy.storchaka | set | messages: + msg364002 |
| 2020-03-12 07:37:08 | serhiy.storchaka | set | pull_requests: + pull_request18306 |
| 2020-03-12 07:31:15 | serhiy.storchaka | set | messages: + msg363999 |
| 2020-03-12 06:52:01 | serhiy.storchaka | set | pull_requests: + pull_request18305 |
| 2020-03-12 05:09:59 | ZackerySpytz | set | messages: + msg363994 |
| 2020-03-09 18:03:45 | serhiy.storchaka | set | messages: + msg363758 |
| 2020-03-08 21:10:58 | serhiy.storchaka | set | components: + C API, - Interpreter Core |
| 2020-03-08 21:10:44 | serhiy.storchaka | set | versions: - Python 2.7 |
| 2020-03-08 21:10:33 | serhiy.storchaka | set | messages: + msg363686 |
| 2020-03-08 21:08:28 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka pull_requests: + pull_request18220 |
| 2019-10-30 14:24:53 | ZackerySpytz | set | keywords:
+ patch stage: patch review pull_requests: + pull_request16523 |
| 2019-10-30 14:20:36 | ZackerySpytz | create | |