Skip to content

Commit bf08131

Browse files
authored
gh-108494: Don't build _testclinic_limited with TraceRefs (#108608)
If Python is built with ./configure --with-trace-refs, don't build the _testclinic_limited extension. The limited C API (Py_LIMITED_API) is not compatible with Py_TRACE_REFS.
1 parent e675e51 commit bf08131

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

Modules/Setup.stdlib.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
162162
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c _testcapi/vectorcall.c _testcapi/vectorcall_limited.c _testcapi/heaptype.c _testcapi/abstract.c _testcapi/unicode.c _testcapi/dict.c _testcapi/getargs.c _testcapi/datetime.c _testcapi/docstring.c _testcapi/mem.c _testcapi/watchers.c _testcapi/long.c _testcapi/float.c _testcapi/structmember.c _testcapi/exceptions.c _testcapi/code.c _testcapi/buffer.c _testcapi/pyos.c _testcapi/immortal.c _testcapi/heaptype_relative.c _testcapi/gc.c
163163
@MODULE__TESTCLINIC_TRUE@_testclinic _testclinic.c
164-
@MODULE__TESTCLINIC_TRUE@_testclinic_limited _testclinic_limited.c
164+
@MODULE__TESTCLINIC_LIMITED_TRUE@_testclinic_limited _testclinic_limited.c
165165

166166
# Some testing modules MUST be built as shared libraries.
167167
*shared*

configure

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7229,6 +7229,7 @@ PY_STDLIB_MOD([_hashlib], [], [test "$ac_cv_working_openssl_hashlib" = yes],
72297229
dnl test modules
72307230
PY_STDLIB_MOD([_testcapi], [test "$TEST_MODULES" = yes])
72317231
PY_STDLIB_MOD([_testclinic], [test "$TEST_MODULES" = yes])
7232+
PY_STDLIB_MOD([_testclinic_limited], [test "$TEST_MODULES" = yes -a "$with_trace_refs" = "no"])
72327233
PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes])
72337234
PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes])
72347235
PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])

0 commit comments

Comments
 (0)