Movatterモバイル変換
[0]ホーム
[Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?
Antoine Pitrousolipsis at pitrou.net
Tue Mar 19 08:50:56 EDT 2019
Hi Raymond,As long as the new serialization order is deterministic (i.e. it's thesame every run and doesn't depend on e.g. hash randomization), then Ithink it's fine to change it.Some more comments / questions:> 2). Go into every XML module and add attribute sorting options to each function that generate xml.What do you mean with "every XML module"? Are there many of them?> Regardless of option chosen, we should make explicit whether on not the Python standard library modules guarantee cross-release bytewise identical output for XML.IMO we certainly shouldn't. XML is a serialization format used formachine interoperability (even though "human-editable" was one of itsselling points at the start, rather misguidingly). However, the outputshould ideally be stable and deterministic accross all releases of agiven bugfix branch.(i.e., if I run the same code multiple times on all 3.7.x versions, Ishould get always the same output)RegardsAntoine.
More information about the Python-Devmailing list
[8]ページ先頭