-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
MAINT: add freethreading_compatible directive to cython build #26950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0858ae0
1ee327c
9d1d254
072bd3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,10 +34,6 @@ if [[ $FREE_THREADED_BUILD == "True" ]]; then | |
# with a released version of cython | ||
python -m pip uninstall -y cython | ||
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython | ||
# TODO: delete when importing numpy no longer enables the GIL | ||
# setting to zero ensures the GIL is disabled while running the | ||
# tests under free-threaded python | ||
export PYTHON_GIL=0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One problem here is that the f2py test still need it. So half-way along the tests suite we actually would re-enable this. So I think this should stay for now but change the comment to say that it is for f2py? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, good point, let me check if the gil is being re-enabled in the test process or just in a subprocess. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It looks like the f2py tests do import the test modules in-process, so you're right we still need to set the environment variables. I'll update the comments around those. If there was a way to enable and disable the GIL at runtime we could hack around this but there isn't an API for that yet (if ever). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added it back and also added an additional test to manually check that import numpy doesn't print the warning about the GIL being re-enabled. |
||
fi | ||
|
||
# Run full tests with -n=auto. This makes pytest-xdist distribute tests across | ||
|
Uh oh!
There was an error while loading. Please reload this page.