-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-34160: Preserves order of minidom of Element attributes #10219
bpo-34160: Preserves order of minidom of Element attributes #10219
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
Lib/xml/etree/ElementTree.py
Outdated
@@ -979,7 +979,7 @@ def _serialize_html(write, elem, qnames, namespaces, **kwargs): | |||
k, | |||
_escape_attrib(v) | |||
)) | |||
for k, v in sorted(items): # lexical order | |||
for k, v in items: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I did not realize that @serhiy-storchaka have made that changes some minutes before this PR.
Lib/xml/dom/minidom.py
Outdated
@@ -854,7 +854,7 @@ def writexml(self, writer, indent="", addindent="", newl=""): | |||
writer.write(indent+"<" + self.tagName) | |||
|
|||
attrs = self._get_attributes() | |||
a_names = sorted(attrs.keys()) | |||
a_names = attrs.keys() | |||
|
|||
for a_name in a_names: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for a_name in a_names: | |
for a_name in attrs.keys(): |
@@ -642,6 +642,13 @@ Functions | |||
:class:`Element` instance and a dictionary. | |||
|
|||
|
|||
.. function:: _serialize_html(self, writer, indent="", addindent="", newl="") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, please don't document private functions.
@vstinner @serhiy-storchaka I had conflicts doing the changes, the PR has commits from other developers. It's better if I close this PR and open a new one? |
Something wrong happen when you synchronized your branch with master. Did you run |
@dfrojas, I recommend:
|
@serhiy-storchaka Do I have to write a NEWS specifically for minidom? Or with the NEWS in this PR is enough? |
Perhaps just update the NEWS entry you referenced and add "minidom" after "ElementTree". |
Either add a new news entry, or update an existing entry added for #10219. The rest LGTM. |
This PR is a continuation of the work in #10163
https://bugs.python.org/issue34160