Opened 5 years ago

Closed 5 years ago

#30159 closed Cleanup/optimization (fixed)

Remove obsolete use of OrderedDict with Python 3.6+

Reported by: Nick Pope Owned by: Nick Pope
Component: Core (Other) Version: dev
Severity: Normal Keywords: ordereddict
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (3)

comment:1 by Nick Pope, 5 years ago

Has patch: set

comment:2 by Tim Graham, 5 years ago

Component: UncategorizedCore (Other)
Triage Stage: UnreviewedReady for checkin

comment:3 by Tim Graham <timograham@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 24b82cd2:

Fixed #30159 -- Removed unneeded use of OrderedDict.

Dicts preserve order since Python 3.6.

Note: See TracTickets for help on using tickets.
Back to Top