Skip to content

Commit 615f30b

Browse files
authored
Merge branch 'master' into gzip-gcs
2 parents 69c0231 + b3513ec commit 615f30b

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

docs/backends/azure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Settings
123123

124124
Global connection timeout in seconds.
125125

126-
``max_memory`` size ``AZURE_BLOB_MAX_MEMORY_SIZE``
126+
``max_memory_size`` or ``AZURE_BLOB_MAX_MEMORY_SIZE``
127127

128128
Default: ``2*1024*1024`` i.e ``2MB``
129129

docs/backends/gcloud.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Settings
213213
the credentials provided to django-storages (See :ref:`GS Credentials <gs-creds>`).
214214

215215
Note: Default Google Compute Engine (GCE) Service accounts are
216-
`unable to sign urls <https://googlecloudplatform.github.io/google-cloud-python/latest/storage/blobs.html#google.cloud.storage.blob.Blob.generate_signed_url>`_.
216+
`unable to sign urls <https://cloud.google.com/python/docs/reference/storage/latest/google.cloud.storage.blob.Blob#google_cloud_storage_blob_Blob_generate_signed_url>`_.
217217

218218
The ``expiration`` value is handled by the underlying `Google library <https://googlecloudplatform.github.io/google-cloud-python/latest/storage/blobs.html#google.cloud.storage.blob.Blob.generate_signed_url>`_.
219219
It supports `timedelta`, `datetime`, or `integer` seconds since epoch time.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ dropbox = [
5555
"dropbox>=7.2.1",
5656
]
5757
google = [
58-
"google-cloud-storage>=1.27",
58+
"google-cloud-storage>=1.32",
5959
]
6060
libcloud = [
6161
"apache-libcloud",

storages/backends/gcloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _get_file(self):
6363
if "r" in self._mode:
6464
self._is_dirty = False
6565
# This automatically decompresses the file
66-
self.blob.download_to_file(self._file)
66+
self.blob.download_to_file(self._file, checksum="crc32c")
6767
self._file.seek(0)
6868
return self._file
6969

tests/test_gcloud.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_open_read(self):
4343
self.filename, chunk_size=None
4444
)
4545

46-
f.blob.download_to_file = lambda tmpfile: tmpfile.write(data)
46+
f.blob.download_to_file = lambda tmpfile, **kwargs: tmpfile.write(data)
4747
self.assertEqual(f.read(), data)
4848

4949
def test_open_read_num_bytes(self):
@@ -56,7 +56,7 @@ def test_open_read_num_bytes(self):
5656
self.filename, chunk_size=None
5757
)
5858

59-
f.blob.download_to_file = lambda tmpfile: tmpfile.write(data)
59+
f.blob.download_to_file = lambda tmpfile, **kwargs: tmpfile.write(data)
6060
self.assertEqual(f.read(num_bytes), data[0:num_bytes])
6161

6262
def test_open_read_nonexistent(self):
@@ -521,7 +521,7 @@ def test_storage_save_gzipped(self, *args):
521521
"""
522522
Test saving a gzipped file
523523
"""
524-
name = "test_storage_save.js.gz"
524+
name = "test_storage_save.css.gz"
525525
content = ContentFile("I am gzip'd", name=name)
526526

527527
blob = Blob("x", None)
@@ -537,7 +537,7 @@ def test_storage_save_gzipped(self, *args):
537537
retry=DEFAULT_RETRY,
538538
size=11,
539539
predefined_acl=None,
540-
content_type="application/javascript",
540+
content_type="text/css",
541541
)
542542
finally:
543543
patcher.stop()

0 commit comments

Comments
 (0)