Skip to content

Add support for requesting free-threaded builds of cpython. #1057

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

Open
AraHaan opened this issue Mar 19, 2025 · 2 comments
Open

Add support for requesting free-threaded builds of cpython. #1057

AraHaan opened this issue Mar 19, 2025 · 2 comments
Assignees
Labels
feature request New feature or request to improve the current logic

Comments

@AraHaan
Copy link

AraHaan commented Mar 19, 2025

Description:
Since Python 3.13 requesting the free-threaded GIL free builds of cpython (Py_GIL_DISABLED defined in the C code) is a new feature that is not shipped by default in the normal builds of cpython and c extensions could optionally provide said support, as such it is necessary to also provide support for requesting such builds, but the feature throws error for when they request Python versions older than 3.13 as it did not exist prior to 3.13.

Justification:
Using the github action to install 3.13+ of cpython just to build a multi-phase C extension that may include the new Py_mod_gil slot when Py_GIL_DISABLED is defined for the C extension).

Are you willing to submit a PR?

It depends on how hard it is to implement. I don't know typescript.

@AraHaan AraHaan added feature request New feature or request to improve the current logic needs triage labels Mar 19, 2025
@gowridurgad
Copy link
Contributor

Hello @AraHaan,
Thank you for this feature request. We will investigate it and get back to you as soon as we have some feedback.

@aparnajyothi-y
Copy link
Contributor

Hello @AraHaan, Thank you for raising this feature request! The functionality you've described has already been implemented as part of PR #973. This PR includes:

Support for installing GIL-free (free-threaded) builds of Python 3.13+ (--disable-gil / x64-freethreaded architecture).

Validation logic that ensures an error is thrown when attempting to use the x64-freethreaded variant with Python versions earlier than 3.13.

This implementation directly addresses the goals outlined in your request and aligns with PEP 703.

Please let us know if you're encountering any issues or have further suggestions :)

@aparnajyothi-y aparnajyothi-y self-assigned this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants