Hello, Here's a patchset that adds support for Python 3.13 freethreading version.
Originally, this was dev-lang/python:3.13[-gil]. However, since it is ABI-incompatible at extension level with the regular build of CPython, upstream decided to split it into a separate /usr/lib/python3.13t install tree, with its own .so suffix, wheel tag and so on. All things considered, it seems to make most sense to treat it separately in Gentoo as well. So for this, we do: 1. Introduce dev-lang/python-freethreading that installs the freethreading version of CPython (:3.13t). 2. Introduce 'python3_13t' Python target for it. Note that at this point freethreading support is limited. Some packages do support it, others may work incidentally. Right now, the stable ABI is not supported at all. Hopefully, this will be improved in the future (and I really do hope we won't have to repeat this split for Python 3.14). In any case, the extra advantage of splitting it right now is that it permits us to test freethreading support separately and explicitly mark packages that work with that. Freethreading is considered experimental upstream. Unlike python3_13 target, python3_13t is not intended to be unmasked on stable. We are also using a separate package name to avoid having to hack PV into something like 3.13.0 + 3.13.0-r100, and to avoid having Portage insist on installing the freethreading version, as it loves to proactively upgrade stuff. In fact, perhaps we should consider splitting all slots of Python into separate packages in the future. That said, the current implementation is not nice for PYTHON_COMPAT: PYTHON_COMPAT=( pypy3 python3_{10..13} python3_13t ) I'm still considering our options here, but I don't think there's any really clean way of avoiding this. Michał Górny (9): dev-lang/python: Remove old dev-lang/python: Remove freethreading support profiles: Copy dev-lang/python entries for python-freethreading dev-lang/python-freethreading: New package, 3.13.0 profiles: Add python3_13t (freethreading) target install-qa-check.d: Support dev-lang/python-freethreading python-utils-r1.eclass: Support python3_13t (freethreading) target app-portage/gpyutils: Add python3.13t distutils-r1.eclass: Do not use stable ABI wheels in freethreading .../gpyutils/files/implementations.txt | 1 + dev-lang/python-freethreading/Manifest | 3 ++ .../python-freethreading/files/pydoc.conf | 6 +++ .../python-freethreading/files/pydoc.init | 24 ++++++++++ dev-lang/python-freethreading/metadata.xml | 39 +++++++++++++++ .../python-freethreading-3.13.0.ebuild} | 47 +++++++------------ dev-lang/python/Manifest | 3 -- dev-lang/python/metadata.xml | 4 -- dev-lang/python/python-3.13.0.ebuild | 15 +++--- eclass/distutils-r1.eclass | 13 +++-- eclass/python-utils-r1.eclass | 10 ++-- eclass/tests/python-utils-r1.sh | 8 ++-- metadata/install-qa-check.d/60python-site | 2 +- profiles/arch/alpha/package.use.mask | 1 + profiles/arch/hppa/package.use.mask | 1 + profiles/arch/loong/package.use.mask | 1 + profiles/arch/m68k/package.mask | 1 + profiles/arch/m68k/package.use.mask | 1 + profiles/arch/mips/package.use.mask | 1 + profiles/arch/s390/package.use.mask | 1 + profiles/base/make.defaults | 3 +- profiles/base/package.use.force | 7 +-- profiles/base/package.use.mask | 2 + profiles/base/use.stable.mask | 2 + profiles/desc/python_single_target.desc | 1 + profiles/desc/python_targets.desc | 1 + profiles/features/hardened/package.use | 1 + profiles/features/musl/package.use.mask | 1 + profiles/features/prefix/package.use.mask | 1 + profiles/features/selinux/package.use.force | 1 + profiles/targets/desktop/gnome/package.use | 1 + profiles/targets/desktop/package.use | 2 + 32 files changed, 143 insertions(+), 62 deletions(-) create mode 100644 dev-lang/python-freethreading/Manifest create mode 100644 dev-lang/python-freethreading/files/pydoc.conf create mode 100644 dev-lang/python-freethreading/files/pydoc.init create mode 100644 dev-lang/python-freethreading/metadata.xml rename dev-lang/{python/python-3.13.0_rc3.ebuild => python-freethreading/python-freethreading-3.13.0.ebuild} (92%) -- 2.47.0