commit: beee75e768792dde4c558419375a72210203a608 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Mar 19 06:52:30 2025 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Wed Mar 19 15:39:14 2025 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=beee75e7
python: Fix misfired PythonCompatUpdate when newest PYTHON_COMPAT is *t Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/732 Fixes: b86872a25614ca16177ca161638d8a0837cbda37 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> src/pkgcheck/checks/python.py | 2 +- .../PythonCompatUpdate/PythonCompatUpdate-4.ebuild | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/python.py b/src/pkgcheck/checks/python.py index a075fba6..5969f136 100644 --- a/src/pkgcheck/checks/python.py +++ b/src/pkgcheck/checks/python.py @@ -658,7 +658,7 @@ class PythonCompatCheck(Check): all_targets = ( f"python{x.slot.replace('.', '_')}" for x in deps - if x.key == "dev-lang/python" and x.slot is not None + if x.key == "dev-lang/python" and x.slot is not None and not x.slot.endswith("t") ) latest_target = max(all_targets, key=self.sorter) except ValueError: diff --git a/testdata/repos/python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-4.ebuild b/testdata/repos/python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-4.ebuild new file mode 100644 index 00000000..a57c1d47 --- /dev/null +++ b/testdata/repos/python/PythonCompatCheck/PythonCompatUpdate/PythonCompatUpdate-4.ebuild @@ -0,0 +1,11 @@ +EAPI=7 +PYTHON_COMPAT=( python3_{7..10} python3_13t pypy3 pypy3_11 ) + +inherit python-any-r1 + +DESCRIPTION="Ebuild with potential PYTHON_COMPAT updates" +HOMEPAGE="https://github.com/pkgcore/pkgcheck" +LICENSE="BSD" +SLOT="0" + +DEPEND="${PYTHON_DEPS}"
