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 Mar 29, 2021
@andrewsg andrewsg requested a review from as a code owner Mar 29, 2021
@google-cla google-cla bot added the cla: yes label Mar 29, 2021
@andrewsg andrewsg requested review from cojenco and frankyn Mar 29, 2021
Copy link
Member

@frankyn frankyn left a comment

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

google/cloud/storage/blob.py Outdated Show resolved Hide resolved
@gcf-merge-on-green gcf-merge-on-green bot merged commit d52853b into master Mar 29, 2021
4 checks passed
@gcf-merge-on-green gcf-merge-on-green bot deleted the fileio-update branch Mar 29, 2021
cojenco added a commit to cojenco/python-storage that referenced this issue 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 added a commit to cojenco/python-storage that referenced this issue 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants