I guess there is still some debate on how to handle the old interface. I'll give my opinion, but I want to make it clear I don't mind that much what we do with it.
When I've seen people learning Django, they come across these magical strings you somehow add to the response, but aren't content, that does magical things like make the content download rather than show in the browser. To people who don't yet understand HTTP, this feels very... well, magical. This new interface has the advantage of being extremely clear what's happening to people who are less familiar with HTTP than we are. It's setting a header, it's right there in the name. I also feel it's much more explicit. I would prefer "one right way to do it", but I also don't see a compelling reason to deprecate the old interface. It's been there forever, a huge amount of code uses it, and I don't see a problem with leaving it there. The way it's implemented is just interacting with the new headers anyway, so it should be trivial to keep them in sync. Adam has suggested in the PR to note that it "may" be deprecated in the future. Even if we don't actually plan to do this, I like it. It's sneaky, we get people to hopefully migrate to the newer interface but don't break people's code, at least for a good long time. To summarise, I'm: +1 for the new interface. +1 for keeping the old interface. -0 for documenting the old interface as an alternative. On Wed, 15 Jul 2020 at 11:43, Javier Buzzi <buzzi.jav...@gmail.com> wrote: > @Tom looks great, should we add depreciation notices to the > response.__gettitem__/del that way there are no 2 right ways to do things? > I would probably keep it around until 3.2... I personally like the whole > respose.headers it's much more readable. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/86889efe-b876-46cc-8dc4-1559d6a6487do%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/86889efe-b876-46cc-8dc4-1559d6a6487do%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAHoz%3DMa7VDDSVj-5e1yF0RrCr0WKxujpN2-LwQc3NQNNT92V%3DQ%40mail.gmail.com.