Opened 19 months ago
Closed 19 months ago
#34482 closed Bug (fixed)
Unable to access "non-picklable" attributes of empty HttpRequest and HttpResponse objects after shallow copy.
Reported by: | Anvesh Mishra | Owned by: | Mariusz Felisiak |
---|---|---|---|
Component: | HTTP handling | Version: | 4.2 |
Severity: | Release blocker | Keywords: | |
Cc: | Mariusz Felisiak | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
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'
Change History (11)
comment:1 by , 19 months ago
Severity: | Normal → Release blocker |
---|---|
Summary: | Unable to access non-picklable attributes of HttpRequest and HttpResponse objects after shallow copy. → Unable to access "non-picklable" attributes of empty HttpRequest and HttpResponse objects after shallow copy. |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 19 months ago
I opened #34484 for a report due to a related failure caused by the same patch.
comment:3 by , 19 months ago
Description: | modified (diff) |
---|
comment:4 by , 19 months ago
Created the required PR. I don't know if this patch will work as Adam pointed out various possibilities that can occur in his 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 Adam Jhonson in this comment.
comment:5 by , 19 months ago
Owner: | changed from | to
---|
comment:11 by , 19 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Regressions in d7f5bfd241666c0a76e90208da1e9ef81aec44db and 6220c445c40a6a7f4d442de8bde2628346153963.
Thanks Márton Salomváry for the report.