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: silence expected errors for routine operations on BlobReader #400

Merged
merged 2 commits into from Mar 29, 2021

Conversation

andrewsg
Copy link
Contributor

@andrewsg andrewsg commented Mar 29, 2021

Two fixes for BlobReader:

  • Checksums are not supported for BlobReader's chunked downloads, so set checksum=None to silence log warnings (and add a note to the docstring explaining this).
  • In Python, read() on files at EOF should return an empty result, but not raise an error. Stop BlobReader from emitting RequestRangeNotSatisfiable errors at EOF.

Fixes: #399

@andrewsg andrewsg requested a review from a team March 29, 2021 17:19
@andrewsg andrewsg requested a review from a team as a code owner March 29, 2021 17:19
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Mar 29, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 29, 2021
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

Change LGTM, thanks @andrewsg, just have 1 nit.

google/cloud/storage/blob.py Outdated Show resolved Hide resolved
@andrewsg andrewsg added the automerge Merge the pull request once unit tests and other checks pass. label Mar 29, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit d52853b into master Mar 29, 2021
@gcf-merge-on-green gcf-merge-on-green bot deleted the fileio-update branch March 29, 2021 21:26
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 29, 2021
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…ogleapis#400)

Two fixes for BlobReader:
- Checksums are not supported for BlobReader's chunked downloads, so set checksum=None to silence log warnings (and add a note to the docstring explaining this).
- In Python, read() on files at EOF should return an empty result, but not raise an error. Stop BlobReader from emitting RequestRangeNotSatisfiable errors at EOF.

Fixes: googleapis#399
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
…ogleapis#400)

Two fixes for BlobReader:
- Checksums are not supported for BlobReader's chunked downloads, so set checksum=None to silence log warnings (and add a note to the docstring explaining this).
- In Python, read() on files at EOF should return an empty result, but not raise an error. Stop BlobReader from emitting RequestRangeNotSatisfiable errors at EOF.

Fixes: googleapis#399
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reading using open api fails with 416 error code in google-resumable-media
2 participants