Just to be clear: > I think we should keep the old interface.
I mean as well as adding the new .headers property. (So +1) (Sorry if that was already clear.) On Tuesday, 14 July 2020 16:41:43 UTC+2, Carlton Gibson wrote: > > I think we should keep the old interface. > > The BC concerns are one point: it's every bit of Django code ever written. > To keep __setitem__ &co is a small price to pay not to needlessly break > that code. > > Beyond that though, the proposed API is very nice, but the pendulum will > swing back: having response objects conform to the Python Data Model, by > looking like dicts, will again come to seem desirable. <tone of humour>In > the meantime it'll be merely be handy that you can so use them</tone of > humour> — The number of times, "I can just..." will pay off here (IMO) > tells further against removing those special methods. > > Kind Regards, > > Carlton > > > On Tuesday, 14 July 2020 16:07:15 UTC+2, Jon Dufresne wrote: >> >> > I don't see a reason to deprecate it at all just now (though perhaps in >> _my_ ideal world that would happen at some point), but I'm not sure if it's >> worth keeping the current interface in the documentation at all? >> >> IMHO, we should eventually take the advice from the zen of Python "There >> should be one-- and preferably only one --obvious way to do it.". While we >> should not take this as dogma, I do think it is generally wise. >> >> If there are increased concerns about existing projects, perhaps we could >> delay the initial deprecation or apply some kind of extended deprecation >> period that would allow projects more time to migrate. Removing the old >> interface from the docs is a great first step. >> >> But ultimately, I think having two interfaces to solve the same tasks >> confuses new library users and makes project coding styles more difficult >> than necessary. >> >> -- 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/9a37d067-381f-46ab-bfc9-543d59a61c31o%40googlegroups.com.