Skip to content
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

Support freethreading python #2805

Merged
merged 6 commits into from
Apr 12, 2024
Merged

Support freethreading python #2805

merged 6 commits into from
Apr 12, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Apr 3, 2024

freethreaded python reintroduces abiflags since it is incompatible with regular native modules and abi3.

Tests: None yet! We're lacking cpython 3.13 no-gil builds we can use in ci.

My test setup:

PYTHON_CONFIGURE_OPTS="--enable-shared --disable-gil" pyenv install 3.13.0a5
cargo run -q -- venv -q -p python3.13 .venv3.13 --no-cache-dir && cargo run -q -- pip install -v psutil --no-cache-dir && .venv3.13/bin/python -c "import psutil"

Fixes #2429

@konstin konstin changed the title Support no-gil python Support freethreaded python Apr 3, 2024
@konstin konstin changed the title Support freethreaded python Support freethreading python Apr 3, 2024
@zanieb zanieb added the enhancement New feature or request label Apr 3, 2024
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

@henryiii
Copy link
Contributor

henryiii commented Apr 3, 2024

deadsnakes has free threading builds, FYI. Haven't started using them in CI yet, but have seen it here: https://github.com/deadsnakes/action.

No-gil/gil-disabled/free-threaded python reintroduces abiflags since it is incompatible with regular native modules and abi3.

Tests: None yet! We're lacking cpython 3.13 no-gil builds we can use in ci.

My test setup:

```
PYTHON_CONFIGURE_OPTS="--enable-shared --disable-gil" pyenv install 3.13.0a5
cargo run -q -- venv -q -p python3.13 .venv3.13 --no-cache-dir && cargo run -q -- pip install -v psutil --no-cache-dir && .venv3.13/bin/python -c "import psutil"
```

Fixes #2429
@konstin konstin force-pushed the konsti/gil-disabled-abiflags branch from 54a5d35 to 61db03b Compare April 12, 2024 09:27
@konstin konstin marked this pull request as ready for review April 12, 2024 09:27
@konstin
Copy link
Member Author

konstin commented Apr 12, 2024

I'll add a test case when we have a good test candidate, psutil currently just errors with a different message

@konstin konstin enabled auto-merge (squash) April 12, 2024 09:27
@konstin konstin merged commit 7f70849 into main Apr 12, 2024
37 checks passed
@konstin konstin deleted the konsti/gil-disabled-abiflags branch April 12, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv should exclude abi3 wheels in free-threaded Python 3.13+
3 participants