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

feat: add raw download classes#109

Merged
tseaver merged 12 commits intogoogleapis:masterfrom
tseaver:106-add-raw-download-classes
Oct 28, 2019
Merged

feat: add raw download classes#109
tseaver merged 12 commits intogoogleapis:masterfrom
tseaver:106-add-raw-download-classes

Conversation

@tseaver
Copy link
Copy Markdown
Contributor

@tseaver tseaver commented Sep 26, 2019

Restores "raw download" behavior as separate RawDownload and RawChunkedDownload classes: the existing Download and ChunkedDownload classes retain their bad-but-backward-compatible behavior of expanding resources with Content-Encoding headers set.

Closes #106.

Always reads the raw stream content to compute a response body.
Performs download using raw response stream.
Performs chunked download using raw response stream.
Move the 'test_corrupt_download` test there, as only raw downloads
preserve the actual MD5 hash of the file when content encoding is
present.
Move formerly-failing 'test_chunked_download' test there, becuase the
non-raw version cannot succeed for content-encoded resources due to
requests' expansion.
@tseaver tseaver requested a review from crwilcox September 26, 2019 20:09
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 26, 2019
@tseaver
Copy link
Copy Markdown
Contributor Author

tseaver commented Sep 26, 2019

I have verified that the google-cloud-storage system tests pass with this branch installed: of course, none of them take advantage (yet) of the new raw download classes.

@tseaver tseaver requested a review from busunkim96 September 26, 2019 20:44
@tseaver tseaver changed the title Add raw download classes feat: add raw download classes Oct 10, 2019
@tseaver
Copy link
Copy Markdown
Contributor Author

tseaver commented Oct 10, 2019

@crwilcox PTAL

Comment thread tests/system/requests/test_download.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimplement changes undone by #103 (always use raw response data)

3 participants