Skip to content

Commit cd80983

Browse files
committed
Update CI files
1 parent 0935111 commit cd80983

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.ci/scripts/calc_constraints.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@
2626
def fetch_pulpcore_upper_bound(requirement):
2727
with urllib.request.urlopen(CORE_TEMPLATE_URL) as f:
2828
template = yaml.safe_load(f.read())
29-
supported_versions = template["supported_release_branches"]
30-
supported_versions.append(template["latest_release_branch"])
29+
supported_branches = [
30+
*template["supported_release_branches"],
31+
template["latest_release_branch"],
32+
]
3133
applicable_versions = sorted(
32-
requirement.specifier.filter((Version(v) for v in supported_versions))
34+
Version(branch)
35+
for branch in supported_branches
36+
if requirement.specifier.contains(Version(f"{branch}.999999"))
3337
)
3438
if len(applicable_versions) == 0:
3539
raise Exception("No supported pulpcore version in required range.")

0 commit comments

Comments
 (0)