This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2018年11月10日 01:37 by vstinner, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 10443 | closed | vstinner, 2018年11月10日 01:39 | |
| Messages (3) | |||
|---|---|---|---|
| msg329583 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年11月10日 01:37 | |
Add a new experimental "_Py_CAPI2" API: opt-in which doesn't leak implementation details and replace macros with function calls. Attached PR modified PyTuple_GET_ITEM() if _Py_CAPI2 is defined. With this API, PyTuple_GET_ITEM() macro becomes a function call and the implementation uses assertions to check if the first argument is a tuple and that the index is valid. It should help to investigate bugs when Python is compiled in debug mode. This issue implements the idea that I proposed on python-dev: https://mail.python.org/pipermail/python-dev/2018-November/155702.html |
|||
| msg329584 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年11月10日 01:42 | |
I previously tried a very similar patch but reusing Py_DEBUG define, rather than adding a new _Py_CAPI2 define: bpo-35199. I abandonned it because it was backward incompatible. This change is backward compatible: the new API is not compatible with the current API, but the change doesn't impact the default API which remains unchanged. |
|||
| msg330268 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2018年11月22日 16:27 | |
According to discussions on python-dev, a PEP will be needed first. Moreover, I prefer to make some progress on https://bugs.python.org/issue35134 before. I close the issue. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:08 | admin | set | github: 79387 |
| 2018年11月22日 16:27:53 | vstinner | set | status: open -> closed resolution: rejected messages: + msg330268 stage: patch review -> resolved |
| 2018年11月10日 02:17:21 | vstinner | set | title: Add a new experimental _Py_CAPI2 API -> [WIP] Add a new experimental _Py_CAPI2 API |
| 2018年11月10日 01:43:03 | vstinner | set | title: Add new experimental _Py_CAPI2 API -> Add a new experimental _Py_CAPI2 API |
| 2018年11月10日 01:42:29 | vstinner | set | messages: + msg329584 |
| 2018年11月10日 01:39:32 | vstinner | set | keywords:
+ patch stage: patch review pull_requests: + pull_request9717 |
| 2018年11月10日 01:37:33 | vstinner | create | |