mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-34160: Preserve user specified order of Element attributes (GH-10163)
This commit is contained in:
parent
18d57b4d62
commit
e3685fd5fd
4 changed files with 30 additions and 1 deletions
|
@ -923,7 +923,7 @@ def _serialize_xml(write, elem, qnames, namespaces,
|
|||
k,
|
||||
_escape_attrib(v)
|
||||
))
|
||||
for k, v in sorted(items): # lexical order
|
||||
for k, v in items:
|
||||
if isinstance(k, QName):
|
||||
k = k.text
|
||||
if isinstance(v, QName):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue