Comment (by Adam Johnson):
I opened #34484 for a report due to a related failure caused by the same
patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> Trying to access the non-picklable attributes of `HttpRequest` object
> after shallow copy leads to an `AttributeError`.
> Example:
>
> {{{
> request = HttpRequest()
> request_copy = copy(request)
> match = request_copy.resolver_match
>
> AttributeError: 'WSGIRequest' object has no attribute 'resolver_match'
> }}}
New description:
Trying to access the non-picklable attributes of `HttpRequest` and
`HttpResponse`object after shallow copy leads to an `AttributeError`.
Example:
{{{
request = HttpRequest()
request_copy = copy(request)
match = request_copy.resolver_match
AttributeError: 'WSGIRequest' object has no attribute 'resolver_match'
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:3>
Comment (by Anvesh Mishra):
Created the required [https://github.com/django/django/pull/16753 PR]. I
don't know if this patch will work as Adam pointed out various
possibilities that can occur in his
[https://code.djangoproject.com/ticket/34484 comments on this ticket].
Didn't add the regression tests yet due to the regressions added in
d7f5bfd241666c0a76e90208da1e9ef81aec44db and
6220c445c40a6a7f4d442de8bde2628346153963. Maybe we could add regressions
for `WSGIRequest` and `ASGIRequest` as pointed out by
[https://code.djangoproject.com/ticket/34484#comment:2 Adam Jhonson in
this comment].
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:4>
* owner: Anvesh Mishra => Mariusz Felisiak
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:5>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/16755 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"280ca147af9cdfce1ca9cb14cc3c5527ff6c7a02" 280ca147]:
{{{
#!CommitTicketReference repository=""
revision="280ca147af9cdfce1ca9cb14cc3c5527ff6c7a02"
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.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:7>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"173034b00589c083793d495e8b07e35be2cb1cf0" 173034b0]:
{{{
#!CommitTicketReference repository=""
revision="173034b00589c083793d495e8b07e35be2cb1cf0"
Refs #34482 -- Reverted "Fixed #32969 -- Fixed pickling HttpResponse and
subclasses."
This reverts commit d7f5bfd241666c0a76e90208da1e9ef81aec44db.
Thanks Márton Salomváry for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:8>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"791407fef16faa4da6fe2247c24a9055037dd5dd" 791407f]:
{{{
#!CommitTicketReference repository=""
revision="791407fef16faa4da6fe2247c24a9055037dd5dd"
[4.2.x] Refs #34482 -- Reverted "Fixed #32969 -- Fixed pickling
HttpResponse and subclasses."
This reverts commit d7f5bfd241666c0a76e90208da1e9ef81aec44db.
Thanks Márton Salomváry for the report.
Backport of 173034b00589c083793d495e8b07e35be2cb1cf0 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:10>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"2feb9333e7044df348c45417d23ee20b08c1a7fd" 2feb933]:
{{{
#!CommitTicketReference repository=""
revision="2feb9333e7044df348c45417d23ee20b08c1a7fd"
[4.2.x] 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.
Backport of 280ca147af9cdfce1ca9cb14cc3c5527ff6c7a02 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:9>
* status: assigned => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/34482#comment:11>