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

Copy link
Contributor

@tseaver tseaver left a comment

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
Copy link
Contributor Author

@HemangChothani HemangChothani commented Aug 3, 2020

@tseaver PTAL whenever have a chance.

google/cloud/storage/blob.py Outdated Show resolved Hide resolved
@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
4 checks passed
cojenco added a commit to cojenco/python-storage that referenced this issue 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 added a commit to cojenco/python-storage that referenced this issue 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants