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

fix: from_string method of blob and bucket class #290

Merged
merged 7 commits into from
Nov 11, 2020

Conversation

HemangChothani
Copy link
Contributor

Fixes #286

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 8, 2020
Copy link
Contributor

@tseaver tseaver left a comment

Choose a reason for hiding this comment

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

Rather than changing the signature of Blob.from_string, the fix should be to change Blob._do_multipart_upload (and likewise Blob._initiate_resumable_upload) to use the passed-in client. The caller (Blob._do_upload) should likewise call self._require_client to use its own _client attribute as a fallback for when no explicit client is passed in.

google/cloud/storage/blob.py Outdated Show resolved Hide resolved
google/cloud/storage/client.py Outdated Show resolved Hide resolved
tests/unit/test_blob.py Outdated Show resolved Hide resolved
@HemangChothani
Copy link
Contributor Author

@tseaver PTAL!

@tseaver tseaver added the automerge Merge the pull request once unit tests and other checks pass. label Nov 11, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit d457ce3 into googleapis:master Nov 11, 2020
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 11, 2020
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blob upload_from_string AttributeError when using client argument
2 participants