D12630: automation: transition to Windows Server 2022

2022-06-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Let's keep our Windows build environment modern by upgrading to the latest OS. As part of the upgrade, we pick up a migration to EC2Launch Version 2.

D12629: automation: refresh requirements

2022-06-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I'm hitting errors installing the old version of cffi due to an apparent issue where older versions of cffi aren't compatible with the modern Clang I'm

D12368: mercurial: use io.BytesIO instead of util.stringio

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY `util.stringio` is an alias to `io.BytesIO`. Let's just use `io.BytesIO` directly. I'm doing this because I noticed pytype was confused about types due to

D12367: hgext: use io.BytesIO instead of util.stringio

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY util.stringio is an alias to io.BytesIO. Let's just use io.BytesIO directly. I'm doing this because I noticed that in some cases pytype wasn't able

D12369: run-tests: require Python 3.6

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We recently dropped support for Python 3.5 in `setup.py`. Let's update `run-tests.py` to reflect the new reality. REPOSITORY rHG Mercurial BRANCH default

D12366: pycompat: add return type annotations

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that we're using Python 3.6+, we can start using inline type annotations. I figured a good a place as any to start would be pycompat. So this commit

D12365: import-checker: allow symbol imports from typing module

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY As we add typing annotations, we'll want to use a lot of symbols from the `typing` module. Typing `typing` all the time will be annoying. Let's allow symbol

D12364: pycompat: remove json.loads polyfill for Python 3.5

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We no longer support Python 3.5 so this can be deleted. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12364

D12363: pycompat: remove check for Python >= 3.6

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We dropped support for Python 3.5 so this is always true. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12363

D12362: hgdemandimport: delete check for Python 3.5

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We dropped support for Python 3.5. So we no longer need to do this. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12361: hg: always import hgdemandimport

2022-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The deleted if condition is always true now that we dropped Python 2 and 3.5. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12341: py3: replace pycompat.itervalues(x) with x.values()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: martinvonz. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY pycompat.itervalues(x) just calls x.values(). So this is equivalent. The rewrite was perfomed via an automated search

D12352: py3: use class X: instead of class X(object):

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The inheritance from object is implied in Python 3. So this should be equivalent.

D12353: demandimport: delete demandimportpy2 module

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We no longer support Python 2. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12353 AFFECTED FILES

D12347: py3: stop using util.iterfile()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The Python 3 implementation is a no-op. So this is equivalent. We still keep util.iterfile() around for backwards API compatibility to help the Python 3

D12351: check-code: remove ban on old-style classes

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In Python 3, `class foo:` is equivalent to `class foo(object):`. So we can allow the former form now. REPOSITORY rHG Mercurial BRANCH default REVISION

D12350: tests: remove Python 2 support code

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12350 AFFECTED FILES tests/test-mq-missingfiles.t tests/test-mq-qimport.t

D12340: py3: use str instead of pycompat.unicode

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY pycompat.unicode is an alias to str. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12340 AFFECTED FILES

D12349: tests: remove Python < 3 check

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We require Python 3 now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12349 AFFECTED FILES

D12348: cborutil: remove Python 2 definition of _elementtointeger()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12348 AFFECTED FILES mercurial/utils/cborutil.py CHANGE DETAILS diff --git

D12346: util: remove iterfile() variant for buggy EINTR handling

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The workaround for Python 2 is no longer needed. So we can delete some code. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12345: statprof: remove superfluous sys.version_info check

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Always true since we require Python 3 now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12345 AFFECTED FILES

D12342: url: remove Python 2.7 support code

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12342 AFFECTED FILES mercurial/url.py CHANGE DETAILS diff --git

D12344: policy: remove Python 2.7 compatibility code

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12344 AFFECTED FILES mercurial/policy.py CHANGE DETAILS diff --git

D12343: lsprof: remove some Python 2.7 compatibility code

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12343 AFFECTED FILES mercurial/lsprof.py CHANGE DETAILS diff --git

D12338: py3: use int instead of pycompat.long

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY pycompat.long is aliased to int. So this should have no change in functionality. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12339: ui: use input() directly

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY pycompat.rawinput() is an alias to input() REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12339 AFFECTED FILES

D12337: worker: silence type error when calling pickle

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY pytype is complaining that the argument to `pickle.load()` is not an `IO`. pytype isn't wrong: `_blockingreader` doesn't implement `io.RawIOBase`, only

D12333: revlog: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12333 AFFECTED FILES mercurial/revlog.py CHANGE DETAILS diff --git

D12335: templatekw: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12335 AFFECTED FILES mercurial/templatekw.py CHANGE DETAILS diff --git

D12336: verify: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12336 AFFECTED FILES mercurial/verify.py CHANGE DETAILS diff --git

D12332: merge: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12332 AFFECTED FILES mercurial/merge.py CHANGE DETAILS diff --git

D12334: templatefuncs: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12334 AFFECTED FILES mercurial/templatefuncs.py CHANGE DETAILS diff --git

D12330: localrepo: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12330 AFFECTED FILES mercurial/localrepo.py CHANGE DETAILS diff --git

D12326: debugcommands: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12326 AFFECTED FILES mercurial/debugcommands.py CHANGE DETAILS diff --git

D12331: manifest: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12331 AFFECTED FILES mercurial/manifest.py CHANGE DETAILS diff --git

D12328: help: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12328 AFFECTED FILES mercurial/help.py CHANGE DETAILS diff --git

D12329: keepalive: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12329 AFFECTED FILES mercurial/keepalive.py CHANGE DETAILS diff --git

D12327: dirstate: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12327 AFFECTED FILES mercurial/dirstate.py CHANGE DETAILS diff --git

D12324: commands: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12324 AFFECTED FILES mercurial/commands.py CHANGE DETAILS diff --git

D12325: config: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12325 AFFECTED FILES mercurial/config.py CHANGE DETAILS diff --git

D12323: remotefilelog: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12323 AFFECTED FILES hgext/remotefilelog/shallowutil.py CHANGE DETAILS diff

D12320: infinitepush: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12320 AFFECTED FILES hgext/infinitepush/__init__.py CHANGE DETAILS diff --git

D12322: lfs: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12322 AFFECTED FILES hgext/lfs/__init__.py hgext/lfs/pointer.py CHANGE DETAILS

D12321: largefiles: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12321 AFFECTED FILES hgext/largefiles/remotestore.py CHANGE DETAILS diff --git

D12319: convert: remove pycompat.iteritems()

2022-03-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12319 AFFECTED FILES hgext/convert/cvs.py hgext/convert/hg.py CHANGE DETAILS

D12315: setup: drop support for Python 3.5

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We talked about this on the mailing list [1] and there seemed to be agreement that Python 3.5 is effectively dead and no longer worth supporting. So

D12314: stringutil: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12314 AFFECTED FILES mercurial/utils/stringutil.py CHANGE DETAILS diff --git

D12313: procutil: delete Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This entailed deleting a function for Python 2 support and renaming the Python 3 function to match the exported symbol name. REPOSITORY rHG Mercurial

D12312: revlogutils: unconditionally pass version to random seed

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12312 AFFECTED FILES mercurial/revlogutils/docket.py CHANGE DETAILS diff --git

D12311: revlogutils: remove Python 2 variant for iter_seed

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12311 AFFECTED FILES mercurial/revlogutils/docket.py CHANGE DETAILS diff --git

D12310: charencode: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12310 AFFECTED FILES mercurial/pure/charencode.py CHANGE DETAILS diff --git

D12309: hgweb: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12309 AFFECTED FILES mercurial/hgweb/server.py CHANGE DETAILS diff --git

D12300: util: remove superfluous ispy3 test

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12300 AFFECTED FILES mercurial/util.py CHANGE DETAILS diff --git

D12307: hgweb: simplify uenv assignment

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We don't need the Python 3 conditional. We can call items() directly since we're on Python 3 now. REPOSITORY rHG Mercurial BRANCH default REVISION

D12308: hgweb: remove Python 3 conditional

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We probably have a better tobytes() implementation somewhere in pycompat. But I don't want to bloat scope of this commit. REPOSITORY rHG Mercurial BRANCH

D12306: chgserver: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The logic here is more complicated than most Python 2/3 support code. But the rewritten logic should be identical. REPOSITORY rHG Mercurial BRANCH

D12305: chgserver: remove Python 2 branch

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12305 AFFECTED FILES mercurial/chgserver.py CHANGE DETAILS diff --git

D12303: wireprotoframing: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12303 AFFECTED FILES mercurial/wireprotoframing.py CHANGE DETAILS diff --git

D12304: worker: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12304 AFFECTED FILES mercurial/worker.py CHANGE DETAILS diff --git

D12302: windows: remove write throttling support

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This mode would only be active on Python 2, which is no longer supported. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12301: windows: remove conditional for Python 3

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12301 AFFECTED FILES mercurial/windows.py CHANGE DETAILS diff --git

D12298: keepalive: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12298 AFFECTED FILES mercurial/keepalive.py CHANGE DETAILS diff --git

D12297: extensions: remove superfluous pycompat.ispy3 check

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is always True now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12297 AFFECTED FILES

D12294: dispatch: remove Python 2 function variants

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12294 AFFECTED FILES mercurial/dispatch.py CHANGE DETAILS diff --git

D12299: urllibcompat: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We had to move the `import` statements to appease the import checker. This whole module could probably be deleted as its point in life is to pave over

D12296: archival: remove check for Python 2

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12296 AFFECTED FILES mercurial/archival.py CHANGE DETAILS diff --git

D12295: encoding: remove Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12295 AFFECTED FILES mercurial/encoding.py CHANGE DETAILS diff --git

D12291: formatter: remove conditional assert

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We always run on Python 3 now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12291 AFFECTED FILES

D12292: error: unconditionally define __str__

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We always run on Python 3 now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12292 AFFECTED FILES

D12293: config: remove conditional asserts

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We always run on Python 3 now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12293 AFFECTED FILES

D12287: match: delete Python 2 conditional code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12287 AFFECTED FILES mercurial/match.py CHANGE DETAILS diff --git

D12290: httppeer: inline simplified _reqdata()

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The function can be reduced to an attribute lookup on Python 3. So inline it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12289: url: remove passing of strict

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This was needed to support Python 2.7. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12289 AFFECTED FILES

D12288: posix: delete Python 2 support code

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12288 AFFECTED FILES mercurial/posix.py CHANGE DETAILS diff --git

D12286: mail: delete conditional code for Python 2

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12286 AFFECTED FILES mercurial/mail.py CHANGE DETAILS diff --git

D12284: check-code: allow importing Python 3 modules

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that we no longer support Python 2, we should be able to import and use the Python 3 only modules in our code. So remove a lint banning this. REPOSITORY

D12285: archival: remove GzipFileWithTime

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This was required for Python 2 support, which we no longer need to support. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12265: packaging: remove py2exe / Python 2.7 support

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This commit started by deleting references to py2exe (which is only used on Python 2). After pulling the thread, quite a lot of code was orphaned and was

D12267: packaging: remove requirements constraints to support Python 2

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We just deleted support for Python 2 from the packaging code. We no longer need these package constraints in the requirements file to support Python 2.

D12262: automation: drop support for Python 2.7 in Linux environment

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We stop installing Python 2.7 via pyenv. We stop installing the system Python 2 packages. We delete support for running tests on Python 2.7. REPOSITORY rHG

D12264: automation: delete code related to Python 2.7 support

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The building of Inno and WiX installers took a python_version argument that allowed us to specify "2" or "3" for the major Python version. Since we no longer

D12263: automation: drop support for Python 2.7 in Windows environment

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We stop installing Python 2.7 in the Windows environment. We remove support for building Python 2.7 wheels and installers. There is still some Python

D12260: automation: run hg with python3

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Python 2.7 support will go away soon. Let's use Python 3 as part of the automation. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12261: automation: make system3 the default for run-tests-linux

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We'll soon drop support for Python 2.7. Let's use Python 3 by default. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12259: tests: move Python 3.5 check higher in file

2022-03-02 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Per code review comment on the changeset that introduced the Python 3.5+ checks. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12255: tests: remove from __future__ from inline Python in tests

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is no longer required since we require Python 3 and the linter no longer requires these statements. REPOSITORY rHG

D12258: py2: drop some more from __future__ statements

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These are no longer needed after dropping support for Python 2. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12253: tests: remove output conditionalized on no-py3

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I simply did a search for `^.* \(no-py3 !\)\n` and removed all matched lines. There are still some references to no-py3. But these were the simpler ones to

D12249: py3: use pickle directly

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY pycompat.pickle abstracted over the different pickle modules in Python 2 and 3. Now that we're Python 3 only, it is safe to

D12257: tests: delete some no-py3 blocks

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY And drop some nearby avoidable py3 checks in close proximity while we are here. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12256: tests: remove __future__ import from test-debugcommands.t

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This one is slightly more involved since it affects test output. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12252: py3: use io.BytesIO directly

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, pycompat.bytesio and pycompat.stringio referred to io.BytesIO. And util.bytesio and util.stringio aliased the pycompat symbols. This

D12254: py2: remove simple from __future__ statements

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: durin42. Herald added a reviewer: durin42. Herald added a reviewer: martinvonz. Herald added a reviewer: martinvonz. Herald added subscribers: mercurial-patches, Kwan. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These were

D12248: thirdparty: delete concurrent.futures

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that we require Python 3 we no longer need this library as the functionality provided by the standard library is sufficient. REPOSITORY rHG Mercurial

D12250: pycompat: remove large Python 2 block

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D12251: check-py3-compat: drop support for Python 2

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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

D12247: pycompat: remove first not ispy3 block

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We now require Python 3. So we can remove the first block supporting Python 2. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D12246: import-checker: assume absolute and use modern import checker

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Since we require Python 3 now, we can assume we always use absolute imports and the modern import checker should be used. REPOSITORY rHG Mercurial BRANCH

D12244: tests: remove last references to PYTHON3

2022-03-01 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This removes the last references to PYTHON3. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D12244 AFFECTED

  1   2   3   4   5   6   7   8   9   10   >