See related discussion on ticket #23895 and its PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/32969>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Core (Serialization) => HTTP handling
* stage: Unreviewed => Accepted
Comment:
Thanks, it's worth adding that pickling `HttpResponse` with CBV crashes:
{{{
>>> import pickle
>>> response = self.client.get('/cbv_view/')
>>> pickle.dumps(response)
...
AttributeError: Can't pickle ....
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:1>
* owner: nobody => tigicion
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:2>
* has_patch: 0 => 1
Comment:
https://github.com/django/django/pull/14728
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:3>
* needs_better_patch: 0 => 1
Comment:
I agree with
[https://github.com/django/django/pull/14728#discussion_r682556877 Keryn's
comment].
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:4>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:5>
* cc: Keryn Knight (added)
* needs_better_patch: 0 => 1
Comment:
Tentatively setting the flag back; I've left feedback and proposed a first
sketch of how adapting `SimpleTemplateResponse` and `TemplateResponse`
might go.
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:6>
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:7>
* cc: Anvesh Mishra (added)
* owner: tigicion => Anvesh Mishra
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:8>
Comment (by Anvesh Mishra):
Submitted the [https://github.com/django/django/pull/15777 PR] with all
the suggested changes according to Keryn and Felix's comments on
[https://github.com/django/django/pull/14728 PR-14728]
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:9>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d7f5bfd241666c0a76e90208da1e9ef81aec44db" d7f5bfd]:
{{{
#!CommitTicketReference repository=""
revision="d7f5bfd241666c0a76e90208da1e9ef81aec44db"
Fixed #32969 -- Fixed pickling HttpResponse and subclasses.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:11>
* type: Bug => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:12>
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/32969#comment:13>
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/32969#comment:14>
* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>
* stage: Ready for checkin => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/32969#comment:15>