-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support blob streaming for file-like objects #1914
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Signed it |
CLAs look good, thanks! |
self._buffered_data = self._stream.read(size) | ||
self._buffered_data = self._stream.read(size) \ | ||
if not hasattr(self._stream, | ||
'closed') or not self._stream.closed else '' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
fixed according to comments |
@linar-jether thanks for the changes. The pylint failures on Travis aren't due to this PR: they released a new version last Friday, which introduced new checks that we now fail. The |
All tests passed |
@@ -17,7 +17,7 @@ | |||
import base64 | |||
import copy | |||
import hashlib | |||
from io import BytesIO | |||
from io import BytesIO, UnsupportedOperation |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@linar-jether, cool! Do you think you could squash these commits down? Otherwise LGTM, but I defer to @tseaver/@dhermes for confirmation. |
742a95e
to
43464b7
Compare
Sure, squashed all previous commits and separated the imports |
@linar-jether Thanks again for your work! |
When uploading file-like objects without a specified size, upload in chunks instead of exhausting the stream and keeping the data in-memory.
See #1909