Skip to content
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

Using requests iter_content() to avoid storing response body in RAM. #21

Merged
merged 3 commits into from
Aug 1, 2017

Conversation

dhermes
Copy link
Contributor

@dhermes dhermes commented Jul 31, 2017

Fixes #5.

I'll be adding a system test to make extra double sure this code works as expected, but wanted to send out the PR before adding it.

/cc @tseaver since I can't add you as a reviewer

@@ -19,6 +19,9 @@
from google.resumable_media.requests import _helpers


_SINGLE_GET_CHUNK_SIZE = 8192

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


Returns:
~requests.Response: The return value of ``transport.request()``.
"""
func = functools.partial(
transport.request, method, url, data=data, headers=headers)
transport.request, method, url, data=data, headers=headers,
**transport_kwargs)

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor Author

dhermes commented Jul 31, 2017

I pushed the branch to the main project remote so the system tests would run: https://circleci.com/gh/GoogleCloudPlatform/google-resumable-media-python/176

@dhermes dhermes merged commit 19742bc into googleapis:master Aug 1, 2017
@dhermes dhermes deleted the fix-5 branch August 1, 2017 17:53
@dhermes
Copy link
Contributor Author

dhermes commented Aug 1, 2017

This may not be the end of the road, I am currently playing around with failures after consuming part of the GET payload.

@dhermes dhermes mentioned this pull request Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants