Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Feb 2022 14:52:40 -0700] rev 48872
check-py3-compat: drop support for Python 2
We no longer support Python 2 so we can drop support for linting code
for Python 2 support.
This gets rid of the check for `from __future__`, enabling us to delete
those imports.
Differential Revision: https://phab.mercurial-scm.org/D12251
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 07:59:42 -0800] rev 48871
pycompat: remove large Python 2 block
We no longer support Python 2. So we can delete its compatibility
code and remove the conditional and dedent the Python 3 code.
In order to make the linter happy, we had to inline imports in the
stanza at the top of the file.
Differential Revision: https://phab.mercurial-scm.org/D12250
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:29:03 -0800] rev 48870
py3: use pickle directly
pycompat.pickle abstracted over the different pickle modules in
Python 2 and 3. Now that we're Python 3 only, it is safe to use the
`pickle` module directly. So this commit does that.
As part of this we remove the rules from check-code.py that were
forbidden direct pickle module use.
We retain the `util.pickle` symbol for backwards compatibility, just
in case some extensions were using it.
Differential Revision: https://phab.mercurial-scm.org/D12249
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 02 Mar 2022 17:51:27 -0800] rev 48869
pycompat: remove first not ispy3 block
We now require Python 3. So we can remove the first block supporting
Python 2.
Differential Revision: https://phab.mercurial-scm.org/D12247
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Feb 2022 13:43:44 -0700] rev 48868
import-checker: assume absolute and use modern import checker
Since we require Python 3 now, we can assume we always use absolute
imports and the modern import checker should be used.
Differential Revision: https://phab.mercurial-scm.org/D12246
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Feb 2022 13:29:47 -0700] rev 48867
tests: unconditionalize some imports
Now that we require Python 3 we can simplify these imports.
Differential Revision: https://phab.mercurial-scm.org/D12245
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Feb 2022 13:27:38 -0700] rev 48866
tests: remove last references to PYTHON3
This removes the last references to PYTHON3.
Differential Revision: https://phab.mercurial-scm.org/D12244