Environment marker for free-threading

Is there a PEP 508 environment marker for free threading? Unsurprisingly, my packages need newer versions of build dependencies (some prereleases) when building for free threading. I haven’t been able to find an environment marker to be able to specify the different dependencies under the right conditions.

Related, I suppose: I don’t see any mechanism in PEP 508 for defining new environment markers as the need arises (as I believe it has with the arrival of free-threading). Does each environment marker addition warrant a whole PEP process?

1 Like

I don’t think this is something we anticipated when we specified markers.

Yes, a new marker would need a spec amendment, including tooling changes and a transition period (we don’t have a way to say “you must use tools that understand this revision of the marker spec” either :slightly_frowning_face:). That will almost certainly require a PEP.

Such a PEP should probably include an extension mechanism so we don’t ever have to go through this again…

1 Like

It’s not the biggest deal, and perhaps not enough for someone to go through the process, but thanks for confirming it’s not there. Once the latest stable versions of packaging tools have free-threading support, there likely won’t be a much ongoing practical need for this one. In my case, free threading needs cython>=3.1dev where I already have cython>=3. Once Cython 3.1 is out, nobody will probably notice.

1 Like

I think checking for Python >= 3.13 is the closest you can get. Hopefully the dependencies will feature an actual release before Python 3.13 final is out, so perhaps that marker would be good enough.

Until it’s the default, free-threading will be marked by an ABI flag (t). So perhaps a way of checking the ABI flags as environment markers is the easiest/most generic option?

3 Likes

2 posts were split to a new topic: Will the free threading Python build become the default?