I’m getting the feeling that we’re discussing about much too fine-grained issues.
A package may have a lot of functionality, and it is unfeasible to discuss each possibility.
Many features are likely to remain unsafe for concurrent use.
For instance, PEP 703 explicitly retains the thread safety guarantees that were in place before the GIL was removed, and it doesn’t either add nor remove any.
So that, for instance, my_int += 1
is unsafe both in the free-threaded and in the default build.
The fact that there is no GIL doesn’t mean that everything must now be thread safe.
I think this is a point that should be remarked.
No one is expecting all features of all libraries to become thread-safe.
The standard threading.Lock
is going nowhere; it is normal to expect that the user has to take care of concurrency issues.
The question is whether or not their programs need to change when they update their dependencies to use the free-threading build.
I think that most free-threading users will not expect their dependencies to function reliably with an experimental interpreter.
On the other hand, I think they’ll want to know whether or not some work had been done in the library to support free-threading, which is where the usefulness of a classifier/badge comes in.
I want to refrain from providing precise details as to what this classifier means: it will surely mean something specific to every package.
Nevertheless, it can have a generic meaning too: yes, you can go ahead and use this library even with this experimental version of CPython.
It signifies intention. (That doesn’t mean there are no bugs.)
Also, there are many pure-Python libraries out there.
We all know that they can be used from a free-threading interpreter too, because we know the principle.
Does every Python programmer out there know this?
Furthermore, to know that a package is pure-Python, you need to have some knowledge about the implementation of the package, so you need to go and check.
(Or you can check in the Download Files section of PyPI and check the tags; again, the same question, does everyone know the principle?)
A classifier/badge makes this immediately obvious.