You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PEP 703: actions/setup-python python3.13t builds with --disable-gil #771
Please make Python 3.13 available, built with the --disable-gil flag.
Justification:
Thank you for actions/setup-python and especially for making it possible to test new pre-releases, and final releases within a day or so of their official release. (And see here how well GitHub Actions compares to other CI services :)
PEP 703 has been accepted to remove the GIL. The rollout is planned in three phases, and for success, it's extremely important to get community feedback and support to be able to move to the next phase.
Therefore it's also extremely important for the community to be able to test the "free-threaded" aka "nogil" builds of Python. This requires a separate build of 3.13 with the --disable-gil flag enabled for the configure script (see the PEP and CPython CI).
To achieve this, it would be very helpful if actions/setup-python also provided free-threaded builds for 3.13 (and later) to enable the community to try them out and give feedback, perhaps via with: disable-gil: true.
It's still a bit early for extension authors to start testing, but it would be great to have the testing infra ready for when the time comes.
The 3.13 beta is due on 2024-05-07 and we'll ask the community to start testing ahead of the full release in October. It would be very helpful if it's possible using GitHub Actions.
@dmitry-shibanov hi! 3.13 beta 1 was just released. Myself and a few others have been working on adding compatibility for free-threaded python builds and I'd like to start adding CI for some projects in the scientific python ecosystem. Being able to specify a build via setup-python would make doing so much more straightforward for many projects.
Reacted by Hugo van Kemenade, Sam Gross, David Lord, Alex Waygood, Agriya Khetarpal, Lysandros Nikolaou, Larry Z., Jim Kring, 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) and Loïc Estève
Reacted by stonebig, Larry Z., Jim Kring and 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
@dmitry-shibanov Thanks for looking into making this happen. Is there anything you need from the Python community to make this happen within GitHub Actions?
Reacted by Hugo van Kemenade, Matthieu Darbois and 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
I had a first look at how it could be implemented given the current state of things in actions:
manifest files generation seems compatible with the addition of a new field to account for different variants of a given tool.
however toolcache does expect the manifest to follow a specific semantic so it would require an update if going with a new field for different variants of a given tool.
That being said, the arch field of the manifest is just a string so it could be used to provide variants (e.g. x64-nogil).
This is probably not user friendly so while the actions/python-versions repo could use such a hack, the actions/setup-pyton might want to provide an option - as proposed in the description - and leave the hack as an internal detail that could be changed if manifest generation/consumption gets updated.
I'm willing to submit Pull Requests but need some guidance regarding what's acceptable from the maintainers first.
I'm also curious if anyone has worked on this yet. For Windows, at least, the python-version release installer for Windows seem to already have an installer capable of installing the free-threaded binary. Just need to update the setup.ps1 powershell script (that lives inside the zip) to pass the Include_freethreaded=1 option to the installer (and then maybe remove/rename the installed GIL binary python.exe with the NOGIL binary python3.13t.exe that is installed next to it).
e.g. here is how I've installed the 3.13rc1 nogil binary with a powershell script:
Maybe it would be a good idea to add python3.13t to the tile of this issue. I do expect to be able to accept 3.13t as a valid version once this is done.
Reacted by Clément Robert, Xuehai Pan, Edgar Ramírez Mondragón, Hugo van Kemenade, Daniele Parmeggiani and Jianfeng Mao
changed the title [-]PEP 703: actions/setup-python builds with `--disable-gil`[/-][+]PEP 703: actions/setup-python python3.13t builds with `--disable-gil`[/+]on Oct 8, 2024
Hello everyone 👋,
Thank you for your valuable insights!
We are excited to announce that the free-threaded feature has been successfully merged into the main branch via PR #973 🎉. To utilise this feature, you can now use actions/setup-python@main in your workflows. The changes will be included in upcoming releases. Binaries for free-threaded Python versions are now available for Python 3.13.1 and 3.14.0-alpha.5, with additional versions to be released soon.
We are proceeding with closing this feature request. Please feel free to reach out if you have any further concerns or issues.
Thank you for your understanding and patience!😊
Reacted by Fabien, Hugo van Kemenade and Ilya Siamionau
Reacted by Ralf Gommers, Hugo van Kemenade, Justin Chu and Ilya Siamionau
Activity
dmitry-shibanov commentedon Nov 23, 2023
Hello @hugovk. Thank you for your feature request. We'll take a look on it.
hugovk commentedon Apr 11, 2024
Hello @dmitry-shibanov, any news?
The 3.13 beta is due on 2024-05-07 and we'll ask the community to start testing ahead of the full release in October. It would be very helpful if it's possible using GitHub Actions.
Thanks!
ngoldbaum commentedon May 8, 2024
@dmitry-shibanov hi! 3.13 beta 1 was just released. Myself and a few others have been working on adding compatibility for free-threaded python builds and I'd like to start adding CI for some projects in the scientific python ecosystem. Being able to specify a build via
setup-pythonwould make doing so much more straightforward for many projects.willingc commentedon May 13, 2024
@dmitry-shibanov Thanks for looking into making this happen. Is there anything you need from the Python community to make this happen within GitHub Actions?
tonybaloney commentedon May 14, 2024
For anyone seeking a workaround the deadsnakes action has a nogil flag https://github.com/deadsnakes/action
You can install Python 3.13 this way as a drop in replacement for the setup-python action.
mayeut commentedon May 20, 2024
I had a first look at how it could be implemented given the current state of things in actions:
That being said, the
archfield of the manifest is just a string so it could be used to provide variants (e.g.x64-nogil).This is probably not user friendly so while the
actions/python-versionsrepo could use such a hack, theactions/setup-pytonmight want to provide an option - as proposed in the description - and leave the hack as an internal detail that could be changed if manifest generation/consumption gets updated.I'm willing to submit Pull Requests but need some guidance regarding what's acceptable from the maintainers first.
cc @dmitry-shibanov, @HarithaVattikuti, @aparnajyothi-y
EwoutH commentedon Aug 10, 2024
I’m curious, with Python 3.13 now being in the release candidate phase, is anyone still working on this or discussing it?
jimkring commentedon Aug 13, 2024
I'm also curious if anyone has worked on this yet. For Windows, at least, the
python-versionrelease installer for Windows seem to already have an installer capable of installing the free-threaded binary. Just need to update thesetup.ps1powershell script (that lives inside the zip) to pass theInclude_freethreaded=1option to the installer (and then maybe remove/rename the installed GIL binarypython.exewith the NOGIL binarypython3.13t.exethat is installed next to it).e.g. here is how I've installed the 3.13rc1 nogil binary with a powershell script:
ci: run tests on Py 3.12 and install test on Py 3.13 (#1315)
ssbarnea commentedon Oct 8, 2024
Maybe it would be a good idea to add
python3.13tto the tile of this issue. I do expect to be able to accept3.13tas a valid version once this is done.XuehaiPan commentedon Oct 8, 2024
As a workaround, I'm currently using
pyenvto test my C extension with Python built with--pydebug --disable-gil.https://github.com/metaopt/optree/blob/v0.13.0/.github/workflows/tests-with-pydebug.yml#L33-L125
[-]PEP 703: actions/setup-python builds with `--disable-gil`[/-][+]PEP 703: actions/setup-python python3.13t builds with `--disable-gil`[/+]14 remaining items
Support free threaded Python versions like '3.13t'
Support free threaded Python versions like '3.13t'
Support free threaded Python versions like '3.13t' (#973)
v-priya-kinthali commentedon Mar 6, 2025
Hello everyone 👋,
Thank you for your valuable insights!
We are excited to announce that the free-threaded feature has been successfully merged into the main branch via PR #973 🎉. To utilise this feature, you can now use
actions/setup-python@mainin your workflows. The changes will be included in upcoming releases. Binaries for free-threaded Python versions are now available for Python3.13.1and3.14.0-alpha.5, with additional versions to be released soon.We are proceeding with closing this feature request. Please feel free to reach out if you have any further concerns or issues.
Thank you for your understanding and patience!😊
colesbury commentedon Mar 6, 2025
Thank you @priya-kinthali and @priyagupta108 for the reviews and feedback!
Test on free-threaded Python
XuehaiPan commentedon Mar 9, 2025
Hi, is there any release schedule to allow developers access this feature via a git tag?
Test on free-threaded Python
hugovk commentedon Mar 25, 2025
This has now been released as v5.5.0 and v5:
I wrote up some instructions:
Support free threaded Python versions like '3.13t' (#973)
Python 3.13t CI testing (#111)
fix: vulnerabilites + rebase (#8)