-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Description
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.
cpython/Modules/_testcapimodule.c
Lines 4000 to 4010 in 3bfa24e
| #ifndef LIMITED_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) { | |
| return NULL; | |
| } | |
| if (_PyTestCapi_Init_HeaptypeRelative(m) < 0) { | |
| return NULL; | |
| } | |
| #endif |
cpython/Lib/test/support/__init__.py
Lines 1088 to 1094 in 3bfa24e
| def requires_limited_api(test): | |
| try: | |
| import _testcapi | |
| except ImportError: | |
| return unittest.skip('needs _testcapi module')(test) | |
| return unittest.skipUnless( | |
| _testcapi.LIMITED_API_AVAILABLE, 'needs Limited API support')(test) |
Linked PRs
Metadata
Metadata
Assignees
Labels
No labels