[Django] #18659: Remove `request.REQUEST`

31 views
Skip to first unread message

Django

unread,
Jul 23, 2012, 4:08:23 PM7/23/12
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
------------------------------------------------+------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
`request.REQUEST` provides indifferent access to `request.GET` or
`request.POST` (PHP style).

This attribute is a legacy from the pre-1.0 days, when you could access
the `GET` or `POST` data using dict syntax on the request object.
`request.REQUEST` was introduced in 1.0 to make this operation more
explicit, with an easy upgrade path.

It's hardly ever a good design pattern to handle `GET` and `POST`
identically, and it's our responsibility not to provide tools who are more
likely to result in bad code than anything else. So I think it's time to
deprecate this attribute.

We could deprecate `django.utils.datastructures.MergeDict` at the same
time — it's a 100-lines long class whose sole purpose is to support
`request.REQUEST`.

--
Ticket URL: <https://code.djangoproject.com/ticket/18659>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 23, 2012, 4:09:14 PM7/23/12
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Alex):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:1>

Django

unread,
Jul 23, 2012, 4:21:38 PM7/23/12
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by aaugustin):

This may break a lot of code, so this isn't a decision to make lightly.

Django itself uses `request.REQUEST` in i18n views, auth, and admin.

--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:2>

Django

unread,
Jul 23, 2012, 5:14:55 PM7/23/12
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by mjtamlyn):

* cc: marc.tamlyn@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:3>

Django

unread,
Jul 24, 2012, 5:27:13 AM7/24/12
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by eduardocereto):

* cc: eduardocereto@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:4>

Django

unread,
Mar 14, 2013, 6:08:04 PM3/14/13
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------

Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: HTTP handling | Version: 1.4

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by aaugustin):

* component: Core (Other) => HTTP handling


--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:5>

Django

unread,
Mar 17, 2013, 2:33:12 PM3/17/13
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------

Reporter: aaugustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: HTTP handling | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by bmispelon):

* cc: bmispelon@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:6>

Django

unread,
Oct 15, 2013, 4:42:07 PM10/15/13
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: bouke
Type: Cleanup/optimization | Status: assigned

Component: HTTP handling | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by bouke):

* status: new => assigned
* owner: nobody => bouke


Comment:

I've proposed a deprecation in-between PR:
https://github.com/django/django/pull/1756

--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:7>

Django

unread,
Oct 16, 2013, 7:15:30 AM10/16/13
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: bouke
Type: Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* version: 1.4 => master


Comment:

Mailing list thread to make sure there is consensus to move forward with
this:
https://groups.google.com/d/topic/django-developers/yw7OPb_O0QA/discussion

The patch would also need to be updated to reflect the fact that the
deprecation would start in 1.7 (1.6 is feature frozen at this time).

--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:8>

Django

unread,
Oct 17, 2013, 9:59:42 AM10/17/13
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: bouke
Type: Cleanup/optimization | Status: closed

Component: HTTP handling | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"2fb5a51fa3ac276efc7121ec9de91f092a986104"]:
{{{
#!CommitTicketReference repository=""
revision="2fb5a51fa3ac276efc7121ec9de91f092a986104"
Fixed #18659 -- Deprecated request.REQUEST and MergeDict

Thanks Aymeric Augustin for the suggestion.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:9>

Django

unread,
Jan 17, 2015, 8:12:23 AM1/17/15
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: bouke
Type: Cleanup/optimization | Status: closed
Component: HTTP handling | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"75f107b8842dfc890ddd65262bd09ca87c3a15be"]:
{{{
#!CommitTicketReference repository=""
revision="75f107b8842dfc890ddd65262bd09ca87c3a15be"
Removed request.REQUEST per deprecation timeline; refs #18659.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:10>

Django

unread,
Jan 17, 2015, 8:21:53 AM1/17/15
to django-...@googlegroups.com
#18659: Remove `request.REQUEST`
--------------------------------------+------------------------------------
Reporter: aaugustin | Owner: bouke
Type: Cleanup/optimization | Status: closed
Component: HTTP handling | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"37b7776a015102e97b9bdd64d88c732883ff9989"]:
{{{
#!CommitTicketReference repository=""
revision="37b7776a015102e97b9bdd64d88c732883ff9989"
Removed django.utils.datastructures.MergeDict per deprecation timeline;
refs #18659.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18659#comment:11>

Reply all
Reply to author
Forward
0 new messages