From 77b0b0fb4b1763e2b365d27a716f75aece18a7e5 Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Thu, 17 Sep 2026 01:18:15 -0400 Subject: [PATCH] Allow the lower bound of a pulpcore dependency to have a .z other than 0 --- templates/github/.ci/scripts/calc_constraints.py.j2 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/github/.ci/scripts/calc_constraints.py.j2 b/templates/github/.ci/scripts/calc_constraints.py.j2 index b271d359..ef550dcc 100644 --- a/templates/github/.ci/scripts/calc_constraints.py.j2 +++ b/templates/github/.ci/scripts/calc_constraints.py.j2 @@ -20,10 +20,14 @@ CORE_TEMPLATE_URL = "https://raw.githubusercontent.com/pulp/pulpcore/main/templa def fetch_pulpcore_upper_bound(requirement): with urllib.request.urlopen(CORE_TEMPLATE_URL) as f: template = yaml.safe_load(f.read()) - supported_versions = template["supported_release_branches"] - supported_versions.append(template["latest_release_branch"]) + supported_branches = [ + *template["supported_release_branches"], + template["latest_release_branch"], + ] applicable_versions = sorted( - requirement.specifier.filter((Version(v) for v in supported_versions)) + Version(branch) + for branch in supported_branches + if requirement.specifier.contains(Version(f"{branch}.999999")) ) if len(applicable_versions) == 0: raise Exception("No supported pulpcore version in required range.")