tests: conditionalize output for Python 3
It appears that the random.randint() behavior is different between Python 2
and Python 3. So make the test conditional on that.
This makes the test pass on Python 3.7 (and presumably other Python 3 versions).
Differential Revision: https://phab.mercurial-scm.org/D6964
hg: remove HGUNICODEPEDANTRY and RTUNICODEPEDANTRY
This was added in
73e4a02e6d23 and
89822d7a9d5f as a preliminary
way to better support Python 3. With the Python 3 port nearly done
and better procedures in place, we shouldn't need it.
Differential Revision: https://phab.mercurial-scm.org/D6991
convert: use pycompat.fsencode()
This avoids a
`TypeError: Can't mix strings and bytes in path components`.
Differential Revision: https://phab.mercurial-scm.org/D6965
tests: make tarball output conditional on Python version
Python 3.8 changed the default tar file archive format:
https://docs.python.org/3.8/whatsnew/3.8.html#tarfile.
This commit teaches our tests about the new behavior.
Differential Revision: https://phab.mercurial-scm.org/D6986
tests: conditionalize test-run-tests.t for Python 3.8
It looks like Python 3.8 changed the pretty XML formatting slightly
to strip some whitespace. Let's teach our tests about that.
Differential Revision: https://phab.mercurial-scm.org/D6988
hgweb: use importlib.reload() if available
reload() was nuked in Python 3. We need to use importlib.reload()
instead.
But pyflakes isn't smart enough to detect our conditional usage, so
we allow this error.
Differential Revision: https://phab.mercurial-scm.org/D6992
tests: allow xrange warning from perf.py
The use of xrange in this file is acceptable.
We need to make the output optional - and not conditional on
the Python version - because `pyflakes` could be executed by any
Python version and pyflakes behaves differently depending on the
Python version.
Differential Revision: https://phab.mercurial-scm.org/D6990
debugsidedata: fix verbose mode on python3
We need to be gently with python3 for it to display this binary data.
Differential Revision: https://phab.mercurial-scm.org/D6995
examples: include a sample of how to use black with fix
It's commented out for now since my patch hasn't landed, but we can
uncomment it when that lands.
Differential Revision: https://phab.mercurial-scm.org/D6974