From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7D1E2158046 for ; Wed, 9 Oct 2024 11:58:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 194E9E29B0; Wed, 9 Oct 2024 11:58:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 80C7EE29AA for ; Wed, 9 Oct 2024 11:58:00 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 0/9] Python 3.13 freethreading support Date: Wed, 9 Oct 2024 13:47:07 +0200 Message-ID: <20241009115754.584070-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.47.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 3574cd97-4cb5-4bd8-991c-072b7be0932d X-Archives-Hash: de172c12e6cf453199b0dcad2cd8b287 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