Skip to content

Conversation

mxamin
Copy link
Collaborator

@mxamin mxamin commented Oct 6, 2025

Updated setup.py to replace urllib.request.urlretrieve with a streaming download helper based on urlopen. This avoids the drawbacks of urlretrieve, such as lack of streaming support and limited control over requests. Using urlopen allows downloads to be written in chunks, reduces memory usage, and makes it easier to extend the logic with custom headers, retries, or checksum verification in the future. This improves the reliability and security of fetching dependency tarballs during the build process.

Updated setup.py to replace urllib.request.urlretrieve with a
streaming download helper based on urlopen. This avoids the drawbacks
of urlretrieve, such as lack of streaming support and limited control
over requests. Using urlopen allows downloads to be written in chunks,
reduces memory usage, and makes it easier to extend the logic with
custom headers, retries, or checksum verification in the future. This
improves the reliability and security of fetching dependency tarballs
during the build process.
@mxamin mxamin force-pushed the improve-lib-downloader branch from 62ecfa7 to b8e3337 Compare October 6, 2025 15:47
@mxamin mxamin merged commit 11beda8 into master Oct 6, 2025
161 of 207 checks passed
@mxamin mxamin deleted the improve-lib-downloader branch October 6, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant