tests: use venv on Python 3
This test was failing in some Python 3 environments because
`$PYTHON -m virtualenv` was somehow resulting in Python 2
being used. Why, I'm not sure.
Python 3 includes virtualenv in the standard library as the
`venv` module.
This commit changes test-install.t to use `$PYTHON -m venv` on
Python 3 and `$PYTHON -m virtualenv` on Python 2 (if available).
I chose to make some test output duplicated because we can't
have nested conditionals and there is no easy way to express
ORing of hghave checks.
Differential Revision: https://phab.mercurial-scm.org/D7224
tests: remove HGALLOWPYTHON3 reference
This variable was removed from setup.py in
c3e10f705a6c.
Differential Revision: https://phab.mercurial-scm.org/D7223
run-tests: use byte strings for inserted output
We were inserting str on Python 3 which resulted in mixed
str/bytes types on the list. This would later blow up when
trying to write str to the .err file opened in bytes mode.
Differential Revision: https://phab.mercurial-scm.org/D7222
contrib: require Python 3.7 for byteify-strings.py
bb509f39d387 made an error, it's actually 3.7 that introduced token.COMMENT.
Differential Revision: https://phab.mercurial-scm.org/D7220
packaging: add support for CentOS 8
The resulting executable has not been tested in detail yet.
I ran 'hg version' and 'hg clone', which worked fine
(except for extensions acting up due to Python 3).
Differential Revision: https://phab.mercurial-scm.org/D7216
packaging: allow choosing python version depending on centos version
Differential Revision: https://phab.mercurial-scm.org/D7217
fsmonitor: use stringutil.forcebytestr() instead of str() on an exception
Similar to
5fa8ac91190e / D7206, should get test-install.t passing on py3.
Differential Revision: https://phab.mercurial-scm.org/D7218
py3: add a __str__ method to Abort
This improves the rendering of some exceptions by avoiding raw
bytestrings, especially when using --traceback option.
py3: add Python 3 exception output to test-lfs-serve-access.t
Similar to
a973a75e92bf or
3e9c6cef949b.
automation: install black
This should unblock us from running the code formatting test in
our automated environment.
Differential Revision: https://phab.mercurial-scm.org/D7197
py3: use %d to format an int
Avoids a TypeError under py3. Fortunately this is very much an edge case since
it requires the user to have deliberately created a local tag of the form
'D\d+' that isn't truthful.
Differential Revision: https://phab.mercurial-scm.org/D7215