• [gentoo-dev] [PATCH 00/10] Add pypy3_11 Python target

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 14:50:01 2025
    Hi,

    Long story short, upgrades for PyPy are a mess in Gentoo right now.
    To fix that mess, I'd like to propose slotting PYTHON_TARGETS for PyPy
    much like we slot them for CPython.

    This roughly means:

    - "pypy3" target will only match PyPy3.10 going forward, and be removed
    once we fully migrate to PyPy3.11

    - a new "pypy3_11" target will be added for PyPy3.11, and every new
    PyPy slot will receive its own target

    - shebangs for Python scripts will now refer to "pypy3.x" rather than
    "pypy3", so "pypy3" executable will eventually become a convenience
    wrapper much like "python" is now

    On the plus side, users will be able to take the safer upgrade path,
    by rebuilding everything with PyPy3.11 support without losing PyPy3.10
    support immediately (and ending up with messed up depgraph if something
    fails in the middle).

    On the minus side, we'll have to test things on PyPy3.11 explicitly,
    so more work. On the other hand, it's not so bad — at least we'll keep
    a track of problems with PyPy3.11 rather than guessing if it's good
    enough to switch already, and then having lots of sudden breakage
    without the old version to compare to.

    --
    Best regards,
    Michał Górny


    Michał Górny (10):
    profiles: Add pypy3_11 target
    python-utils-r1.eclass: Add pypy3_11 target
    app-portage/gpyutils: Add pypy3_11 target
    dev-lang/pypy3-exe: Readd KEYWORDS
    dev-lang/pypy3-exe-bin: Readd KEYWORDS
    dev-lang/pypy: Readd KEYWORDS
    dev-python/pypy3: Remove pypy3.11 version, it's a separate target
    dev-lang/pypy: Do not default-enable USE=symlink in :3.11
    python-any-r1.eclass: Fix := stripping again (now we have :3.11=)
    python-r1.eclass: Fix PYTHON_PKG_DEP stripping (we have :3.11= now)

    .../gpyutils/files/implementations.txt | 1 +
    dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild | 3 ++-
    .../pypy3-exe-bin-3.11.7.3.18.ebuild | 1 +
    .../pypy3-exe/pypy3-exe-3.11.7.3.18.ebuild | 1 +
    dev-python/pypy3/pypy3-7.3.18-r100.ebuild | 18 --------------
    eclass/python-any-r1.eclass | 4 ++--
    eclass/python-r1.eclass | 2 +-
    eclass/python-utils-r1.eclass | 24 +++++++++----------
    eclass/tests/python-utils-r1.sh | 19 +++++++++++++--
    profiles/base/package.use.force | 1 +
    profiles/base/use.stable.mask | 2 ++
    profiles/desc/python_single_target.desc | 3 ++-
    profiles/desc/python_targets.desc | 3 ++-
    13 files changed, 44 insertions(+), 38 deletions(-)
    delete mode 100644 dev-python/pypy3/pypy3-7.3.18-r100.ebuild

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:01 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    dev-lang/pypy3-exe-bin/pypy3-exe-bin-3.11.7.3.18.ebuild | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/dev-lang/pypy3-exe-bin/pypy3-exe-bin-3.11.7.3.18.ebuild b/dev-lang/pypy3-exe-bin/pypy3-exe-bin-3.11.7.3.18.ebuild
    index 2a484ef6b602..15481f9c5c4e 100644
    --- a/dev-lang/pypy3-exe-bin/pypy3-exe-bin-3.11.7.3.18.ebuild
    +++ b/dev-lang/pypy3-exe-bin/pypy3-exe-bin-3.11.7.3.18.ebuild
    @@ -57,6 +57,7 @@ S=${WORKDIR}/${MY_P}

    LICENSE="MIT"
    SLOT="${PV%_p*}"
    +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"

    # sys-devel/gcc for libgcc_s.so
    RDEPEND="

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:01 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.18.ebuild | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.18.ebuild b/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.18.ebuild
    index 463370032f36..a217479b3123 100644
    --- a/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.18.ebuild
    +++ b/dev-lang/pypy3-exe/pypy3-exe-3.11.7.3.18.ebuild
    @@ -26,6 +26,7 @@ S="${WORKDIR}/${MY_P}-src"

    LICENSE="MIT"
    SLOT="${PV%_p*}"
    +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
    IUSE="+jit low-memory ncurses cpu_flags_x86_sse2"

    RDEPEND="

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:01 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    app-portage/gpyutils/files/implementations.txt | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/app-portage/gpyutils/files/implementations.txt b/app-portage/gpyutils/files/implementations.txt
    index 95b321ec9437..574c3fcc256b 100644
    --- a/app-portage/gpyutils/files/implementations.txt
    +++ b/app-portage/gpyutils/files/implementations.txt
    @@ -31,6 +31,7 @@ pypy2_0 2.7-pypy-2.0 dead p2.0

    pypy dead pypy
    pypy3 experimental pypy3
    +pypy3_11 experimental pypy3_11

    jython2_5 2.5-jython dead j2.5
    jython2_7 2.7-jython dead j2.7

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:02 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild b/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild
    index 214aeb10d09f..e2dafe4ccb16 100644
    --- a/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild
    +++ b/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild
    @@ -29,7 +29,7 @@ LICENSE="MIT"
    # also check pypy/interpreter/pycode.py -> pypy_incremental_magic
    SLOT="${PYVER}/pypy311-pp73-400"
    KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
    -IUSE="+ensurepip gdbm +jit ncurses sqlite +symlink +test-install tk" +IUSE="+ensurepip gdbm +jit ncurses sqlite symlink +test-install tk"
    # many tests are failing upstream
    # see https://buildbot.pypy.org/summary?branch=py${PYVER}
    RESTRICT="test"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:01 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/python-utils-r1.eclass | 24 ++++++++++++------------
    eclass/tests/python-utils-r1.sh | 19 +++++++++++++++++--
    2 files changed, 29 insertions(+), 14 deletions(-)

    diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 0cb132b72e3a..affb8e55a50d 100644
    --- a/eclass/python-utils-r1.eclass
    +++ b/eclass/python-utils-r1.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2024 Gentoo Authors
    +# Copyright 1999-2025 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: python-utils-r1.eclass
    @@ -39,7 +39,7 @@ inherit multiprocessing toolchain-funcs
    # @DESCRIPTION:
    # All supported Python implementations, most preferred last.
    _PYTHON_ALL_IMPLS=(
    - pypy3
    + pypy3 pypy3_11
    python3_13t
    python3_{10..13}
    )
    @@ -137,7 +137,7 @@ _python_set_impls() {
    # please keep them in sync with _PYTHON_ALL_IMPLS
    # and _PYTHON_HISTORICAL_IMPLS
    case ${i} in
    - pypy3|python3_9|python3_1[0-3]|python3_13t)
    + pypy3|pypy3_1
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:01 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    profiles/base/package.use.force | 1 +
    profiles/base/use.stable.mask | 2 ++
    profiles/desc/python_single_target.desc | 3 ++-
    profiles/desc/python_targets.desc | 3 ++-
    4 files changed, 7 insertions(+), 2 deletions(-)

    diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force index 03ebc138e7cf..e6eb75e716ea 100644
    --- a/profiles/base/package.use.force
    +++ b/profiles/base/package.use.force
    @@ -307,6 +307,7 @@ dev-lang/python-exec python_targets_python3_12
    dev-lang/python-exec python_targets_python3_13
    dev-lang/python-exec python_targets_python3_13t
    dev-lang/python-exec python_targets_pypy3
    +dev-lang/python-exec python_targets_pypy3_11

    # Zac Medico <zmedico@gentoo.org> (2010-10-20)
    # Force ipc USE flag since it should remain enabled unless
    diff --git a/profiles/base/use.stable.mask b/profiles/base/use.stable.mask index f2bbf0a0a135..f38e5e82c741 100644
    --- a/profiles/base/use.stable.mask
    +++ b/profiles/base/use.stable.mask
    @@ -15,6
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Thu Feb 13 15:00:02 2025
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild b/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild
    index 9ab184569112..214aeb10d09f 100644
    --- a/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild
    +++ b/dev-lang/pypy/pypy-3.11.7.3.18_p1.ebuild
    @@ -28,6 +28,7 @@ LICENSE="MIT"
    # pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))'
    # also check pypy/interpreter/pycode.py -> pypy_incremental_magic
    SLOT="${PYVER}/pypy311-pp73-400"
    +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
    IUSE="+ensurepip gdbm +jit ncurses sqlite +symlink +test-install tk"
    # many tests are failing upstream
    # see https://buildbot.pypy.org/summary?branch=py${PYVER}

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)