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

fix: from_string method of blob and bucket class - #290

Merged
gcf-merge-on-green[bot] merged 7 commits into
googleapis:masterfrom
MaxxleLLC:storage_issue_286
Nov 11, 2020
Merged

fix: from_string method of blob and bucket class#290
gcf-merge-on-green[bot] merged 7 commits into
googleapis:masterfrom
MaxxleLLC:storage_issue_286

Conversation

@HemangChothani

Copy link
Copy Markdown
Contributor

Fixes#286

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

@tseavertseaver left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threadgoogle/cloud/storage/blob.py Outdated
Comment threadgoogle/cloud/storage/client.py Outdated
Comment threadtests/unit/test_blob.py
@HemangChothani

Copy link
Copy Markdown
ContributorAuthor

@tseaver PTAL!

@tseavertseaver 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-greenBot merged commit d457ce3 into googleapis:masterNov 11, 2020
@gcf-merge-on-greengcf-merge-on-greenBot 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
@release-pleaserelease-pleaseBot mentioned this pull request Jan 12, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yesThis 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

@HemangChothani@tseaver