Skip to content

747 robustranged download support #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 12, 2025
Merged

Conversation

dsamaey
Copy link
Contributor

@dsamaey dsamaey commented Apr 7, 2025

@dsamaey dsamaey linked an issue Apr 7, 2025 that may be closed by this pull request
Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial notes

@jdries
Copy link
Collaborator

jdries commented May 6, 2025

@soxofaan ok to merge? Broken downloads is a big issue for many users, and this might really help quite a bit.

Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is still a regression here:
non ranged downloads will be done as a whole in memory instead of being chunked

@jdries
Copy link
Collaborator

jdries commented May 12, 2025

@dsamaey indeed, for the 'download all at once' code path, we can just make sure to use what was already there, and then this should be fine:

response = self._get_response(stream=True)
with target.open("wb") as f:
    for block in response.iter_content(chunk_size=chunk_size):
        f.write(block)

Can you merge that in?

@dsamaey dsamaey merged commit 3fccb65 into master May 12, 2025
15 checks passed
@soxofaan soxofaan deleted the 747-robustranged-download-support branch May 12, 2025 13:27
soxofaan added a commit that referenced this pull request May 12, 2025
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.

robust/ranged download support
4 participants