This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Mariatta, dfrojas, eli.bendersky, nedbat, rhettinger, scoder, serhiy.storchaka, taleinat, vstinner
Date 2018-11-16.19:52:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542397934.54.0.788709270274.issue34160@psf.upfronthosting.co.za>
In-reply-to
Content
> It seemed like we were close to a consensus about adding 
> back the option to sort the attributes, or did I 
> misunderstand?

Adding a sort() option to prettyxml() seems perfectly reasonable.  I wouldn't extend any of the other APIs though.

Also, it is reasonable to consider adding a standards compliant canonicalization tool.

> Without the sorted attributes, 3.8 fails the test.

It seems to me that the test should be improved as well so that it doesn't rely on implementation details.  The usual way to test serialization is to verify that it round trips.

Unless the test is improved to not rely on implementation details, I'm concerned that we'll end-up having this conversation again if any other serialization improvements are made.

So yes, I support adding a sort() option to prettyxml() and adding a canonicalization tool, but no I don't agree with the premise that Py 2.7, 3.4, 3.5, 3.6, 3.7, 3.8 were required to now and forever always produce byte-by-byte identical output -- afaict that was never a promised behavior, so any test that relies on that premise should be improved.

FWIW, when I described the existing test as being "fragile", it wasn't a pejorative, I meant it in the literal sense of "easily broken".
History
Date User Action Args
2018-11-16 19:52:14rhettingersetrecipients: + rhettinger, scoder, vstinner, taleinat, nedbat, eli.bendersky, serhiy.storchaka, Mariatta, dfrojas
2018-11-16 19:52:14rhettingersetmessageid: <1542397934.54.0.788709270274.issue34160@psf.upfronthosting.co.za>
2018-11-16 19:52:14rhettingerlinkissue34160 messages
2018-11-16 19:52:14rhettingercreate