On 9/21/26 21:42, Maximiliano Curia wrote:
## Discussion point: free-threaded / -nogil packages
As I had mentioned in my initial email [5], we need to somehow modify
our tooling to allow packages to declare that they support building
against the no-gil variant.
I've been working on a proposal that creates the -nogil packages from
the python3.15 package [6]. This would add the python3.15t interpreter
and its corresponding standard library. The MR is a work in progress,
there are some decisions I'm not certain of, like whether we should ship
a completely separate standard library (like upstream expects), or only
the .so files (to avoid duplicating ~20MB of .py files).
upstream already expects us to ship different stacks for different
Python versions... Not a big issue, because we only ship with one
version in a release. Afaiu, the free-thread interpreter will take over
at some point, and the current one with the gil will be fading out.
Again, in the end we'll have just one interpreter.
And this doesn't solve the open question of how packages can indicate
whether they support -nogil or not. As mentioned before, these are the
options that I can think of:
- We could use something similar to XS-Python-Versions (like
XS-Python-Variants), but this comes with some parsing challenges.
- We could rely on having a build dependency on python3-nogil-dev or
python3-nogil-all-dev, for packages that support the variant.
- We could add a parameter to py3version so that it also lists the
-nogil variant as a separate version. This should make it easier for
packages where we need to explicitly handle multiple python versions.
We probably will need to implement a combination of those.
It would be good if we could discuss and agree on how we are going to
manage this soon.
I would like to avoid anything, which breaks package builds or autopkg
tests, before 3.15 is the default. This includes pybuild and autopkg
tests also looping over the free-threaded versions. And most likely, we
should wait until 3.14 is dropped as a supported version. Not sure what
else could be done for the upcoming forky release. I assume at this
time, the archive is about to freeze, or already frozen.
Maybe start filing user-tagged bug reports for free-threaded first, also
explaining how people can build and test with that interpreter?
Matthias