diff options
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/cookie.py | 3 | ||||
| -rw-r--r-- | django/http/request.py | 9 |
2 files changed, 0 insertions, 12 deletions
diff --git a/django/http/cookie.py b/django/http/cookie.py index 5c418d7e35..b94d2b0386 100644 --- a/django/http/cookie.py +++ b/django/http/cookie.py @@ -3,9 +3,6 @@ from http import cookies # For backwards compatibility in Django 2.1. SimpleCookie = cookies.SimpleCookie -# Add support for the SameSite attribute (obsolete when PY37 is unsupported). -cookies.Morsel._reserved.setdefault('samesite', 'SameSite') - def parse_cookie(cookie): """ diff --git a/django/http/request.py b/django/http/request.py index bdf9b508b1..79fc8350fd 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -18,19 +18,10 @@ from django.utils.datastructures import ( from django.utils.encoding import escape_uri_path, iri_to_uri from django.utils.functional import cached_property from django.utils.http import is_same_domain -from django.utils.inspect import func_supports_parameter from django.utils.regex_helper import _lazy_re_compile from .multipartparser import parse_header -# TODO: Remove when dropping support for PY37. inspect.signature() is used to -# detect whether the max_num_fields argument is available as this security fix -# was backported to Python 3.6.8 and 3.7.2, and may also have been applied by -# downstream package maintainers to other versions in their repositories. -if not func_supports_parameter(parse_qsl, 'max_num_fields'): - from django.utils.http import parse_qsl - - RAISE_ERROR = object() host_validation_re = _lazy_re_compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$") |
