summaryrefslogtreecommitdiff
path: root/django/conf
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-12 12:47:42 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-17 11:49:15 +0100
commite01970e9d23a241473671ea26126f8440db4dead (patch)
treeb3d902755864abb350ff7e3e61c443bf48e15b96 /django/conf
parentdaf88e778bd39d908dca9efc3571d37adbd2ff4a (diff)
Refs #32800 -- Removed CSRF_COOKIE_MASKED transitional setting per deprecation timeline.
Diffstat (limited to 'django/conf')
-rw-r--r--django/conf/__init__.py13
-rw-r--r--django/conf/global_settings.py4
2 files changed, 1 insertions, 16 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index ea63a0dfb2..da461ecc02 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -16,19 +16,13 @@ from pathlib import Path
import django
from django.conf import global_settings
from django.core.exceptions import ImproperlyConfigured
-from django.utils.deprecation import RemovedInDjango50Warning, RemovedInDjango51Warning
+from django.utils.deprecation import RemovedInDjango51Warning
from django.utils.functional import LazyObject, empty
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
DEFAULT_STORAGE_ALIAS = "default"
STATICFILES_STORAGE_ALIAS = "staticfiles"
-# RemovedInDjango50Warning
-CSRF_COOKIE_MASKED_DEPRECATED_MSG = (
- "The CSRF_COOKIE_MASKED transitional setting is deprecated. Support for "
- "it will be removed in Django 5.0."
-)
-
DEFAULT_FILE_STORAGE_DEPRECATED_MSG = (
"The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead."
)
@@ -211,9 +205,6 @@ class Settings:
setattr(self, setting, setting_value)
self._explicit_settings.add(setting)
- if self.is_overridden("CSRF_COOKIE_MASKED"):
- warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning)
-
if hasattr(time, "tzset") and self.TIME_ZONE:
# When we can, attempt to validate the timezone. If we can't find
# this file, no check happens and it's harmless.
@@ -272,8 +263,6 @@ class UserSettingsHolder:
def __setattr__(self, name, value):
self._deleted.discard(name)
- if name == "CSRF_COOKIE_MASKED":
- warnings.warn(CSRF_COOKIE_MASKED_DEPRECATED_MSG, RemovedInDjango50Warning)
if name == "DEFAULT_FILE_STORAGE":
self.STORAGES[DEFAULT_STORAGE_ALIAS] = {
"BACKEND": self.DEFAULT_FILE_STORAGE
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py
index 6d4ea3db5c..4cca441560 100644
--- a/django/conf/global_settings.py
+++ b/django/conf/global_settings.py
@@ -568,10 +568,6 @@ CSRF_HEADER_NAME = "HTTP_X_CSRFTOKEN"
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
-# Whether to mask CSRF cookie value. It's a transitional setting helpful in
-# migrating multiple instance of the same project to Django 4.1+.
-CSRF_COOKIE_MASKED = False
-
############
# MESSAGES #
############