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

docs: open file-like objects in byte mode for uploads #824

Merged
merged 4 commits into from
Jul 22, 2022

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Jul 13, 2022

File-like objects should be opened in binary mode for blob.upload_from_file()

  • cpython standard library accorded with RFC 2616 Section 3.7.1 states the text default charset of iso-8859-1
  • add clarifying notes in docstring
  • update code sample

Fixes #818 🦕

@cojenco cojenco requested review from a team as code owners July 13, 2022 00:03
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: storage Issues related to the googleapis/python-storage API. labels Jul 13, 2022
@cojenco cojenco requested a review from a team as a code owner July 13, 2022 22:24
@cojenco cojenco requested a review from leahecole July 13, 2022 22:24
Copy link
Contributor

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

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

Stamping for samples/*.py files as python-sample-reviewer.

@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2022
@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 20, 2022
@yoshi-kokoro yoshi-kokoro removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 20, 2022
@cojenco cojenco added the automerge Merge the pull request once unit tests and other checks pass. label Jul 22, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit 4bd3d1d into googleapis:main Jul 22, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 22, 2022
@cojenco cojenco deleted the 818-docstring branch February 1, 2023 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloud Storage upload_from_file does not work with files containing non-latin-1 characters.
3 participants