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

feat: rename 'Blob.download_as_{string,bytes}', add 'Blob.download_as_text' #182

Merged
merged 10 commits into from
Aug 10, 2020

Conversation

HemangChothani
Copy link
Contributor

@HemangChothani HemangChothani commented Jun 17, 2020

Leave 'Blob.download_as_string' as a deprecated alias for 'download_as_bytes'.

Fixes #178

@HemangChothani HemangChothani requested a review from frankyn June 17, 2020 11:03
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 17, 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.

Changing the semantics of the longstanding download_as_string method seems like a problematic break, here. If we leave download_as_string as a backward-compatibility shim for download_as_bytes, and add the new implementation as download_as_text, we avoid breaking user code and make the new semantics clearer / less ambiguous.

google/cloud/storage/blob.py Outdated Show resolved Hide resolved
google/cloud/storage/blob.py Outdated Show resolved Hide resolved
google/cloud/storage/blob.py Show resolved Hide resolved
google/cloud/storage/blob.py Outdated Show resolved Hide resolved
google/cloud/storage/blob.py Outdated Show resolved Hide resolved
google/cloud/storage/blob.py Outdated Show resolved Hide resolved
google/cloud/storage/blob.py Show resolved Hide resolved
@HemangChothani HemangChothani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 30, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 30, 2020
@busunkim96 busunkim96 closed this Jul 31, 2020
@busunkim96 busunkim96 reopened this Jul 31, 2020
@HemangChothani
Copy link
Contributor Author

@tseaver PTAL whenever have a chance.

google/cloud/storage/blob.py Outdated Show resolved Hide resolved
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 10, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 10, 2020
@tseaver tseaver changed the title feat(storage): rename download_as_string to bytes and add new method feat: rename 'download_as_{string,bytes}', add 'download_as_text' Aug 10, 2020
@tseaver tseaver changed the title feat: rename 'download_as_{string,bytes}', add 'download_as_text' feat: rename 'Blob.download_as_{string,bytes}', add 'Blob.download_as_text' Aug 10, 2020
@tseaver tseaver merged commit 73107c3 into googleapis:master Aug 10, 2020
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…_text' (googleapis#182)

Leave 'Blob.download_as_string' as a deprecated alias for 'download_as_bytes'.

Co-authored-by: Tres Seaver <tseaver@palladion.com>
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…_text' (googleapis#182)

Leave 'Blob.download_as_string' as a deprecated alias for 'download_as_bytes'.

Co-authored-by: Tres Seaver <tseaver@palladion.com>
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.

please provide download_as_bytes for blobs
5 participants