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

Free threaded classifier? #177

Open
henryiii opened this issue May 13, 2024 · 2 comments
Open

Free threaded classifier? #177

henryiii opened this issue May 13, 2024 · 2 comments

Comments

@henryiii
Copy link
Contributor

Should a classifier be added for free-threading support? It might be obvious if a package provides binaries for free-threaded variants, but it would be nice to declare support for things like build backends and various tooling. Also, it could indicate that a package is actually free-threaded, not just provided binaries. (Maybe two classifiers would be in order? One for supporting free-threading, and one for multithreading)?

@hugovk
Copy link
Contributor

hugovk commented Sep 14, 2024

This is being discussed at https://discuss.python.org/t/free-threading-trove-classifier/62406.

@ncoghlan
Copy link
Member

ncoghlan commented Sep 16, 2024

Summarising the discussion so far (as of this post): adding multiple classifiers is likely to be worthwhile, allowing projects to indicate the level of maturity of their free threading support.

4 status tiers have been identified so far, different suggested names for some of the tiers are separated by "/":

  • Experimental/Unstable: For experimentation and feedback only. Any binary extensions provided for free-threaded builds turn the GIL back on by default.
  • Beta: Free threaded usage is supported, but documentation of constraints and limitations may be incomplete. Any binary extensions provided for free-threaded builds leave the GIL disabled.
  • Stable/Limited/Limited Support: Free threaded usage is supported, and associated constraints and limitations are documented. Violating the documented constraints may result in segfaults rather than Python exceptions. Any binary extensions provided for free-threaded builds leave the GIL disabled.
  • Resilient/Supported: Free threaded usage is supported, and associated constraints and limitations are documented. Violating the documented constraints will reliably give Python exceptions rather than segfaults. Any binary extensions provided for free-threaded builds leave the GIL disabled.

Pure Python packages are permitted to use these classifiers (for example, a pure Python package may add cross-thread locking or subinterpreter invocations such that an underlying Experimental or Beta library effectively becomes Stable or Resilient when used via the free threading support layer).

An explicit numeric ordering (along the lines of that used for Development Stage classifiers) is not currently defined, but potentially could be.

While not specifically covered in the Discourse thread (at time of writing), the suggested prefix for the above would be Free Threading :: (as per python/steering-council#221 (comment) )

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

No branches or pull requests

3 participants