Commit 13a0007 (#108663, cc @vstinner) made all Python builds compatible with the Limited API, and removed the LIMITED_API_AVAILABLE flag. However, some tests are still checking for that flag, so they are now being incorrectly skipped.
| #ifndefLIMITED_API_AVAILABLE |
| PyModule_AddObjectRef(m, "LIMITED_API_AVAILABLE", Py_False); |
| #else |
| PyModule_AddObjectRef(m, "LIMITED_API_AVAILABLE", Py_True); |
| if (_PyTestCapi_Init_VectorcallLimited(m) <0) { |
| returnNULL; |
| } |
| if (_PyTestCapi_Init_HeaptypeRelative(m) <0) { |
| returnNULL; |
| } |
| #endif |
| defrequires_limited_api(test): |
| try: |
| import_testcapi |
| exceptImportError: |
| returnunittest.skip('needs _testcapi module')(test) |
| returnunittest.skipUnless( |
| _testcapi.LIMITED_API_AVAILABLE, 'needs Limited API support')(test) |
Linked PRs
Commit 13a0007 (#108663, cc @vstinner) made all Python builds compatible with the Limited API, and removed the
LIMITED_API_AVAILABLEflag. However, some tests are still checking for that flag, so they are now being incorrectly skipped.cpython/Modules/_testcapimodule.c
Lines 4000 to 4010 in 3bfa24e
cpython/Lib/test/support/__init__.py
Lines 1088 to 1094 in 3bfa24e
Linked PRs