summaryrefslogtreecommitdiff
path: root/slixmpp/xmlstream
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-06 17:08:00 +0100
committermathieui <mathieui@mathieui.net>2020-12-06 17:08:00 +0100
commitbcd8cf085f528c602f78cba2c9eb2d784eb993da (patch)
treeb7d76a453597a5a6cbdc0347f21f4d9fdfa568d5 /slixmpp/xmlstream
parent73cc2a40082cf936221adb09cfe208bd06cd4b60 (diff)
parentcd4c9f82fc8d17726baa4b4a69c54151fb181f40 (diff)
downloadslixmpp-bcd8cf085f528c602f78cba2c9eb2d784eb993da.tar.gz
slixmpp-bcd8cf085f528c602f78cba2c9eb2d784eb993da.tar.bz2
slixmpp-bcd8cf085f528c602f78cba2c9eb2d784eb993da.tar.xz
slixmpp-bcd8cf085f528c602f78cba2c9eb2d784eb993da.zip
Merge branch 'no-ordered-stuff' into 'master'
Remove usage of OrderedDict See merge request poezio/slixmpp!77
Diffstat (limited to 'slixmpp/xmlstream')
-rw-r--r--slixmpp/xmlstream/stanzabase.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/slixmpp/xmlstream/stanzabase.py b/slixmpp/xmlstream/stanzabase.py
index 925f2abc..141197ba 100644
--- a/slixmpp/xmlstream/stanzabase.py
+++ b/slixmpp/xmlstream/stanzabase.py
@@ -21,7 +21,6 @@ from xml.etree import ElementTree as ET
from slixmpp.xmlstream import JID
from slixmpp.xmlstream.tostring import tostring
-from collections import OrderedDict
log = logging.getLogger(__name__)
@@ -392,7 +391,7 @@ class ElementBase(object):
#: An ordered dictionary of plugin stanzas, mapped by their
#: :attr:`plugin_attrib` value.
- self.plugins = OrderedDict()
+ self.plugins = {}
self.loaded_plugins = set()
#: A list of child stanzas whose class is included in
@@ -541,7 +540,7 @@ class ElementBase(object):
.. versionadded:: 1.0-Beta1
"""
- values = OrderedDict()
+ values = {}
values['lang'] = self['lang']
for interface in self.interfaces:
if isinstance(self[interface], JID):
@@ -726,8 +725,6 @@ class ElementBase(object):
if lang and attrib in self.lang_interfaces:
kwargs['lang'] = lang
- kwargs = OrderedDict(kwargs)
-
if attrib in self.interfaces or attrib == 'lang':
if value is not None:
set_method = "set_%s" % attrib.lower()
@@ -813,8 +810,6 @@ class ElementBase(object):
if lang and attrib in self.lang_interfaces:
kwargs['lang'] = lang
- kwargs = OrderedDict(kwargs)
-
if attrib in self.interfaces or attrib == 'lang':
del_method = "del_%s" % attrib.lower()
@@ -929,7 +924,7 @@ class ElementBase(object):
name = self._fix_ns(name)
default_lang = self.get_lang()
- results = OrderedDict()
+ results = {}
stanzas = self.xml.findall(name)
if stanzas:
for stanza in stanzas: