From patchwork Wed Oct 14 10:11:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 100653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F6F5CC6B1A for ; Wed, 14 Oct 2026 10:11:49 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.9836.1791972703530734886 for ; Wed, 14 Oct 2026 03:11:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@arm.com header.s=foss header.b=oS62ws+T; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8D5CC153B for ; Wed, 14 Oct 2026 03:11:39 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8A6233F673 for ; Wed, 14 Oct 2026 03:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1791972702; bh=IS+lkR6V8WucS9BwC2AkPrBSpJx9YZFd5rTpB9WHTZA=; h=From:To:Subject:Date:From; b=oS62ws+TyTjdsQ9hT6jS9mO9/rnqKoZJGEOtgZ2uvSCI2HQCW5A1IihifyMsm/3q3 pBcZ3ZHYnn0YfNmhlhNh79f6yYv3VSrybDHjVJRtNYTGWHO3FtuKP0ZOtn5PjOP0at bCaMuxnypW/M/OIHJiPMpHl41HiXfA0wB8jeuy0Y= From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH] python3-packaging: refresh patch Date: Wed, 14 Oct 2026 11:11:38 +0100 Message-ID: <20261014101138.3948702-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-ARM-No-Footer: NoDisclaimer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Oct 2026 10:11:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247753 There were several proposed fixes for the intermittent failures, update our patch to the one that was actually merged upstream. Signed-off-by: Ross Burton --- .../python3-packaging/reliable-test.patch | 79 +++++++++++++++---- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/meta/recipes-devtools/python/python3-packaging/reliable-test.patch b/meta/recipes-devtools/python/python3-packaging/reliable-test.patch index 1746c1d21e5..f830917f97c 100644 --- a/meta/recipes-devtools/python/python3-packaging/reliable-test.patch +++ b/meta/recipes-devtools/python/python3-packaging/reliable-test.patch @@ -1,30 +1,79 @@ -From 47b0db5b7b9a5fd9f4d1d3236e90f205c8b34625 Mon Sep 17 00:00:00 2001 -From: Christopher Pruijsen -Date: Fri, 11 Sep 2026 02:32:41 +0100 -Subject: [PATCH] test(specifiers): stop filtering compatible-release examples - by epoch +From ef837aad3127167671eb37b9f6bd8a94ec7ce26e Mon Sep 17 00:00:00 2001 +From: Louis Deconinck +Date: Tue, 13 Oct 2026 21:17:05 +0200 +Subject: [PATCH] test: avoid filtering compatible release examples (#1407) -assume() dropped most draws when the specifier and candidate epochs -differed, so Hypothesis intermittently failed HealthCheck.filter_too_much. +Assisted-by: Codex -Upstream-Status: Submitted [https://github.com/pypa/packaging/pull/1409] +Signed-off-by: Louis Deconinck + +Upstream-Status: Backport [https://github.com/pypa/packaging/pull/1407] Signed-off-by: Ross Burton --- - tests/property/test_specifier_matching.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + tests/property/strategies.py | 13 ++++++++++++- + tests/property/test_specifier_matching.py | 7 ++++--- + 2 files changed, 16 insertions(+), 4 deletions(-) +diff --git a/tests/property/strategies.py b/tests/property/strategies.py +index 4ce828b76..b42b6dcb4 100644 +--- a/tests/property/strategies.py ++++ b/tests/property/strategies.py +@@ -85,9 +85,11 @@ def pep440_versions( + *, + include_local: bool = True, + min_segments: int = 1, ++ epoch: int | None = None, + ) -> Version: + """Generate a random PEP 440 version.""" +- epoch = draw(st.sampled_from([None, 0, 1, 2, 3])) ++ if epoch is None: ++ epoch = draw(st.sampled_from([None, 0, 1, 2, 3])) + num_segments = draw(st.integers(min_value=min_segments, max_value=4)) + release = tuple(draw(small_ints) for _ in range(num_segments)) + +@@ -153,6 +155,15 @@ def multi_segment_versions(draw: st.DrawFn) -> Version: + return v + + ++@st.composite ++def compatible_release_version_pairs(draw: st.DrawFn) -> tuple[Version, Version]: ++ """Generate compatible-release examples whose versions share an epoch.""" ++ epoch = draw(st.integers(min_value=0, max_value=3)) ++ spec_ver = draw(pep440_versions(include_local=False, min_segments=2, epoch=epoch)) ++ candidate = draw(pep440_versions(epoch=epoch)) ++ return spec_ver, candidate ++ ++ + @st.composite + def versions_with_local(draw: st.DrawFn) -> Version: + """Generate a PEP 440 version that always has a local segment.""" diff --git a/tests/property/test_specifier_matching.py b/tests/property/test_specifier_matching.py -index 4552ce8ce..4aedafe56 100644 +index 4552ce8ce..d85eadaa7 100644 --- a/tests/property/test_specifier_matching.py +++ b/tests/property/test_specifier_matching.py -@@ -205,7 +205,9 @@ def test_compatible_release_matches_expected_compatible( +@@ -12,6 +12,7 @@ + from packaging.version import Version + from tests.property.strategies import ( + SETTINGS, ++ compatible_release_version_pairs, + multi_segment_versions, + nonlocal_versions, + ops, +@@ -198,14 +199,14 @@ class TestCompatibleReleaseDefinition: + and a version identifier. It matches any candidate version that is expected + to be compatible with the specified version.""" + +- @given(spec_ver=multi_segment_versions(), candidate=pep440_versions()) ++ @given(versions=compatible_release_version_pairs()) + @SETTINGS + def test_compatible_release_matches_expected_compatible( +- self, spec_ver: Version, candidate: Version ++ self, versions: tuple[Version, Version] ) -> None: """~=V matches candidate iff candidate >= V and candidate matches the prefix wildcard derived from V.""" - assume(spec_ver.epoch == candidate.epoch) -+ # Share an epoch without assume(), which rejects most draws and trips -+ # Hypothesis HealthCheck.filter_too_much. -+ candidate = candidate.__replace__(epoch=spec_ver.epoch) ++ spec_ver, candidate = versions spec = Specifier(f"~={spec_ver}") result = candidate in spec # Also check via the expanded form