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

fix: detect gil #2762

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nichmor
Copy link
Contributor

@nichmor nichmor commented Dec 23, 2024

Overview

Fixes #2732 by detecting if it's a free-threaded python as using it to configure the Tags.

p.s. you still need to use

[tool.pixi.system-requirements]
macos = "14.0"

as pointed by @ruben-arts

@@ -159,10 +160,20 @@ fn get_implementation_name(python_record: &PackageRecord) -> miette::Result<&'st
}
}

/// Return whether the specified record has gil disabled (by being a free-threaded python interpreter)
/// by looking into the build string of the record.
fn gil_disabled(python_record: &PackageRecord) -> miette::Result<bool> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we can depend on that t I've asked in the conda-forge zulip: https://conda-forge.zulipchat.com/#narrow/channel/457337-general/topic/Python.20freethreading.20from.20record/near/490528853

Also, I think you can skip the result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. Let's wait for the resolution from their side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

based on discussion with @wolfv - it seems right way to do things, we just need to additional check if it's from conda-forge

Copy link
Contributor

Choose a reason for hiding this comment

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

Didnt follow the discussion with wolf but isnt isurufs answer on zulip the rught approach for the tags?

Then python_abi is the correct way. You don't have to check that it ends with t. Just use the entirety of cp313t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problematic installation of numpy nightly wheel under python-freethreading
3 participants