From d2dbb52b8bdc68d9854caa09d7b550315b98be96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 21 Oct 2024 17:31:46 +0200
Subject: [PATCH 1/3] testdata: Use a more realistic python-any-r1
 implementation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 testdata/repos/python/eclass/python-any-r1.eclass | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/testdata/repos/python/eclass/python-any-r1.eclass b/testdata/repos/python/eclass/python-any-r1.eclass
index 1066a5ade..8cfc2f5c2 100644
--- a/testdata/repos/python/eclass/python-any-r1.eclass
+++ b/testdata/repos/python/eclass/python-any-r1.eclass
@@ -12,16 +12,14 @@
 
 _python_set_impls() {
 	local i slot
-	local -a use
+	PYTHON_DEPS="|| ("
 	for i in "${PYTHON_COMPAT[@]}"; do
 		slot=${i#python}
 		slot=${slot/_/.}
-		use+=( "python_targets_${i}" )
-		PYTHON_DEPS+=" python_targets_${i}? ( dev-lang/python:${slot} )"
+		PYTHON_DEPS+=" dev-lang/python:${slot}"
 	done
-	IUSE+=" ${use[@]}"
-	PYTHON_REQUIRED_USE="|| ( ${use[@]} )"
-	PYTHON_USEDEP=$(IFS=","; echo "${use[*]}")
+	PYTHON_DEPS+=" )"
+	PYTHON_REQUIRED_USE='I-DO-NOT-EXIST-IN-PYTHON-ANY-R1'
 }
 _python_set_impls
 

From ca7e2336e97faf06081619e267ef388c1c1c4efa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 21 Oct 2024 17:24:33 +0200
Subject: [PATCH 2/3] testdata: Add pypy3 to PYTHON_COMPAT in test ebuilds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 .../PythonCheck/DistutilsNonPEP517Build/fix.patch   |  2 +-
 .../DistutilsNonPEP517Build-0.ebuild                |  2 +-
 .../PythonAnyMismatchedDepHasVersionCheck-0.ebuild  |  2 +-
 .../PythonAnyMismatchedDepHasVersionCheck-1.ebuild  |  2 +-
 .../PythonAnyMismatchedUseHasVersionCheck-0.ebuild  |  2 +-
 .../PythonAnyMismatchedUseHasVersionCheck-1.ebuild  |  2 +-
 .../PythonAnyMismatchedUseHasVersionCheck-2.ebuild  |  2 +-
 .../PythonHasVersionMissingPythonUseDep-0.ebuild    |  2 +-
 .../PythonHasVersionUsage-0.ebuild                  |  2 +-
 .../PythonHasVersionUsage-1.ebuild                  |  2 +-
 .../PythonMissingDeps/PythonMissingDeps-0.ebuild    |  2 +-
 .../PythonMissingDeps/PythonMissingDeps-1.ebuild    |  2 +-
 .../PythonMissingDeps/PythonMissingDeps-2.ebuild    |  2 +-
 .../PythonMissingSCMDependency-0.ebuild             |  2 +-
 .../python/dev-python/pypy3/pypy-7.3.17.ebuild      |  6 ++++++
 testdata/repos/python/eclass/python-any-r1.eclass   | 13 ++++++++++---
 testdata/repos/python/eclass/python-r1.eclass       | 13 ++++++++++---
 .../repos/python/eclass/python-single-r1.eclass     | 13 ++++++++++---
 18 files changed, 50 insertions(+), 23 deletions(-)
 create mode 100644 testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild

diff --git a/testdata/data/repos/python/PythonCheck/DistutilsNonPEP517Build/fix.patch b/testdata/data/repos/python/PythonCheck/DistutilsNonPEP517Build/fix.patch
index 6ad28c31b..d4e50d37b 100644
--- a/testdata/data/repos/python/PythonCheck/DistutilsNonPEP517Build/fix.patch
+++ b/testdata/data/repos/python/PythonCheck/DistutilsNonPEP517Build/fix.patch
@@ -5,6 +5,6 @@ diff -Naur python/PythonCheck/DistutilsNonPEP517Build/DistutilsNonPEP517Build-0.
  EAPI=7
  
 +DISTUTILS_USE_PEP517=setuptools
- PYTHON_COMPAT=( python3_10 )
+ PYTHON_COMPAT=( pypy3 python3_10 )
  
  inherit distutils-r1
diff --git a/testdata/repos/python/PythonCheck/DistutilsNonPEP517Build/DistutilsNonPEP517Build-0.ebuild b/testdata/repos/python/PythonCheck/DistutilsNonPEP517Build/DistutilsNonPEP517Build-0.ebuild
index 03ff29371..d2e833ec2 100644
--- a/testdata/repos/python/PythonCheck/DistutilsNonPEP517Build/DistutilsNonPEP517Build-0.ebuild
+++ b/testdata/repos/python/PythonCheck/DistutilsNonPEP517Build/DistutilsNonPEP517Build-0.ebuild
@@ -1,6 +1,6 @@
 EAPI=7
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit distutils-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-0.ebuild b/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-0.ebuild
index a70a4d3e5..9a6a57ee4 100644
--- a/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-0.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-1.ebuild b/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-1.ebuild
index 2652cf8c1..bd81efe2a 100644
--- a/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-1.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonAnyMismatchedDepHasVersionCheck/PythonAnyMismatchedDepHasVersionCheck-1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-0.ebuild b/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-0.ebuild
index e1b1c707e..3279e62b9 100644
--- a/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-0.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-1.ebuild b/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-1.ebuild
index 616bcd955..48c00f4dc 100644
--- a/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-1.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-2.ebuild b/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-2.ebuild
index 0f011b363..27e72e883 100644
--- a/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-2.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonAnyMismatchedUseHasVersionCheck/PythonAnyMismatchedUseHasVersionCheck-2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonHasVersionMissingPythonUseDep/PythonHasVersionMissingPythonUseDep-0.ebuild b/testdata/repos/python/PythonCheck/PythonHasVersionMissingPythonUseDep/PythonHasVersionMissingPythonUseDep-0.ebuild
index 24ebb8780..5e5ff7f36 100644
--- a/testdata/repos/python/PythonCheck/PythonHasVersionMissingPythonUseDep/PythonHasVersionMissingPythonUseDep-0.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonHasVersionMissingPythonUseDep/PythonHasVersionMissingPythonUseDep-0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-0.ebuild b/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-0.ebuild
index face1460c..02ef25e02 100644
--- a/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-0.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-1.ebuild b/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-1.ebuild
index 240f53648..87ff62248 100644
--- a/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-1.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonHasVersionUsage/PythonHasVersionUsage-1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit python-any-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-0.ebuild b/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-0.ebuild
index 236182e93..1b5b1fd4c 100644
--- a/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-0.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-0.ebuild
@@ -1,5 +1,5 @@
 EAPI=7
-PYTHON_COMPAT=( python3_9 )
+PYTHON_COMPAT=( pypy3 python3_9 )
 
 inherit python-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-1.ebuild b/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-1.ebuild
index 5c2d85fbf..191d49742 100644
--- a/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-1.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-1.ebuild
@@ -2,7 +2,7 @@ EAPI=8
 
 DISTUTILS_OPTIONAL=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit distutils-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-2.ebuild b/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-2.ebuild
index 73d59a277..60c7b3df0 100644
--- a/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-2.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonMissingDeps/PythonMissingDeps-2.ebuild
@@ -2,7 +2,7 @@ EAPI=8
 
 DISTUTILS_OPTIONAL=1
 DISTUTILS_USE_PEP517=no
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit distutils-r1
 
diff --git a/testdata/repos/python/PythonCheck/PythonMissingSCMDependency/PythonMissingSCMDependency-0.ebuild b/testdata/repos/python/PythonCheck/PythonMissingSCMDependency/PythonMissingSCMDependency-0.ebuild
index 79a8a8dfc..f793e70e9 100644
--- a/testdata/repos/python/PythonCheck/PythonMissingSCMDependency/PythonMissingSCMDependency-0.ebuild
+++ b/testdata/repos/python/PythonCheck/PythonMissingSCMDependency/PythonMissingSCMDependency-0.ebuild
@@ -1,7 +1,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_10 )
+PYTHON_COMPAT=( pypy3 python3_10 )
 
 inherit distutils-r1
 
diff --git a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild b/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
new file mode 100644
index 000000000..5c7e964e7
--- /dev/null
+++ b/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
@@ -0,0 +1,6 @@
+EAPI=8
+
+DESCRIPTION="Stub ebuild for pypy3 interpreter"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="0/pypy310"
diff --git a/testdata/repos/python/eclass/python-any-r1.eclass b/testdata/repos/python/eclass/python-any-r1.eclass
index 8cfc2f5c2..68c9774cb 100644
--- a/testdata/repos/python/eclass/python-any-r1.eclass
+++ b/testdata/repos/python/eclass/python-any-r1.eclass
@@ -14,9 +14,16 @@ _python_set_impls() {
 	local i slot
 	PYTHON_DEPS="|| ("
 	for i in "${PYTHON_COMPAT[@]}"; do
-		slot=${i#python}
-		slot=${slot/_/.}
-		PYTHON_DEPS+=" dev-lang/python:${slot}"
+		case ${i} in
+			python*)
+				slot=${i#python}
+				slot=${slot/_/.}
+				PYTHON_DEPS+=" dev-lang/python:${slot}"
+				;;
+			pypy3)
+				PYTHON_DEPS+=" dev-python/pypy3:="
+				;;
+		esac
 	done
 	PYTHON_DEPS+=" )"
 	PYTHON_REQUIRED_USE='I-DO-NOT-EXIST-IN-PYTHON-ANY-R1'
diff --git a/testdata/repos/python/eclass/python-r1.eclass b/testdata/repos/python/eclass/python-r1.eclass
index 9646b3a35..e33047cad 100644
--- a/testdata/repos/python/eclass/python-r1.eclass
+++ b/testdata/repos/python/eclass/python-r1.eclass
@@ -14,10 +14,17 @@ _python_set_impls() {
 	local i slot
 	local -a use
 	for i in "${PYTHON_COMPAT[@]}"; do
-		slot=${i#python}
-		slot=${slot/_/.}
 		use+=( "python_targets_${i}" )
-		PYTHON_DEPS+=" python_targets_${i}? ( dev-lang/python:${slot} )"
+		case ${i} in
+			python*)
+				slot=${i#python}
+				slot=${slot/_/.}
+				PYTHON_DEPS+=" python_targets_${i}? ( dev-lang/python:${slot} )"
+				;;
+			pypy3)
+				PYTHON_DEPS+=" python_targets_${i}? ( dev-python/pypy3:= )"
+				;;
+		esac
 	done
 	IUSE+=" ${use[@]}"
 	PYTHON_REQUIRED_USE="|| ( ${use[@]} )"
diff --git a/testdata/repos/python/eclass/python-single-r1.eclass b/testdata/repos/python/eclass/python-single-r1.eclass
index e16b8a931..a7049ac06 100644
--- a/testdata/repos/python/eclass/python-single-r1.eclass
+++ b/testdata/repos/python/eclass/python-single-r1.eclass
@@ -14,10 +14,17 @@ _python_set_impls() {
 	local i slot
 	local -a use use_deps
 	for i in "${PYTHON_COMPAT[@]}"; do
-		slot=${i#python}
-		slot=${slot/_/.}
 		use+=( "python_single_target_${i}" )
-		PYTHON_DEPS+=" python_single_target_${i}? ( dev-lang/python:${slot} )"
+		case ${i} in
+			python*)
+				slot=${i#python}
+				slot=${slot/_/.}
+				PYTHON_DEPS+=" python_single_target_${i}? ( dev-lang/python:${slot} )"
+				;;
+			pypy3)
+				PYTHON_DEPS+=" python_single_target_${i}? ( dev-python/pypy3:= )"
+				;;
+		esac
 	done
 	IUSE+=" ${use[@]}"
 	PYTHON_REQUIRED_USE="^^ ( ${use[@]} )"

From be1d2e8f6866a2fce09f2bc091291fe29d427b74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 21 Oct 2024 19:02:41 +0200
Subject: [PATCH 3/3] python: Support dev-lang/pypy package
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 src/pkgcheck/checks/python.py                               | 2 +-
 testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild  | 6 ++++++
 .../pypy/pypy-3.10.7.3.17.ebuild}                           | 2 +-
 testdata/repos/python/eclass/python-any-r1.eclass           | 2 +-
 testdata/repos/python/eclass/python-r1.eclass               | 2 +-
 testdata/repos/python/eclass/python-single-r1.eclass        | 2 +-
 6 files changed, 11 insertions(+), 5 deletions(-)
 create mode 100644 testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
 rename testdata/repos/python/{dev-python/pypy3/pypy-7.3.17.ebuild => dev-lang/pypy/pypy-3.10.7.3.17.ebuild} (82%)

diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py
index 2c46885ad..bacbdb5af 100644
--- a/src/pkgcheck/checks/python.py
+++ b/src/pkgcheck/checks/python.py
@@ -48,7 +48,7 @@ def get_python_eclass(pkg):
 
 
 def is_python_interpreter(pkg):
-    if pkg.key == "dev-lang/python":
+    if pkg.key in ("dev-lang/pypy", "dev-lang/python"):
         # ignore python:2.7 deps since they are being phased out from eclass
         # support
         return pkg.slot is None or not pkg.slot.startswith("2")
diff --git a/testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild b/testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
new file mode 100644
index 000000000..36ab208dc
--- /dev/null
+++ b/testdata/repos/python/dev-lang/pypy/pypy-2.7.7.3.17.ebuild
@@ -0,0 +1,6 @@
+EAPI=8
+
+DESCRIPTION="Stub ebuild for pypy interpreter"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="2.7/1234"
diff --git a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild b/testdata/repos/python/dev-lang/pypy/pypy-3.10.7.3.17.ebuild
similarity index 82%
rename from testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
rename to testdata/repos/python/dev-lang/pypy/pypy-3.10.7.3.17.ebuild
index 5c7e964e7..6d32fa2f3 100644
--- a/testdata/repos/python/dev-python/pypy3/pypy-7.3.17.ebuild
+++ b/testdata/repos/python/dev-lang/pypy/pypy-3.10.7.3.17.ebuild
@@ -3,4 +3,4 @@ EAPI=8
 DESCRIPTION="Stub ebuild for pypy3 interpreter"
 HOMEPAGE="https://github.com/pkgcore/pkgcheck"
 LICENSE="BSD"
-SLOT="0/pypy310"
+SLOT="3.10/pypy310-1234"
diff --git a/testdata/repos/python/eclass/python-any-r1.eclass b/testdata/repos/python/eclass/python-any-r1.eclass
index 68c9774cb..56aa329c2 100644
--- a/testdata/repos/python/eclass/python-any-r1.eclass
+++ b/testdata/repos/python/eclass/python-any-r1.eclass
@@ -21,7 +21,7 @@ _python_set_impls() {
 				PYTHON_DEPS+=" dev-lang/python:${slot}"
 				;;
 			pypy3)
-				PYTHON_DEPS+=" dev-python/pypy3:="
+				PYTHON_DEPS+=" >=dev-lang/pypy-3.10:="
 				;;
 		esac
 	done
diff --git a/testdata/repos/python/eclass/python-r1.eclass b/testdata/repos/python/eclass/python-r1.eclass
index e33047cad..0bac0d92c 100644
--- a/testdata/repos/python/eclass/python-r1.eclass
+++ b/testdata/repos/python/eclass/python-r1.eclass
@@ -22,7 +22,7 @@ _python_set_impls() {
 				PYTHON_DEPS+=" python_targets_${i}? ( dev-lang/python:${slot} )"
 				;;
 			pypy3)
-				PYTHON_DEPS+=" python_targets_${i}? ( dev-python/pypy3:= )"
+				PYTHON_DEPS+=" python_targets_${i}? ( >=dev-lang/pypy-3.10:= )"
 				;;
 		esac
 	done
diff --git a/testdata/repos/python/eclass/python-single-r1.eclass b/testdata/repos/python/eclass/python-single-r1.eclass
index a7049ac06..5a8debca1 100644
--- a/testdata/repos/python/eclass/python-single-r1.eclass
+++ b/testdata/repos/python/eclass/python-single-r1.eclass
@@ -22,7 +22,7 @@ _python_set_impls() {
 				PYTHON_DEPS+=" python_single_target_${i}? ( dev-lang/python:${slot} )"
 				;;
 			pypy3)
-				PYTHON_DEPS+=" python_single_target_${i}? ( dev-python/pypy3:= )"
+				PYTHON_DEPS+=" python_single_target_${i}? ( >=dev-lang/pypy-3.10:= )"
 				;;
 		esac
 	done
