public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 0/9] Python 3.13 freethreading support
Date: Wed,  9 Oct 2024 13:47:07 +0200	[thread overview]
Message-ID: <20241009115754.584070-1-mgorny@gentoo.org> (raw)

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



             reply	other threads:[~2024-10-09 11:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 11:47 Michał Górny [this message]
2024-10-09 11:47 ` [gentoo-dev] [PATCH 1/9] dev-lang/python: Remove old Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 2/9] dev-lang/python: Remove freethreading support Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 3/9] profiles: Copy dev-lang/python entries for python-freethreading Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 4/9] dev-lang/python-freethreading: New package, 3.13.0 Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 5/9] profiles: Add python3_13t (freethreading) target Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 6/9] install-qa-check.d: Support dev-lang/python-freethreading Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 7/9] python-utils-r1.eclass: Support python3_13t (freethreading) target Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 8/9] app-portage/gpyutils: Add python3.13t Michał Górny
2024-10-09 11:47 ` [gentoo-dev] [PATCH 9/9] distutils-r1.eclass: Do not use stable ABI wheels in freethreading Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241009115754.584070-1-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox