[Python-Dev] Is XML serialization output guaranteed to be bytewise identical forever?
storchaka at gmail.com
Tue Mar 19 09:12:18 EDT 2019
19.03.19 13:53, Ned Batchelder пише:
> Option 4 is misleading. Is anyone here really offering to "fix the
> tests in third-party modules"? Option 4 is actually, "do nothing, and
> let a multitude of projects figure out how to fix their tests, slowing
> progress in those projects as they try to support Python 3.8."
Any option except option 1 (and option 2 with sorting by default)
requires changing third-party code. You should either pass additional
argument to serialization functions, or use special canonization functions.
We should look at the problem from long perspective. Freezing the
current behavior forever does not look good. If we need to break the
user code, we should minimize the harm and provide convenient tools for
reproducing the current behavior. And this is an opportunity to rewrite
user tests in more appropriate form. In your case textual comparison may
be the most appropriate form, but this may be not so in other cases.
> Now in Python 3.8, because Python doesn't want to add an
> optional flag to continue doing what it has always done, I need to
> re-engineer my tests.
Please wait yet some time. I hope to add canonicalization before the
More information about the Python-Dev