Closed
Labels
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 isPy_TRACE_REFS, but that may change.) Py_LIMITED_APImust 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
pythongh-95991: Add some infrastructure for testing Limited API in _t…
gh-95991: Add some infrastructure for testing Limited API in _testcapi (
encukou commentedon Aug 17, 2022
Keeping this open until I get to the devguide update.