Message330013
> 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". |
|
Date |
User |
Action |
Args |
2018-11-16 19:52:14 | rhettinger | set | recipients:
+ rhettinger, scoder, vstinner, taleinat, nedbat, eli.bendersky, serhiy.storchaka, Mariatta, dfrojas |
2018-11-16 19:52:14 | rhettinger | set | messageid: <1542397934.54.0.788709270274.issue34160@psf.upfronthosting.co.za> |
2018-11-16 19:52:14 | rhettinger | link | issue34160 messages |
2018-11-16 19:52:14 | rhettinger | create | |
|