Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Commit 1c6d522

Browse files
committed
find_downloads: set per_page=1 to avoid 504 Timeout
Fetching https://api.github.com/repos/astral-sh/python-build-standalone/releases?page=1 which has a default per_page of 30 will get a 504 Timeout currently.
1 parent e213938 commit 1c6d522

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rye-devtools/src/rye_devtools/find_downloads.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ async def find(self) -> list[PythonDownload]:
113113
await self.fetch_indygreg_checksums(downloads, n=20)
114114
return downloads
115115

116-
async def fetch_indygreg_downloads(self, pages: int = 100) -> list[PythonDownload]:
116+
async def fetch_indygreg_downloads(self, pages: int = 3000) -> list[PythonDownload]:
117117
"""Fetch all the indygreg downloads from the release API."""
118118
results: dict[Version, dict[tuple[str, str], list[PythonDownload]]] = {}
119119

120120
for page in range(1, pages):
121121
log(f"Fetching indygreg release page {page}")
122-
resp = await fetch(self.client, "%s?page=%d" % (self.RELEASE_URL, page))
122+
resp = await fetch(
123+
self.client, "%s?per_page=1&page=%d" % (self.RELEASE_URL, page)
124+
)
123125
rows = resp.json()
124126
if not rows:
125127
break

0 commit comments

Comments
 (0)