diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-04-12 09:25:45 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-04-12 18:52:43 +0200 |
commit | 280ca147af9cdfce1ca9cb14cc3c5527ff6c7a02 (patch) | |
tree | 2eabfca62fb35d84343ec7317dd7ea10b396bda1 /django/http/request.py | |
parent | dfc720c521062cdefd64bc48a11838b0fa583439 (diff) | |
download | django-280ca147af9cdfce1ca9cb14cc3c5527ff6c7a02.tar.gz |
Fixed #34484, Refs #34482 -- Reverted "Fixed #29186 -- Fixed pickling HttpRequest and subclasses."
This reverts commit 6220c445c40a6a7f4d442de8bde2628346153963.
Thanks Adam Johnson and Márton Salomváry for reports.
Diffstat (limited to 'django/http/request.py')
-rw-r--r-- | django/http/request.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/django/http/request.py b/django/http/request.py index 2ef9dfd649..be6823cacb 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -55,8 +55,6 @@ class HttpRequest: _encoding = None _upload_handlers = [] - non_picklable_attrs = frozenset(["resolver_match", "_stream"]) - def __init__(self): # WARNING: The `WSGIRequest` subclass doesn't call `super`. # Any variable assignment made here should also happen in @@ -84,21 +82,6 @@ class HttpRequest: self.get_full_path(), ) - def __getstate__(self): - obj_dict = self.__dict__.copy() - for attr in self.non_picklable_attrs: - if attr in obj_dict: - del obj_dict[attr] - return obj_dict - - def __deepcopy__(self, memo): - obj = copy.copy(self) - for attr in self.non_picklable_attrs: - if hasattr(self, attr): - setattr(obj, attr, copy.deepcopy(getattr(self, attr), memo)) - memo[id(self)] = obj - return obj - @cached_property def headers(self): return HttpHeaders(self.META) |