diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c32942a7..06c80ebae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-storage/#history +## [2.18.2](https://github.com/googleapis/python-storage/compare/v2.18.1...v2.18.2) (2024-08-08) + + +### Bug Fixes + +* Add regression test for range read retry issue and bump dependency to fix ([#1338](https://github.com/googleapis/python-storage/issues/1338)) ([0323647](https://github.com/googleapis/python-storage/commit/0323647d768b3be834cfab53efb3c557a47d41c3)) + ## [2.18.1](https://github.com/googleapis/python-storage/compare/v2.18.0...v2.18.1) (2024-08-05) diff --git a/google/cloud/storage/version.py b/google/cloud/storage/version.py index fdae0c9bb..bbe5b63fe 100644 --- a/google/cloud/storage/version.py +++ b/google/cloud/storage/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.18.1" +__version__ = "2.18.2" diff --git a/setup.py b/setup.py index 3f80b2ffa..bcb839106 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ "google-auth >= 2.26.1, < 3.0dev", "google-api-core >= 2.15.0, <3.0.0dev", "google-cloud-core >= 2.3.0, < 3.0dev", - "google-resumable-media >= 2.6.0", + "google-resumable-media >= 2.7.2", "requests >= 2.18.0, < 3.0.0dev", "google-crc32c >= 1.0, < 2.0dev", ] diff --git a/tests/conformance/test_conformance.py b/tests/conformance/test_conformance.py index 4d16fc36f..45c0cb51e 100644 --- a/tests/conformance/test_conformance.py +++ b/tests/conformance/test_conformance.py @@ -115,6 +115,17 @@ def blob_download_to_filename_chunked(client, _preconditions, **resources): assert stored_contents == data +def blob_download_to_filename_range(client, _preconditions, **resources): + bucket = resources.get("bucket") + file, data = resources.get("file_data") + blob = client.bucket(bucket.name).blob(file.name) + with tempfile.NamedTemporaryFile() as temp_f: + blob.download_to_filename(temp_f.name, start=1024, end=512 * 1024) + with open(temp_f.name, "r") as file_obj: + stored_contents = file_obj.read() + assert stored_contents == data[1024 : 512 * 1024 + 1] + + def client_download_blob_to_file(client, _preconditions, **resources): bucket = resources.get("bucket") file, data = resources.get("file_data") @@ -748,6 +759,7 @@ def object_acl_clear(client, _preconditions, **resources): client_download_blob_to_file, blob_download_to_filename, blob_download_to_filename_chunked, + blob_download_to_filename_range, blob_download_as_bytes, blob_download_as_text, blobreader_read, @@ -756,6 +768,7 @@ def object_acl_clear(client, _preconditions, **resources): client_download_blob_to_file, blob_download_to_filename, blob_download_to_filename_chunked, + blob_download_to_filename_range, blob_download_as_bytes, blob_download_as_text, blobreader_read,