Skip to content

Commit 298dc2b

Browse files
aKlimauclaude
andcommitted
Fixed hardcoded pattern to allow v4 urls
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 21ce6b9 commit 298dc2b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pulp_python/app/management/commands/repair-python-metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def href_prn_list_handler(value):
5959
"""Common list parsing for a string of hrefs/prns."""
6060
r = re.compile(
6161
rf"""
62-
(?:{settings.API_ROOT}(?:[-_a-zA-Z0-9]+/)?api/v3/repositories/python/python/[-a-f0-9]+/)
62+
(?:{settings.API_ROOT}(?:[-_a-zA-Z0-9]+/)?api/v\d+/repositories/python/python/[-a-f0-9]+/)
6363
|(?:prn:python\.pythonrepository:[-a-f0-9]+)
6464
""",
6565
re.VERBOSE,

pulp_python/tests/functional/api/test_domains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_domain_object_creation(
2929
domain_name = domain.name
3030

3131
repo = python_repo_factory(pulp_domain=domain_name)
32-
assert f"{domain_name}/api/v3/" in repo.pulp_href
32+
assert f"{domain_name}/api/" in repo.pulp_href
3333

3434
repos = python_bindings.RepositoriesPythonApi.list(pulp_domain=domain_name)
3535
assert repos.count == 1

0 commit comments

Comments
 (0)