GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — bpo-43688: Support the limited C API in debug mode by vstinner · Pull Request #25131 · python/cpython Conversation
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to make Py_INCREF() opaque for Python 3.9 and older, but we cannot magically add _Py_IncRef() to old Python versions :-(
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc @encukou |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I merged the uncontroversial part in separated commits in https://bugs.python.org/issue43688 I rebased my PR on top on merged changes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hm, I found Py_LIMITED_API=0x03060000 in https://github.com/python/cpython/blob/master/PCbuild/xxlimited_35.vcxproj#L97.
I am not sure which one is right.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The module name says "35": Python 3.5. See the C file header:
/* This module is compiled using limited API from Python 3.5,
* making sure that it works as expected.
*
* See the xxlimited module for an extension module template.
*/
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Well, that's a good reason to put the define into the C file directly, rather than putting it in the recipe to build the file :-D
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The limited C API is now supported if Python is built in debug mode (if the Py_DEBUG macro is defined). In the limited C API, the Py_INCREF() and Py_DECREF() functions are now implemented as opaque function calls, rather than accessing directly the PyObject.ob_refcnt member, if Python is built in debug mode and the Py_LIMITED_API macro targets Python 3.10 or newer. It became possible to support the limited C API in debug mode because the PyObject structure is the same in release and debug mode since Python 3.8 (see bpo-36465). The limited C API is still not supported in the --with-trace-refs special build (Py_TRACE_REFS macro).
|
Windows x86: test_asyncio failed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I re-run the CI jobs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.