Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> 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".

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34160>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to