
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-02-08 19:39 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| pyarg_parse_error.patch | serhiy.storchaka,2016-02-08 19:39 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg259877 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-02-08 19:39 | |
For now programmical errors with the use of PyArg_ParseTuple() cause raising SystemError. But some programmical errors with the use of PyArg_ParseTupleAndKeywords() cause raising RuntimeError. I think that SystemError is the correct exception type.Proposed patch replaces RuntimeError with SystemError in PyArg_ParseTupleAndKeywords(). This change shouldn't break any code (except CPython tests for PyArg_ParseTupleAndKeywords()), because this exception never raised if PyArg_Parse*() functions are used correctly. | |||
| msg259916 -(view) | Author: Martin Panter (martin.panter)*![]() | Date: 2016-02-09 06:46 | |
Seems like a reasonable change and patch to me. | |||
| msg260049 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-02-10 22:29 | |
Yeah, I also expect SystemError from C functions (of the Python C API) badly used.RuntimeError is more used in programming bugs at Python level.pyarg_parse_error.patch LGTM. | |||
| msg260059 -(view) | Author: Jim Jewett (Jim.Jewett)*![]() | Date: 2016-02-10 23:30 | |
It feels a bit odd to say that I've performed a triage review given the three people already involved -- but I did, and I think it is ready to commit.I believe it is a bug fix, but too subtle a bug to justify backporting.The only question is whether there should be a "What's New?" entry for the change. | |||
| msg260064 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2016-02-11 01:18 | |
> The only question is whether there should be a "What's New?" entry for the change.I don't think so. It's low level and nobody should see this exception anyway :-) It's an obvious bug in a C extension. | |||
| msg260083 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-02-11 10:23 | |
SystemError is not new exception. It could be raised on other programming bugs. In any case I doesn't expect that anybody catches such exceptions. | |||
| msg260084 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-02-11 10:42 | |
New changesetc7eff18f3840 by Serhiy Storchaka in branch 'default':Issue#26312: SystemError is now raised in all programming bugs with usinghttps://hg.python.org/cpython/rev/c7eff18f3840 | |||
| msg260090 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-02-11 11:33 | |
Thanks for your review. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:27 | admin | set | github: 70500 |
| 2016-02-11 11:33:18 | serhiy.storchaka | set | status: open -> closed messages: +msg260090 assignee:serhiy.storchaka resolution: fixed stage: commit review -> resolved |
| 2016-02-11 10:42:20 | python-dev | set | nosy: +python-dev messages: +msg260084 |
| 2016-02-11 10:23:24 | serhiy.storchaka | set | messages: +msg260083 |
| 2016-02-11 01:18:44 | vstinner | set | messages: +msg260064 |
| 2016-02-10 23:30:29 | Jim.Jewett | set | nosy: +Jim.Jewett messages: +msg260059 stage: patch review -> commit review |
| 2016-02-10 22:29:47 | vstinner | set | nosy: +vstinner messages: +msg260049 |
| 2016-02-09 06:46:58 | martin.panter | set | nosy: +martin.panter messages: +msg259916 |
| 2016-02-08 19:39:33 | serhiy.storchaka | create | |