From cfff2af02be40106d4759cc6f8bfa476ce82421c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 17 Feb 2017 19:45:34 -0500 Subject: Fixed #27857 -- Dropped support for Python 3.4. --- django/http/cookie.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'django/http') diff --git a/django/http/cookie.py b/django/http/cookie.py index 52dff786c4..b94d2b0386 100644 --- a/django/http/cookie.py +++ b/django/http/cookie.py @@ -1,20 +1,7 @@ -import sys from http import cookies -# Cookie pickling bug is fixed in Python 3.4.3+ -# http://bugs.python.org/issue22775 -if sys.version_info >= (3, 4, 3): - SimpleCookie = cookies.SimpleCookie -else: - Morsel = cookies.Morsel - - class SimpleCookie(cookies.SimpleCookie): - def __setitem__(self, key, value): - if isinstance(value, Morsel): - # allow assignment of constructed Morsels (e.g. for pickling) - dict.__setitem__(self, key, value) - else: - super().__setitem__(key, value) +# For backwards compatibility in Django 2.1. +SimpleCookie = cookies.SimpleCookie def parse_cookie(cookie): -- cgit v1.3