Skip to content

Commit

Permalink
Add URL context to publish test script (astral-sh#8289)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin authored Oct 17, 2024
1 parent 83f835b commit a7bb3a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/publish/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def get_new_version(project_name: str) -> str:
# pick a version that doesn't exist on any target yet
versions = set()
for url in project_urls[project_name]:
data = httpx.get(url).text
try:
data = httpx.get(url).text
except httpx.HTTPError as err:
raise RuntimeError(f"Failed to fetch {url}") from err
href_text = "<a[^>]+>([^<>]+)</a>"
for filename in list(m.group(1) for m in re.finditer(href_text, data)):
if filename.endswith(".whl"):
Expand Down

0 comments on commit a7bb3a7

Please sign in to comment.