[Django] #30159: Remove obsolete use of OrderedDict with Python 3.6+

7 views
Skip to first unread message

Django

unread,
Feb 5, 2019, 3:38:34 PM2/5/19
to django-...@googlegroups.com
#30159: Remove obsolete use of OrderedDict with Python 3.6+
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: master
Uncategorized |
Severity: Normal | Keywords: ordereddict
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
With Django 3.0 supporting Python 3.6+ we can strip out some of the use of
`OrderedDict` that is no longer required now that dictionaries preserve
insertion order. Although this property of dictionaries is only a language
feature from Python 3.7, it is unlikely to be changed in a patch release
of CPython 3.6 and PyPy3 already preserves insertion order.

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

Django

unread,
Feb 5, 2019, 4:19:11 PM2/5/19
to django-...@googlegroups.com
#30159: Remove obsolete use of OrderedDict with Python 3.6+
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: ordereddict | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/10945 PR]

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

Django

unread,
Feb 5, 2019, 6:56:39 PM2/5/19
to django-...@googlegroups.com
#30159: Remove obsolete use of OrderedDict with Python 3.6+
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: ordereddict | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* component: Uncategorized => Core (Other)
* stage: Unreviewed => Ready for checkin


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

Django

unread,
Feb 6, 2019, 2:12:12 PM2/6/19
to django-...@googlegroups.com
#30159: Remove obsolete use of OrderedDict with Python 3.6+
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: | Status: closed

Cleanup/optimization |
Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: ordereddict | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

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

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


Comment:

In [changeset:"24b82cd201e21060fbc02117dc16d1702877a1f3" 24b82cd2]:
{{{
#!CommitTicketReference repository=""
revision="24b82cd201e21060fbc02117dc16d1702877a1f3"
Fixed #30159 -- Removed unneeded use of OrderedDict.

Dicts preserve order since Python 3.6.
}}}

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

Reply all
Reply to author
Forward
0 new messages