-
Notifications
You must be signed in to change notification settings - Fork 110
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
TST: enable CPython free-threading support #468
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @andfoy. Mostly looks good, a few comments.
.github/workflows/ci.yml
Outdated
- name: Install | ||
run: | | ||
pip install . | ||
|
||
- name: Test with pytest | ||
run: | | ||
pip install pytest | ||
pytest --pyargs bottleneck | ||
pytest --parallel-threads=$PARALLEL_THREADS --pyargs bottleneck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look correct, since pytest-run-parallel
is only installed for cp313t. On other Python versions, this should result in:
pytest: error: unrecognized arguments: --parallel-threads=
It's annoying that CI doesn't run on this PR, but can you try running the CI job on your own fork to make sure it passes? (same for wheel builds)
I have approved the workflows, so now the CI will run here! |
This PR enables free-threading builds of bottleneck, available from Python 3.13 onwards, this new distribution allows Python packages to leverage true parallel support, as the GIL is now optional.
In particular, this PR performs the following checks:
pytest-run-parallel
, which allows pytest suites to be run concurrently (per test). This analysis didn't throw any major concurrency-related issues, the only tests that were marked as thread-unsafe were related to memory usage checking and concurrent file overwriting.