Test 3.13 free-threaded build on CI by hugovk · Pull Request #8200 · python-pillow/Pillow
For #8199.
Currently GitHub's actions/setup-python does not yet support free-threading but it has been requested: actions/setup-python#771 (give it a 👍)
However, it is available via deadsnakes/action:
- https://github.com/deadsnakes/action
- https://dev.to/hugovk/help-us-test-free-threaded-python-without-the-gil-1hgf
This PR adds an Ubuntu 3.13-dev job to the matrix, to run tests with a free-threaded build.
The build actually runs with the GIL enabled, we'll need to explicitly indicate in the extensions that they should run with it disabled. This will be changed in a follow-up PR.
We can check if Python is built with free-threaded mode by looking for "experimental free-threading build" in python --version --version. On the CI we can see it under "Build system information":
sys.version ['3.13.0b2+ experimental free-threading build (main, Jun 27 2024, 08:49:18) [GCC 11.4.0]']
https://github.com/python-pillow/Pillow/actions/runs/9794942077/job/27045976814#step:5:10
Compared to the regular build:
sys.version ['3.13.0b3 (main, Jun 28 2024, 13:42:44) [GCC 11.4.0]']
https://github.com/python-pillow/Pillow/actions/runs/9794942077/job/27045975199#step:5:16