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

Add freethreading support #409

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

Conversation

isuruf
Copy link
Member

@isuruf isuruf commented Oct 14, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

matplotlib has wheels in latest release

@isuruf
Copy link
Member Author

isuruf commented Oct 14, 2024

@conda-forge-admin rerender

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@tacaswell
Copy link
Contributor

To be clear, this is adding the build options for freethreading, not claiming mpl is freethreading safe?

@dopplershift
Copy link
Member

What does "freethreading safe" mean?

@ngoldbaum
Copy link

ngoldbaum commented Oct 30, 2024

To be clear, this is adding the build options for freethreading, not claiming mpl is freethreading safe?

This is building binaries that support the new CPython ABI under the free-threaded build. This is related but orthogonal to supporting free-threading.

You need to explicitly declare that matplotlib's extension modules don't use the GIL to mark matplotlib as thread-safe.

What does "freethreading safe" mean?

Good question! The working definition we've been going with is that you should have similar thread safety guarantees under the GIL-enabled and GIL-disabled build. So any assumptions made in low-level code about the GIL providing locking and making it OK to do things like use C global statics to store module state are no longer OK and all that stuff should be fixed.

However there are lots of other thread safety issues in Python codebases that are unrelated to the GIL, I don't think the presence of any of those issues means a module is "unsafe" under freethreading.

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.

5 participants