Skip to content

Commit

Permalink
[gcloud] remove deprecated GS_CACHE_CONTROL support
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneier committed Feb 18, 2023
1 parent 94c3092 commit 6cf093e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,14 @@
django-storages CHANGELOG
=========================

X.YY.Z (UNRELEASED)
*******************

Google Cloud
------------

- **Breaking**: Remove support for deprecated ``GS_CACHE_CONTROL``

1.13.2 (2022-12-23)
*******************

Expand Down
11 changes: 0 additions & 11 deletions storages/backends/gcloud.py
@@ -1,7 +1,6 @@
import gzip
import io
import mimetypes
import warnings
from datetime import timedelta
from tempfile import SpooledTemporaryFile

Expand Down Expand Up @@ -130,7 +129,6 @@ def get_default_settings(self):
'image/svg+xml',
)),
"file_overwrite": setting('GS_FILE_OVERWRITE', True),
"cache_control": setting('GS_CACHE_CONTROL'),
"object_parameters": setting('GS_OBJECT_PARAMETERS', {}),
# The max amount of memory a returned file can take up before being
# rolled over into a temporary file on disk. Default is 0: Do not
Expand Down Expand Up @@ -218,15 +216,6 @@ def get_object_parameters(self, name):
Returns GS_OBJECT_PARAMETRS by default. See the docs for all possible options.
"""
object_parameters = self.object_parameters.copy()

if 'cache_control' not in object_parameters and self.cache_control:
warnings.warn(
'The GS_CACHE_CONTROL setting is deprecated. Use GS_OBJECT_PARAMETERS to set any '
'writable blob property or override GoogleCloudStorage.get_object_parameters to '
'vary the parameters per object.', DeprecationWarning
)
object_parameters['cache_control'] = self.cache_control

return object_parameters

def delete(self, name):
Expand Down

0 comments on commit 6cf093e

Please sign in to comment.