From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2C4441584AD for ; Fri, 02 May 2025 04:21:41 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 196E3343082 for ; Fri, 02 May 2025 04:21:41 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 9C06C1103DE; Fri, 02 May 2025 04:21:24 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 8C36B1103DE for ; Fri, 02 May 2025 04:21:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3DFAD342FEA for ; Fri, 02 May 2025 04:21:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7DCF82736 for ; Fri, 02 May 2025 04:21:21 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1746159001.d133f3d0eb162f6d6e1385f9c96f9814315cd9c9.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/, eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/python-utils-r1.eclass eclass/tests/python-utils-r1.sh X-VCS-Directories: eclass/tests/ eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: d133f3d0eb162f6d6e1385f9c96f9814315cd9c9 X-VCS-Branch: master Date: Fri, 02 May 2025 04:21:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: dcf3d4fc-2df6-43b7-8b16-424f5fce790f X-Archives-Hash: c012fecebde417a9ae639f9fae8f8e72 commit: d133f3d0eb162f6d6e1385f9c96f9814315cd9c9 Author: Michał Górny gentoo org> AuthorDate: Fri May 2 04:10:01 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri May 2 04:10:01 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d133f3d0 python-utils-r1.eclass: Fix matching pattern list starting with 3.10 Closes: https://bugs.gentoo.org/955213 Fixes: 92cf8fae5081 (Disable Python 3.10 / PyPy 3.10 targets) Signed-off-by: Michał Górny gentoo.org> eclass/python-utils-r1.eclass | 3 ++- eclass/tests/python-utils-r1.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 860250cbe1eb..ef05a58e1b13 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -208,6 +208,8 @@ _python_impl_matches() { local impl=${1/./_} pattern shift + # note: do not add "return 1" below, the function is supposed + # to iterate until it matches something for pattern; do case ${pattern} in -2|python2*|pypy) @@ -229,7 +231,6 @@ _python_impl_matches() { return 0 ;; 3.10) - return 1 ;; 3.8|3.9|3.1[1-3]) [[ ${impl%t} == python${pattern/./_} || ${impl} == pypy${pattern/./_} ]] && diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index eb5201bf413c..09de934e703d 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -212,6 +212,15 @@ test_is "_python_impl_matches python3_12 3.12" 0 test_is "_python_impl_matches pypy3_11 3.10" 1 test_is "_python_impl_matches pypy3_11 3.11" 0 test_is "_python_impl_matches pypy3_11 3.12" 1 +# https://bugs.gentoo.org/95521 +test_is "_python_impl_matches python3_11 3.10 3.11" 0 +test_is "_python_impl_matches python3_11 3.11 3.12" 0 +test_is "_python_impl_matches python3_11 3.10 3.12" 1 +test_is "_python_impl_matches python3_11 3.10 3.11 3.12" 0 +test_is "_python_impl_matches python3_12 3.10 3.11" 1 +test_is "_python_impl_matches python3_12 3.11 3.12" 0 +test_is "_python_impl_matches python3_12 3.10 3.12" 0 +test_is "_python_impl_matches python3_12 3.10 3.11 3.12" 0 eoutdent rm "${tmpfile}"