FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-109045: Remove remaining LIMITED_API_AVAILABLE checks in tests by andersk · Pull Request #109046 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (3) .py  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 1 addition & 2 deletions Lib/test/support/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,7 @@ def requires_limited_api(test):
import _testcapi
except ImportError:
return unittest.skip('needs _testcapi module')(test)
return unittest.skipUnless(
_testcapi.LIMITED_API_AVAILABLE, 'needs Limited API support')(test)
return test

def requires_specialization(test):
return unittest.skipUnless(
Expand Down
4 changes: 0 additions & 4 deletions Modules/_testcapi/heaptype_relative.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include <stddef.h> // max_align_t
#include <string.h> // memset

#ifdef LIMITED_API_AVAILABLE

static PyType_Slot empty_slots[] = {
{0, NULL},
};
Expand Down Expand Up @@ -339,5 +337,3 @@ _PyTestCapi_Init_HeaptypeRelative(PyObject *m) {

return 0;
}

#endif // LIMITED_API_AVAILABLE
6 changes: 0 additions & 6 deletions Modules/_testcapi/vectorcall_limited.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#define Py_LIMITED_API 0x030c0000 // 3.12
#include "parts.h"

#ifdef LIMITED_API_AVAILABLE



/* Test Vectorcall in the limited API */

static PyObject *
Expand Down Expand Up @@ -175,5 +171,3 @@ _PyTestCapi_Init_VectorcallLimited(PyObject *m) {

return 0;
}

#endif // LIMITED_API_AVAILABLE
6 changes: 0 additions & 6 deletions Modules/_testcapimodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3996,18 +3996,12 @@ PyInit__testcapi(void)
if (_PyTestCapi_Init_PyAtomic(m) < 0) {
return NULL;
}

#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

PyState_AddModule(m, &_testcapimodule);
return m;
Expand Down

Back | FazBrowse Home | New Git URL