Merge updates from master

This commit is contained in:
Repository mirror & CI
2026-05-09 03:46:09 +00:00
83 changed files with 749 additions and 147 deletions

View File

@@ -26,6 +26,8 @@ python3_13 current 3.13
python3_13t experimental 3.13t
python3_14 supported 3.14
python3_14t experimental 3.14t
python3_15 experimental 3.15
python3_15t experimental 3.15t
pypy1_8 2.7-pypy-1.8 dead p1.8
pypy1_9 2.7-pypy-1.9 dead p1.9

View File

@@ -92,6 +92,11 @@ BDEPEND="
)
)
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"

View File

@@ -84,6 +84,11 @@ BDEPEND="
)
)
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"

View File

@@ -100,6 +100,11 @@ BDEPEND="
)
)
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"

View File

@@ -93,6 +93,11 @@ BDEPEND="
)
)
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"

View File

@@ -138,6 +138,10 @@ python_test() {
tests/test_client_functional.py::test_invalid_idna
# broken by irrelevant deprecation warnings
tests/test_circular_imports.py::test_no_warnings
# https://github.com/aio-libs/aiohttp/issues/11400#issuecomment-4168569526
# https://github.com/python/cpython/issues/145599
# https://github.com/python/cpython/pull/145600
tests/test_cookie_helpers.py::test_parse_set_cookie_headers_uses_unquote_with_octal
)
case ${EPYTHON} in

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_VERIFY_REPO=https://github.com/python-attrs/attrs
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_TESTED=( python3_{11..14} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_15 python3_{13..15}t )
inherit distutils-r1

View File

@@ -0,0 +1,60 @@
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1
DESCRIPTION="Low-level components of distutils2/packaging"
HOMEPAGE="
https://pypi.org/project/distlib/
https://github.com/pypa/distlib/
"
SRC_URI="
https://github.com/pypa/distlib/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
"
LICENSE="PSF-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
IUSE="test"
RESTRICT="!test? ( test )"
# pypiserver is called as external executable
BDEPEND="
test? (
dev-python/pypiserver
)
"
src_prepare() {
local PATCHES=(
# use system pypiserver instead of bundled one
"${FILESDIR}/distlib-0.3.9-system-pypiserver.patch"
# https://github.com/pypa/distlib/commit/6286442857de9f734686d08f0e59ca8048ee357a
"${FILESDIR}/${P}-py314-test.patch"
# https://github.com/pypa/distlib/pull/256
"${FILESDIR}/${P}-py315.patch"
)
# make sure it's not used
rm tests/pypi-server-standalone.py || die
distutils-r1_src_prepare
}
python_test() {
local -x SKIP_ONLINE=1
local -x PYTHONHASHSEED=0
# disable system-site-packages -- distlib has no deps, and is very
# fragile to packages actually installed on the system
sed -i -e '/system-site-packages/s:true:false:' \
"${BUILD_DIR}/install${EPREFIX}/usr/pyvenv.cfg" || die
"${EPYTHON}" tests/test_all.py -v -x ||
die "Tests failed with ${EPYTHON}"
}

View File

@@ -0,0 +1,51 @@
From 53a497ae37b3220662ac177e9477e9551e4e37b0 Mon Sep 17 00:00:00 2001
From: Victor Stinner <vstinner@python.org>
Date: Wed, 14 Jan 2026 14:32:40 +0100
Subject: [PATCH] Update cache_from_source() for Python 3.15
The debug_override parameter of cache_from_source() is deprecated in
Python 3.14. The function docstring says:
The debug_override parameter is deprecated. If debug_override
is not None, a True value is the same as setting 'optimization'
to the empty string while a False value is equivalent to setting
'optimization' to '1'.
The parameter has been removed in Python 3.15.
Fixes #255
---
distlib/util.py | 6 +++++-
tests/test_util.py | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/distlib/util.py b/distlib/util.py
index 0d5bd7a..b700384 100644
--- a/distlib/util.py
+++ b/distlib/util.py
@@ -589,7 +589,11 @@ def ensure_dir(self, path):
self.dirs_created.add(path)
def byte_compile(self, path, optimize=False, force=False, prefix=None, hashed_invalidation=False):
- dpath = cache_from_source(path, not optimize)
+ if not optimize:
+ optimization = ''
+ else:
+ optimization = '1'
+ dpath = cache_from_source(path, optimization=optimization)
logger.info('Byte-compiling %s to %s', path, dpath)
if not self.dry_run:
if force or self.newer(path, dpath):
diff --git a/tests/test_util.py b/tests/test_util.py
index d8694a9..d4bb572 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -652,7 +652,7 @@ def test_is_writable(self):
def test_byte_compile(self):
path = os.path.join(self.workdir, 'hello.py')
- dpath = cache_from_source(path, True)
+ dpath = cache_from_source(path, optimization='')
self.fileop.write_text_file(path, 'print("Hello, world!")', 'utf-8')
self.fileop.byte_compile(path, optimize=False)
self.assertTrue(os.path.exists(dpath))

View File

@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1

View File

@@ -1,11 +1,11 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_VERIFY_REPO=https://github.com/pytest-dev/execnet
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -32,7 +32,7 @@ python_test() {
local EPYTEST_DESELECT=()
case ${EPYTHON} in
python3.1[34]t)
python3*t)
EPYTEST_DESELECT+=(
# https://github.com/pytest-dev/execnet/issues/306
testing/test_channel.py::TestChannelBasicBehaviour::test_channel_callback_remote_freed

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_VERIFY_REPO=https://github.com/tox-dev/filelock
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=standalone
PYPI_VERIFY_REPO=https://github.com/pypa/flit
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/spulec/freezegun
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,11 +1,11 @@
# Copyright 2022-2025 Gentoo Authors
# Copyright 2022-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
EAPI=8
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1

View File

@@ -1,10 +1,10 @@
# Copyright 2022-2025 Gentoo Authors
# Copyright 2022-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1
@@ -26,6 +26,7 @@ RDEPEND="
dev-python/hatchling[${PYTHON_USEDEP}]
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
EPYTEST_DESELECT=(

View File

@@ -1,10 +1,10 @@
# Copyright 2022-2025 Gentoo Authors
# Copyright 2022-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1
@@ -31,4 +31,5 @@ BDEPEND="
)
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( pypy3_11 python3_{11..14} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_15 python3_{13..15}t )
inherit distutils-r1

View File

@@ -1,10 +1,10 @@
# Copyright 2025 Gentoo Authors
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
CLI_COMPAT=( python3_{11..13} )
PYTHON_COMPAT=( "${CLI_COMPAT[@]}" pypy3_11 python3_14 python3_{13,14}t )
PYTHON_COMPAT=( "${CLI_COMPAT[@]}" pypy3_11 python3_{14..15} python3_{13..15}t )
PYTHON_REQ_USE="threads(+),sqlite"
inherit distutils-r1 optfeature
@@ -68,6 +68,15 @@ python_test() {
tests/cover/test_custom_reprs.py
)
case ${EPYTHON} in
python3.15*)
EPYTEST_DESELECT+=(
'hypothesis-python/tests/cover/test_lookup.py::test_resolves_forwardrefs_to_builtin_types[sentinel]'
'hypothesis-python/tests/cover/test_lookup.py::test_resolves_builtin_types[sentinel]'
)
;;
esac
local -x HYPOTHESIS_NO_PLUGINS=1
epytest -o filterwarnings= tests/{cover,pytest,quality}
}

View File

@@ -1,11 +1,11 @@
# Copyright 2020-2025 Gentoo Authors
# Copyright 2020-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pytest-dev/iniconfig
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,11 +1,11 @@
# Copyright 2022-2025 Gentoo Authors
# Copyright 2022-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
EAPI=8
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -27,6 +27,7 @@ BDEPEND="
app-arch/unzip
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_compile() {

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi
@@ -24,4 +24,5 @@ BDEPEND="
dev-python/setuptools-scm[${PYTHON_USEDEP}]
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest

View File

@@ -1,11 +1,11 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -23,6 +23,7 @@ RDEPEND="
dev-python/jaraco-text[${PYTHON_USEDEP}]
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
src_configure() {
@@ -35,8 +36,3 @@ src_configure() {
-e '/^dynamic =/d' \
pyproject.toml || die
}
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
}

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -102,6 +102,5 @@ python_test() {
local -x TZ=UTC
local -x AWS_DEFAULT_REGION=us-east-1
# -o timeout_func_only=true: bad interaction with pytest-rerunfailures and pytest-timeout leads to a permanent hang otherwise
epytest -m 'not network and not requires_docker' -o timeout_func_only=true
epytest -m 'not network and not requires_docker'
}

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_VERIFY_REPO=https://github.com/pypa/packaging
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_VERIFY_REPO=https://github.com/cpburnz/python-pathspec
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 pypi
@@ -25,10 +25,22 @@ RDEPEND="
>=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
distutils_enable_sphinx doc \
dev-python/sphinxcontrib-github-alt
EPYTEST_DESELECT=(
# flaky test on weaker arches
tests/test_performance.py
# requires zsh installed, not worth it
tests/test_replwrap.py::REPLWrapTestCase::test_zsh
# flaky
tests/test_env.py::TestCaseEnv::test_spawn_uses_env
# flaky & hangy
tests/test_socket.py::ExpectTestCase::test_interrupt
)
PATCHES=(
# https://github.com/pexpect/pexpect/pull/794
"${FILESDIR}/${P}-py313.patch"
@@ -44,22 +56,6 @@ src_test() {
distutils-r1_src_test
}
python_test() {
local EPYTEST_DESELECT=(
# flaky test on weaker arches
tests/test_performance.py
# requires zsh installed, not worth it
tests/test_replwrap.py::REPLWrapTestCase::test_zsh
# flaky
tests/test_env.py::TestCaseEnv::test_spawn_uses_env
# flaky & hangy
tests/test_socket.py::ExpectTestCase::test_interrupt
)
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
}
python_install_all() {
if use examples; then
dodoc -r examples

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_VERIFY_REPO=https://github.com/tox-dev/platformdirs
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pytest-dev/pluggy
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -25,4 +25,5 @@ BDEPEND="
dev-python/setuptools-scm[${PYTHON_USEDEP}]
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1
@@ -22,4 +22,5 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -84,6 +84,14 @@ python_test() {
tests/test_memleaks.py
)
case ${EPYTHON} in
python3.15*)
EPYTEST_DESELECT+=(
tests/test_process.py::TestProcess::test_rlimit_infinity_value
)
;;
esac
# Since we are running in an environment a bit similar to CI,
# let's skip the tests that are disabled for CI
local -x TRAVIS=1

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_PN=${PN^}
PYTHON_FULLY_TESTED=( python3_{11..14} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_FULLY_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_FULLY_TESTED[@]}" python3_15 python3_{13..15}t )
inherit distutils-r1 bash-completion-r1 pypi
@@ -40,6 +40,7 @@ EPYTEST_DESELECT=(
tests/test_html_formatter.py::test_ctags
)
EPYTEST_PLUGINS=()
EPYTEST_XDIST=1
distutils_enable_tests pytest

View File

@@ -1,10 +1,10 @@
# Copyright 2021-2025 Gentoo Authors
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -25,6 +25,7 @@ BDEPEND="
)
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
EPYTEST_DESELECT=(

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pytest-dev/pytest-asyncio
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 2023-2025 Gentoo Authors
# Copyright 2023-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi
@@ -23,4 +23,6 @@ RDEPEND="
>=dev-python/pytest-3.6[${PYTHON_USEDEP}]
"
EPYTEST_PLUGIN_LOAD_VIA_ENV=1
EPYTEST_PLUGINS=( "${PN}" )
distutils_enable_tests pytest

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/tommilligan/pytest-jobserver
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13..14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pytest-dev/pytest-mock
PYTHON_TESTED=( python3_{11..14} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_15 python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -31,15 +31,14 @@ BDEPEND="
)
"
EPYTEST_PLUGIN_LOAD_VIA_ENV=1
EPYTEST_PLUGINS=( "${PN}" )
EPYTEST_XDIST=1
distutils_enable_tests pytest
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local -x PYTEST_PLUGINS=pytest_timeout
if has_version "dev-python/pytest-cov[${PYTHON_USEDEP}]"; then
PYTEST_PLUGINS+=,pytest_cov.plugin
local EPYTEST_PLUGINS=( "${EPYTEST_PLUGINS[@]}" pytest-cov )
else
EPYTEST_DESELECT+=(
test_pytest_timeout.py::test_cov

View File

@@ -0,0 +1,64 @@
From 0c984478f39d7a01aa24c061f2581bdfd071cb6a Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <bruno@soliv.dev>
Date: Sun, 2 Nov 2025 10:18:21 -0300
Subject: [PATCH] Adapt test to also worth with pytest-main
---
testing/test_newhooks.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testing/test_newhooks.py b/testing/test_newhooks.py
index e3a8ac6f..9091ed31 100644
--- a/testing/test_newhooks.py
+++ b/testing/test_newhooks.py
@@ -115,7 +115,7 @@ def pytest_handlecrashitem(crashitem, report, sched):
res.stdout.fnmatch_lines_random(["*HOOK: pytest_handlecrashitem"])
res.stdout.fnmatch_lines(
[
- "FAILED test_handlecrashitem_one.py::test_b",
- "FAILED test_handlecrashitem_one.py::test_b",
+ "FAILED test_handlecrashitem_one.py::test_b*",
+ "FAILED test_handlecrashitem_one.py::test_b*",
]
)
From 44f4bea2652e06e7cd5d4a063aa2673b5ef701ee Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <nicoddemus@gmail.com>
Date: Tue, 11 Nov 2025 08:00:23 -0300
Subject: [PATCH] Fix CI for pytest 9.0+ (#1272)
---
testing/test_remote.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/testing/test_remote.py b/testing/test_remote.py
index 909f7ca2..ae82e2b7 100644
--- a/testing/test_remote.py
+++ b/testing/test_remote.py
@@ -378,6 +378,11 @@ def test_mainargv(request):
def test_remote_usage_prog(pytester: pytest.Pytester) -> None:
+ if pytest.version_tuple[:2] >= (9, 0):
+ get_optparser_expr = "get_config_parser.optparser"
+ else:
+ get_optparser_expr = "get_config_parser._getparser()"
+
pytester.makeconftest(
"""
import pytest
@@ -394,12 +399,12 @@ def pytest_configure(config):
"""
)
pytester.makepyfile(
- """
+ f"""
import sys
def test(get_config_parser, request):
- get_config_parser._getparser().error("my_usage_error")
- """
+ {get_optparser_expr}.error("my_usage_error")
+ """
)
result = pytester.runpytest_subprocess("-n1")

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pytest-dev/pytest-xdist
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -32,12 +32,16 @@ BDEPEND="
)
"
EPYTEST_PLUGINS=()
EPYTEST_PLUGIN_LOAD_VIA_ENV=1
EPYTEST_PLUGINS=( "${PN}" )
distutils_enable_tests pytest
python_test() {
# force loading necessary plugins in subprocesses
local -x PYTEST_PLUGINS=xdist.plugin,xdist.looponfail
PATCHES=(
# https://github.com/pytest-dev/pytest-xdist/commit/0c984478f39d7a01aa24c061f2581bdfd071cb6a
# https://github.com/pytest-dev/pytest-xdist/commit/44f4bea2652e06e7cd5d4a063aa2673b5ef701ee
"${FILESDIR}/${P}-pytest-9.patch"
)
python_test() {
epytest -o tmp_path_retention_count=1
}

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pytest-dev/pytest
PYTHON_TESTED=( python3_{11..14} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_15 python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -1,12 +1,12 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_NO_NORMALIZE=1
PYTHON_FULLY_TESTED=( python3_{10..13} pypy3 )
PYTHON_COMPAT=( "${PYTHON_FULLY_TESTED[@]}" pypy3_11 python3_13t python3_14 python3_14t )
PYTHON_FULLY_TESTED=( python3_{11..14} python3_{13..14}t )
PYTHON_COMPAT=( "${PYTHON_FULLY_TESTED[@]}" pypy3_11 python3_15 python3_15t )
inherit distutils-r1 pypi
@@ -40,6 +40,7 @@ PATCHES=(
"${FILESDIR}/python-dateutil-2.9.0-no-pytest-cov.patch"
)
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_prepare_all() {
@@ -57,6 +58,5 @@ python_test() {
)
fi
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
}

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_VERIFY_REPO=https://github.com/tox-dev/python-discovery
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi
@@ -45,6 +45,12 @@ python_test() {
tests/test_py_info_extra.py::test_satisfies_path_not_abs_basename_match
)
;;
python3.15)
EPYTEST_DESELECT+=(
# TODO
tests/test_discovery.py::test_predicate_with_fallback_specs
)
;;
esac
epytest

View File

@@ -20,6 +20,8 @@ DIST Python-3.14.4.tar.xz 23855332 BLAKE2B cb96ace0b3a0316ffc8f2fca1e9b67dc8df7d
DIST Python-3.14.4.tar.xz.sigstore 5219 BLAKE2B 5d4e076139082e525c2758a64ca2cc4c05c69e601ffc9c402d5a041f8b867ee5f37264ded3bfa014cc979ccd3c573c208d2321ac5a3be93b906116bd0d8a5c37 SHA512 ec41d0d25fa3cd87cf62adcbe6b9e575cecc49f947a64ca997aa792ed22d93ef1bbc4dc2848e365dfb43b6c447dcf47417f9c68a5881d0ede8750fece9f97a87
DIST Python-3.14.5rc1.tar.xz 23894408 BLAKE2B 7b894cc9fbc6df9255ad04aed506cc7751a8f59295a1d491e150731b34b2197802f3d12cc51c6412247c5a23c051f3f90ce69b969e0bc0a74cffb11e62de58e9 SHA512 67ede84d59046e3b413643449a7eced8cefcd908238b8a34d2ac38507d967201695c62c22464f1bfd51669daf306995262279c7bbfc5a25998ed867a3d743b38
DIST Python-3.14.5rc1.tar.xz.sigstore 5363 BLAKE2B ad8ed1f9076ce67c33b290cdb6e24846de1642ce2deece0ec42d8adca67e7b403a53f7d64064c8c9d6d7ce05f8f1a62f5069a2cc85721160902b98cfebd254f9 SHA512 26a9129b8df1d5b83f6d81bdc49c78a5f45542ff9e56a3ecfc5b9480b5a0e0ee44b2fd3d1dd7775458c9076b4b27d891f149f3b24304f2456b5a0c5615e6ea12
DIST Python-3.15.0b1.tar.xz 35178032 BLAKE2B 1bbfdeb373fa3a26b9d957084edc9bfb7f81ae579cd9bf9fba1a43a3bf409a2e01512c56c642eb47b6e1a3c0fe44f182d72a15498b90a75d424b6325d0fd97a1 SHA512 ce486f903aa8690f1725565c3fdc0034a983a60952a96a950fa7c89ab899a71cabed4a9252c497e0474f206f83ff02e2793cf975c345825324b85bced750c270
DIST Python-3.15.0b1.tar.xz.sigstore 5411 BLAKE2B a1697c5239559c6871d3299c3dfa77edf0319ee03be12f6b3bd0b424e05a81b19249a98a316e5e6f8d403b04392ba69910ab8cef4ed86cf0d4a92fe04501a651 SHA512 72a4e1cfd48ba7ead6d5896d1441cf8c0991549beb28bc546534c4e1296495c9874dc7941239f8f5ed833b038bd66437868fd121c89a123d62cad157b744a4c2
DIST python-gentoo-patches-3.11.11.tar.xz 10604 BLAKE2B 6be4c66b0458f7a7085aef976cff3dcb4d114ac0b64fb27327a5693e8d41a77f7eeed718b9c5a1b1961278235ee4cd43497aa3dc27e6e6bed65804b95f667a15 SHA512 ab8113a94949cead34d976179f80c3e0a6686bf2476079a74f97b4d08c24a237500dc7ee09dc3b0ec98d2fbcb138397c73d7e2252e617a957a13999e59115158
DIST python-gentoo-patches-3.11.14.tar.xz 15968 BLAKE2B 5bd091046feee03afd59a87b72c44b3a0874b23f89eb98020cc057f5651d31857721eb095bd056dae8bef85220dbe5aff2900cf8411dceb14e8775a4a2f09a93 SHA512 760df16f98c1a91164b43c13eb36073c74169321569791125fdad8682419b818736fe02e40c1aa1232a11081b1007c923a8fd2afd002eb4fdff0800da92d03e2
DIST python-gentoo-patches-3.11.15.tar.xz 15988 BLAKE2B 16e98450749ebd1c617acbb9aba380fff50a8f7dba19f3f99edd3bd387c1a5d61d78cbf493cf003dfe03d2be59374ad89077b39fe203059bbbb881ae02a72ea5 SHA512 b705c72a585e315eb3ba69ffbf2a80836f0fc894fa8ae2c22768e6aa8ac2a23aada5def3d2635193793f58e3da81f0f10281c47bd8e129e1fd2c9167d292265b
@@ -37,3 +39,4 @@ DIST python-gentoo-patches-3.14.3.tar.xz 8012 BLAKE2B a8106360a6c77e0e19ecdf55e9
DIST python-gentoo-patches-3.14.4.tar.xz 8012 BLAKE2B 07928ae9e2c057b75edabe287e0201a9aa35ddcfbb1b35c3729c25ccea707c343214ed82e0ad5df65a0994c0e263f7f50e8dd95ebdaae37210c14e1cc1f2d492 SHA512 8c8cf86842f42fa8634c0faee2c1e6dd51c621ae42d48300b0ab185d90653ad58e30c967a6b455e237303aa52d139a2980b948f8613725884d6aa0df016e07d8
DIST python-gentoo-patches-3.14.4_p1.tar.xz 9016 BLAKE2B 39bee4db44684a087b3bf6793a22d1655c2a90fabb56ea0421ded013cf53e66ac83cb3016d469f06c5d7cab7b8d22138bc4c1e01843a174299e1af0f88e5818c SHA512 a299212bd3d4a70c83a1efe1ec155f7b13829aa10aecf638de0889cf7b8ebe5227d3f14a1d51dac18fa4ae19b1060639490e61f2c1f52deadd40065c07b317f2
DIST python-gentoo-patches-3.14.5rc1.tar.xz 8436 BLAKE2B 527156383cba6288df15a0bb0718960ba2a30428a2367d014a11b22e598c63d2c912480e37b064233e05590d1112b6c3c4ac1fa9db392ac11a98b8ec54847d30 SHA512 8adb64ca0bc1c653fb04a71bd6b40415ae3ca4761edf578199c5cc1d1da392b239ca07af395114970467c8233027c5eefb4b869bcab4379d5a7310a286aaec53
DIST python-gentoo-patches-3.15.0b1.tar.xz 3420 BLAKE2B 266ada600b587ff430a21c38d7585fcdb2d320a4160dd8e93dac3a6517faa685eadda9a9b14b271c6380a78112c83f39fc30bbbece10bfc7e6cde2eba61103fa SHA512 9f42700e03051fbadf3b9e6f7163077ab6b8c1f406e5bfc99560b590dbbabe72e5b38cd8c16b21aec75c4e760af549bffef6d76e65f390d61cd8840894949565

View File

@@ -0,0 +1,75 @@
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_15t )
VERIFY_SIG_METHOD=sigstore
inherit python-r1 verify-sig
REAL_PV=${PV#0.}
MY_PV=${REAL_PV/_beta/b}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 2-3)t
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="Test modules from dev-lang/python"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz
https://distfiles.gentoo.org/pub/proj/python/patchsets/${PYVER%t}/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz.sigstore
)
"
S="${WORKDIR}/${MY_P}/Lib"
LICENSE="PSF-2"
SLOT="${PYVER}"
if [[ ${PV} != *_* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
# enable by default to help CI handle it (we have no additional deps)
IUSE="+python_targets_${PYTHON_COMPAT[0]}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
~dev-lang/python-${PV}:${PYVER}
"
BDEPEND="
${PYTHON_DEPS}
"
# https://www.python.org/downloads/metadata/sigstore/
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
fi
default
}
src_prepare() {
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
cd .. || die
default
}
src_install() {
python_setup
# keep in sync with TESTSUBDIRS in Makefile.pre.in
python_moduleinto "/usr/lib/python${PYVER}"
python_domodule test
python_moduleinto "/usr/lib/python${PYVER}/idlelib"
python_domodule idlelib/idle_test
}

View File

@@ -0,0 +1,60 @@
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_15t )
inherit git-r3 python-r1
PYVER="$(ver_cut 2-3)t"
PATCHSET="python-gentoo-patches-3.15.0b1"
DESCRIPTION="Test modules from dev-lang/python"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://distfiles.gentoo.org/pub/proj/python/patchsets/${PYVER%t}/${PATCHSET}.tar.xz
"
EGIT_REPO_URI="https://github.com/python/cpython.git"
EGIT_BRANCH=${PYVER%t}
S="${WORKDIR}/${P}/Lib"
LICENSE="PSF-2"
SLOT="${PYVER}"
# enable by default to help CI handle it (we have no additional deps)
IUSE="+python_targets_${PYTHON_COMPAT[0]}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
~dev-lang/python-${PV}:${PYVER}
"
BDEPEND="
${PYTHON_DEPS}
"
src_unpack() {
git-r3_src_unpack
default
}
src_prepare() {
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
cd .. || die
default
}
src_install() {
python_setup
# keep in sync with TESTSUBDIRS in Makefile.pre.in
python_moduleinto "/usr/lib/python${PYVER}"
python_domodule test
python_moduleinto "/usr/lib/python${PYVER}/idlelib"
python_domodule idlelib/idle_test
}

View File

@@ -0,0 +1,74 @@
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_15 )
VERIFY_SIG_METHOD=sigstore
inherit python-r1 verify-sig
MY_PV=${PV/_beta/b}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="Test modules from dev-lang/python"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://distfiles.gentoo.org/pub/proj/python/patchsets/${PYVER%t}/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.sigstore
)
"
S="${WORKDIR}/${MY_P}/Lib"
LICENSE="PSF-2"
SLOT="${PYVER}"
if [[ ${PV} != *_* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
# enable by default to help CI handle it (we have no additional deps)
IUSE="+python_targets_${PYTHON_COMPAT[0]}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
~dev-lang/python-${PV}:${PYVER}
"
BDEPEND="
${PYTHON_DEPS}
"
# https://www.python.org/downloads/metadata/sigstore/
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
fi
default
}
src_prepare() {
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
cd .. || die
default
}
src_install() {
python_setup
# keep in sync with TESTSUBDIRS in Makefile.pre.in
python_moduleinto "/usr/lib/python${PYVER}"
python_domodule test
python_moduleinto "/usr/lib/python${PYVER}/idlelib"
python_domodule idlelib/idle_test
}

View File

@@ -0,0 +1,60 @@
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_15 )
inherit git-r3 python-r1
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-3.15.0b1"
DESCRIPTION="Test modules from dev-lang/python"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://distfiles.gentoo.org/pub/proj/python/patchsets/${PYVER%t}/${PATCHSET}.tar.xz
"
EGIT_REPO_URI="https://github.com/python/cpython.git"
EGIT_BRANCH=${PYVER}
S="${WORKDIR}/${P}/Lib"
LICENSE="PSF-2"
SLOT="${PYVER}"
# enable by default to help CI handle it (we have no additional deps)
IUSE="+python_targets_${PYTHON_COMPAT[0]}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
~dev-lang/python-${PV}:${PYVER}
"
BDEPEND="
${PYTHON_DEPS}
"
src_unpack() {
git-r3_src_unpack
default
}
src_prepare() {
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
cd .. || die
default
}
src_install() {
python_setup
# keep in sync with TESTSUBDIRS in Makefile.pre.in
python_moduleinto "/usr/lib/python${PYVER}"
python_domodule test
python_moduleinto "/usr/lib/python${PYVER}/idlelib"
python_domodule idlelib/idle_test
}

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pypa/setuptools-scm
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -8,7 +8,7 @@ EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( python3_{11..14} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_15 python3_{13..15}t )
PYTHON_REQ_USE="xml(+)"
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -19,23 +19,11 @@ SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
distutils_enable_sphinx documentation --no-autodoc
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_test() {
local EPYTEST_DESELECT=(
# requires USE=gdb on CPython, no point in forcing the dep
# also missing on PyPy
'test_six.py::test_move_items[dbm_ndbm]'
)
case ${EPYTHON} in
python3.13*)
EPYTEST_DESELECT+=(
'test_six.py::test_move_items[tkinter_tix]'
)
;;
esac
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
}
EPYTEST_DESELECT=(
# requires USE=gdb on CPython, no point in forcing the dep
# also missing on PyPy
'test_six.py::test_move_items[dbm_ndbm]'
)

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1
@@ -25,8 +25,20 @@ LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_test() {
local EPYTEST_DESELECT=()
case ${EPYTHON} in
python3.15*)
EPYTEST_DESELECT+=(
# changes in pprint(). yes, seriously.
tests/sortedcollection.py::tests.sortedcollection.SortedCollection
)
;;
esac
epytest --ignore docs/conf.py
}

View File

@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -1,9 +1,9 @@
# Copyright 2024-2025 Gentoo Authors
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13..14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit python-r1
@@ -45,4 +45,10 @@ RDEPEND="
$(python_gen_cond_dep '
dev-python/python-tests:3.14t
' python3_14t)
$(python_gen_cond_dep '
dev-python/python-tests:3.15
' python3_15)
$(python_gen_cond_dep '
dev-python/python-tests:3.15t
' python3_15t)
"

View File

@@ -1,10 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1
@@ -23,5 +23,6 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
distutils_enable_sphinx doc

View File

@@ -1,10 +1,10 @@
# Copyright 2021-2025 Gentoo Authors
# Copyright 2021-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1
@@ -28,6 +28,7 @@ BDEPEND="
)
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_test() {

View File

@@ -5,7 +5,7 @@
EAPI=8
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_VERIFY_REPO=https://github.com/pypa/trove-classifiers
PYTHON_COMPAT=( pypy3_11 python3_{11..14} python3_{13,14}t )
PYTHON_COMPAT=( pypy3_11 python3_{11..15} python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -0,0 +1,28 @@
From aa81d37f98c3322d535a7d0c8dd093870f0fb5ef Mon Sep 17 00:00:00 2001
From: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Date: Thu, 18 Sep 2025 21:03:16 -0700
Subject: [PATCH] fix test on 3.14
---
src/test_typing_extensions.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py
index 27f4059c..f07e1eb0 100644
--- a/src/test_typing_extensions.py
+++ b/src/test_typing_extensions.py
@@ -4508,8 +4508,12 @@ def _make_td(future, class_name, annos, base, extra_names=None):
child = _make_td(
child_future, "Child", {"child": "int"}, "Base", {"Base": base}
)
- base_anno = typing.ForwardRef("int", module="builtins") if base_future else int
- child_anno = typing.ForwardRef("int", module="builtins") if child_future else int
+ if sys.version_info >= (3, 14):
+ base_anno = typing.ForwardRef("int", module="builtins", owner=base) if base_future else int
+ child_anno = typing.ForwardRef("int", module="builtins", owner=child) if child_future else int
+ else:
+ base_anno = typing.ForwardRef("int", module="builtins") if base_future else int
+ child_anno = typing.ForwardRef("int", module="builtins") if child_future else int
self.assertEqual(base.__annotations__, {'base': base_anno})
self.assertEqual(
child.__annotations__, {'child': child_anno, 'base': base_anno}

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_VERIFY_REPO=https://github.com/python/typing_extensions
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi
@@ -28,9 +28,40 @@ BDEPEND="
)
"
distutils_enable_tests unittest
# TODO: switch back to unittests once we don't need deselects
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
PATCHES=(
# https://github.com/python/typing_extensions/pull/683
"${FILESDIR}/${P}-py314-test.patch"
)
python_test() {
local EPYTEST_DESELECT=()
case ${EPYTHON} in
pypy3.11)
EPYTEST_DESELECT+=(
src/test_typing_extensions.py::NamedTupleTests::test_same_as_typing_NamedTuple
)
;;
python3.15*)
EPYTEST_DESELECT+=(
src/test_typing_extensions.py::AllTests::test_alias_names_still_exist
src/test_typing_extensions.py::AllTests::test_all_names_in___all__
src/test_typing_extensions.py::AllTests::test_typing_extensions_includes_standard
src/test_typing_extensions.py::GetTypeHintTests::test_annotation_and_optional_default
src/test_typing_extensions.py::NoExtraItemsTests::test_constructor
src/test_typing_extensions.py::NoExtraItemsTests::test_repr
src/test_typing_extensions.py::TestSentinels::test_sentinel_deprecated
src/test_typing_extensions.py::TestSentinels::test_sentinel_deprecated_explicit_repr
src/test_typing_extensions.py::TypeAliasTypeTests::test_cannot_set_attributes
src/test_typing_extensions.py::TypeVarTupleTests::test_repr
src/test_typing_extensions.py::UnpackTests::test_repr
)
;;
esac
cd src || die
eunittest
epytest
}

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYPI_VERIFY_REPO=https://github.com/pypa/setuptools-scm
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=hatchling
PYPI_VERIFY_REPO=https://github.com/pypa/virtualenv
PYTHON_TESTED=( python3_{11..14} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_15 python3_{13..15}t )
inherit distutils-r1 pypi

View File

@@ -1,10 +1,10 @@
# Copyright 2022-2025 Gentoo Authors
# Copyright 2022-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1
@@ -28,6 +28,7 @@ BDEPEND="
)
"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest
python_test() {

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_VERIFY_REPO=https://github.com/pypa/wheel
PYTHON_COMPAT=( python3_{11..14} python3_{13,14}t pypy3_11 )
PYTHON_COMPAT=( python3_{11..15} python3_{13..15}t pypy3_11 )
inherit distutils-r1 pypi

View File

@@ -1036,6 +1036,8 @@ distutils_wheel_install() {
-o -path '*.dist-info/license_files' \
-o -path '*.dist-info/licenses/*' \
-o -path '*.dist-info/licenses' \
-o -path '*.dist-info/sboms/*' \
-o -path '*.dist-info/sboms' \
-o -path '*.dist-info/zip-safe' \
\) -delete || die

View File

@@ -40,8 +40,8 @@ inherit multiprocessing toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3_11
python3_{13..14}t
python3_{11..14}
python3_{13..15}t
python3_{11..15}
)
readonly _PYTHON_ALL_IMPLS
@@ -81,7 +81,7 @@ _python_verify_patterns() {
local impl pattern
for pattern; do
case ${pattern} in
-[23]|3.[89]|3.1[0-4])
-[23]|3.[89]|3.1[0-5])
continue
;;
esac
@@ -137,7 +137,7 @@ _python_set_impls() {
# please keep them in sync with _PYTHON_ALL_IMPLS
# and _PYTHON_HISTORICAL_IMPLS
case ${i} in
pypy3_11|python3_9|python3_1[1-4]|python3_1[3-4]t)
pypy3_11|python3_9|python3_1[1-5]|python3_1[3-5]t)
;;
jython2_7|pypy|pypy1_[89]|pypy2_0|pypy3|python2_[5-7]|python3_[1-9]|python3_10)
obsolete+=( "${i}" )
@@ -230,7 +230,7 @@ _python_impl_matches() {
fi
return 0
;;
3.[89]|3.1[0-4])
3.[89]|3.1[0-5])
[[ ${impl%t} == python${pattern/./_} || ${impl} == pypy${pattern/./_} ]] &&
return 0
;;
@@ -1561,6 +1561,15 @@ epytest() {
args+=(
"--timeout=${EPYTEST_TIMEOUT}"
)
if [[ -n ${EPYTEST_RERUNS} ]]; then
# This option helps with hangs in some cases when these plugins are used together.
# https://github.com/pytest-dev/pytest-timeout/issues/18
# https://github.com/pytest-dev/pytest-rerunfailures/issues/99
args+=(
-o timeout_func_only=true
)
fi
fi
if [[ ${EPYTEST_XDIST} ]]; then

View File

@@ -64,7 +64,7 @@ tmpfile=$(mktemp)
inherit multilib python-utils-r1
for minor in {11..14} {13..14}t; do
for minor in {11..15} {13..15}t; do
ebegin "Testing python3.${minor}"
eindent
test_var EPYTHON "python3_${minor}" "python3.${minor}"

View File

@@ -449,6 +449,8 @@ dev-lang/python-exec python_targets_python3_13
dev-lang/python-exec python_targets_python3_13t
dev-lang/python-exec python_targets_python3_14
dev-lang/python-exec python_targets_python3_14t
dev-lang/python-exec python_targets_python3_15
dev-lang/python-exec python_targets_python3_15t
dev-lang/python-exec python_targets_pypy3_11
# Zac Medico <zmedico@gentoo.org> (2010-10-20)

View File

@@ -6,6 +6,12 @@
# New entries go on top.
# Michał Górny <mgorny@gentoo.org> (2026-05-07)
# Force-enable all PYTHON_TARGETS for python-exec to avoid using private
# API. Please remember to keep it in sync with python_targets.desc.
dev-lang/python-exec -python_targets_python3_15
dev-lang/python-exec -python_targets_python3_15t
# Michael Orlitzky <mjo@gentoo.org> (2026-05-04)
# This needs an upgrade to >=dev-cpp/eigen-5.0.1 and I don't
# need the extra headache right now.

View File

@@ -4,6 +4,13 @@
# This file is only for generic masks. For arch-specific masks (i.e.
# mask everywhere, unmask on arch/*) use arch/base.
# Michał Górny <mgorny@gentoo.org> (2026-05-07)
# Python implementations without keywords.
python_targets_python3_15
python_single_target_python3_15
python_targets_python3_15t
python_single_target_python3_15t
# Michał Górny <mgorny@gentoo.org> (2026-04-18)
# LLVM slots with no keyworded releases yet.
llvm_slot_23

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# New entries go on top.
@@ -19,6 +19,10 @@ ruby_targets_ruby40
# Michał Górny <mgorny@gentoo.org> (2024-05-08)
# Python implementations without stable keywords.
python_targets_python3_15
python_single_target_python3_15
python_targets_python3_15t
python_single_target_python3_15t
python_targets_python3_14t
python_single_target_python3_14t
python_targets_python3_13t

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# This file contains descriptions of PYTHON_SINGLE_TARGET USE_EXPAND flags.
@@ -9,4 +9,6 @@ python3_13 - Build for Python 3.13 only
python3_13t - Build for Python 3.13 freethreading only
python3_14 - Build for Python 3.14 only
python3_14t - Build for Python 3.14 freethreading only
python3_15 - Build for Python 3.15 only
python3_15t - Build for Python 3.15 freethreading only
pypy3_11 - Build for PyPy3.11 only

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# This file contains descriptions of PYTHON_TARGETS USE_EXPAND flags.
@@ -9,4 +9,6 @@ python3_13 - Build with Python 3.13
python3_13t - Build with Python 3.13 freethreading
python3_14 - Build with Python 3.14
python3_14t - Build with Python 3.14 freethreading
python3_15 - Build with Python 3.15
python3_15t - Build with Python 3.15 freethreading
pypy3_11 - Build with PyPy3.11