From 24b82cd201e21060fbc02117dc16d1702877a1f3 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Tue, 5 Feb 2019 11:22:08 +0000 Subject: Fixed #30159 -- Removed unneeded use of OrderedDict. Dicts preserve order since Python 3.6. --- django/utils/xmlutils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'django/utils/xmlutils.py') diff --git a/django/utils/xmlutils.py b/django/utils/xmlutils.py index 1a14034243..e4607b9865 100644 --- a/django/utils/xmlutils.py +++ b/django/utils/xmlutils.py @@ -3,7 +3,6 @@ Utilities for XML generation/parsing. """ import re -from collections import OrderedDict from xml.sax.saxutils import XMLGenerator @@ -30,5 +29,5 @@ class SimplerXMLGenerator(XMLGenerator): def startElement(self, name, attrs): # Sort attrs for a deterministic output. - sorted_attrs = OrderedDict(sorted(attrs.items())) if attrs else attrs + sorted_attrs = dict(sorted(attrs.items())) if attrs else attrs super().startElement(name, sorted_attrs) -- cgit v1.3