GeezerVison is showing github.com — Test Limited API in _testcapi module · Issue #95991 · python/cpython
Test Limited API in _testcapi module #95991
Description
The Limited API is currently tested in xxlimited module(s), which isn't a great location since the module serves as a “tutorial” example of how to make a module. There's no room for advanced stuff or edge cases.
Testing Limited API together with other C API is complicated, because:
- Limited API needs to be enabled per source file
- Some builds don't support Limited API, so Limited API tests must be skipped on those builds.
(Currently this is Py_TRACE_REFS, but that may change.)
Py_LIMITED_API must be defined before <Python.h> is included.
With #95505 (splitting _testcapi module into several source files), the first complication is solved. I'd like to add helpers for the others, to make testing Limited API easy.
Activity
added 2 commits that reference this issue
on Aug 15, 2022pythongh-95991: Add some infrastructure for testing Limited API in _t…
gh-95991: Add some infrastructure for testing Limited API in _testcapi (
encukou commented on Aug 17, 2022
Keeping this open until I get to the devguide update.
Metadata
Metadata
Development
No branches or pull requestsIssue actions