diff --git a/pyproject.toml b/pyproject.toml index 38c82ba7..6118afdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ dropbox = [ "dropbox>=7.2.1", ] google = [ - "google-cloud-storage>=1.27", + "google-cloud-storage>=1.31", ] libcloud = [ "apache-libcloud", diff --git a/storages/backends/gcloud.py b/storages/backends/gcloud.py index 5ae74a1a..e9855752 100644 --- a/storages/backends/gcloud.py +++ b/storages/backends/gcloud.py @@ -62,7 +62,7 @@ def _get_file(self): ) if "r" in self._mode: self._is_dirty = False - self.blob.download_to_file(self._file) + self.blob.download_to_file(self._file, checksum="crc32c") self._file.seek(0) if self._storage.gzip and self.blob.content_encoding == "gzip": self._file = self._decompress_file(mode=self._mode, file=self._file) diff --git a/tests/test_gcloud.py b/tests/test_gcloud.py index cacb44d3..3257ca97 100644 --- a/tests/test_gcloud.py +++ b/tests/test_gcloud.py @@ -55,7 +55,7 @@ def test_open_read_num_bytes(self): self.filename, chunk_size=None ) - f.blob.download_to_file = lambda tmpfile: tmpfile.write(data) + f.blob.download_to_file = lambda tmpfile, **kwargs: tmpfile.write(data) self.assertEqual(f.read(num_bytes), data[0:num_bytes]) def test_open_read_nonexistent(self):