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

gh-108494: Don't build _testclinic_limited with TraceRefs by vstinner · Pull Request #108608 · python/cpython · GitHub

Repository navigation

gh-108494: Don't build _testclinic_limited with TraceRefs - #108608

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:testclinic_limited_tracerefs
Aug 29, 2023
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:testclinic_limited_tracerefs

Conversation

vstinner commented Aug 29, 2023 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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.

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.

Copy link
Copy Markdown
Member Author

Currently, building Python on the TraceRefs buildbot fails with:

gcc  -fno-strict-overflow -Wsign-compare -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Og -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal  -I. -I./Include    -fPIC -c ./Modules/_testclinic_limited.c -o Modules/_testclinic_limited.o
In file included from ./Include/Python.h:44,
                 from ./Modules/_testclinic_limited.c:7:
./Include/object.h:62:4: error: #error Py_LIMITED_API is incompatible with Py_TRACE_REFS
   62 | #  error Py_LIMITED_API is incompatible with Py_TRACE_REFS
      |    ^~~~~
make: *** [Makefile:3139: Modules/_testclinic_limited.o] Error 1

link: https://buildbot.python.org/all/#/builders/484/builds/3914

You can reproduce with:

make distclean
./configure --with-pydebug --with-trace-refs && make

With this change, the build completes as expected and test_clinic pass:

$ make && ./python -m test -v test_clinic 

The following modules are *disabled* in configure script:
_testclinic_limited   xxlimited             xxlimited_35       

(...)
test_my_int_func (test.test_clinic.LimitedCAPIFunctionalTest.test_my_int_func) ... skipped '_testclinic_limited is missing'
test_my_int_sum (test.test_clinic.LimitedCAPIFunctionalTest.test_my_int_sum) ... skipped '_testclinic_limited is missing'
(...)

Copy link
Copy Markdown
Member Author

cc @erlend-aasland

vstinner merged commit bf08131 into python:main Aug 29, 2023
vstinner deleted the testclinic_limited_tracerefs branch August 29, 2023 11:39

Copy link
Copy Markdown
Member Author

Merged, thanks for the review.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL