It also includes updating tests and documentation to use this, rather than
the old dict-like interface, i.e. `response.headers['Content-Type'] =
'application/json'` `response['Content-Type'] = 'application/json'`.
The dict-like interface won't be deprecated, but will become undocumented,
and tests added purely for backwards-compatibility.
[https://groups.google.com/u/2/g/django-developers/c/rlt1HhEaPaM Mailing
list]
[https://github.com/django/django/pull/13186 Draft PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31789>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Tom Carrick
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:1>
* needs_docs: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:2>
* needs_docs: 1 => 0
* version: 3.0 => master
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:3>
* stage: Unreviewed => Accepted
Comment:
I believe this should be accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:4>
Old description:
> This proposal is to replace `HttpResponse._headers` with
> `HttpResponse.headers` as a public interface using a variation of
> `django.utils.datasctructures.CaseInsensitiveMapping`.
>
> It also includes updating tests and documentation to use this, rather
> than the old dict-like interface, i.e. `response.headers['Content-Type']
> = 'application/json'` `response['Content-Type'] = 'application/json'`.
>
> The dict-like interface won't be deprecated, but will become
> undocumented, and tests added purely for backwards-compatibility.
>
> [https://groups.google.com/u/2/g/django-developers/c/rlt1HhEaPaM Mailing
> list]
> [https://github.com/django/django/pull/13186 Draft PR]
New description:
This proposal is to replace `HttpResponse._headers` with
`HttpResponse.headers` as a public interface using a variation of
`django.utils.datasctructures.CaseInsensitiveMapping`.
It also includes updating tests and documentation to use this, rather than
the old dict-like interface, i.e. `response.headers['Content-Type'] =
'application/json'` `response['Content-Type'] = 'application/json'`.
The dict-like interface won't be deprecated, but will become undocumented,
and tests added purely for backwards-compatibility.
[https://groups.google.com/u/2/g/django-developers/c/rlt1HhEaPaM Mailing
list]
[https://github.com/django/django/pull/13186 PR]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"bcc2befd0e9c1885e45b46d0b0bcdc11def8b249" bcc2befd]:
{{{
#!CommitTicketReference repository=""
revision="bcc2befd0e9c1885e45b46d0b0bcdc11def8b249"
Fixed #31789 -- Added a new headers interface to HttpResponse.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31789#comment:7>