Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 07:56:47 -0800] rev 48940
util: remove iterfile() variant for buggy EINTR handling
The workaround for Python 2 is no longer needed. So we can delete some
code.
Differential Revision: https://phab.mercurial-scm.org/D12346
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 12:36:57 -0700] rev 48939
statprof: remove superfluous sys.version_info check
Always true since we require Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12345
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 12:36:04 -0700] rev 48938
policy: remove Python 2.7 compatibility code
Differential Revision: https://phab.mercurial-scm.org/D12344
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 12:35:29 -0700] rev 48937
lsprof: remove some Python 2.7 compatibility code
Differential Revision: https://phab.mercurial-scm.org/D12343
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 12:34:22 -0700] rev 48936
url: remove Python 2.7 support code
Differential Revision: https://phab.mercurial-scm.org/D12342
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:52:32 -0800] rev 48935
py3: replace pycompat.itervalues(x) with x.values()
pycompat.itervalues(x) just calls x.values(). So this is equivalent.
The rewrite was perfomed via an automated search and replace.
Differential Revision: https://phab.mercurial-scm.org/D12341
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:24:57 -0700] rev 48934
py3: use str instead of pycompat.unicode
pycompat.unicode is an alias to str.
Differential Revision: https://phab.mercurial-scm.org/D12340
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 08 Mar 2022 10:58:22 +0100] rev 48933
ui: use input() directly
pycompat.rawinput() is an alias to input()
Differential Revision: https://phab.mercurial-scm.org/D12339
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:50:34 -0800] rev 48932
py3: use int instead of pycompat.long
pycompat.long is aliased to int. So this should have no change in
functionality.
Differential Revision: https://phab.mercurial-scm.org/D12338
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:13:37 -0700] rev 48931
verify: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12336
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:13:15 -0700] rev 48930
templatekw: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12335
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:12:47 -0700] rev 48929
templatefuncs: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12334
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:12:26 -0700] rev 48928
revlog: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12333
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:11:59 -0700] rev 48927
merge: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12332
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:11:27 -0700] rev 48926
manifest: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12331
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:10:47 -0700] rev 48925
localrepo: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12330
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:10:27 -0700] rev 48924
keepalive: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12329
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:10:08 -0700] rev 48923
help: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12328
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:09:30 -0700] rev 48922
dirstate: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12327
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:08:53 -0700] rev 48921
debugcommands: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12326
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:47:37 -0800] rev 48920
config: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12325
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:08:04 -0700] rev 48919
commands: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12324
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:07:29 -0700] rev 48918
remotefilelog: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12323
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:06:46 -0700] rev 48917
lfs: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12322
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:46:06 -0800] rev 48916
largefiles: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12321
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 11:05:42 -0700] rev 48915
infinitepush: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12320
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:44:59 -0800] rev 48914
convert: remove pycompat.iteritems()
Differential Revision: https://phab.mercurial-scm.org/D12319
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 18:28:30 -0800] rev 48913
global: bulk replace simple pycompat.iteritems(x) with x.items()
pycompat.iteritems() just calls .items().
This commit applies a regular expression search and replace to convert
simple instances of pycompat.iteritems() with .items(). There are still
a handful of calls to pycompat.iteritems() remaining. But these all have
more complicated expressions that I wasn't comfortable performing an
automated replace on. In addition, some simple replacements were withheld
because they broke pytype. These will be handled by their own changesets.
Differential Revision: https://phab.mercurial-scm.org/D12318
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 17:39:20 -0800] rev 48912
worker: silence type error when calling pickle
pytype is complaining that the argument to `pickle.load()` is not an
`IO`. pytype isn't wrong: `_blockingreader` doesn't implement
`io.RawIOBase`, only `read()` and `readline()`. But it appears this is
enough for pickle. So we silence the false positive.
This fixes a regression introduced by D12304 /
cc0e059d2af8: worker: remove Python 2 support code.
Differential Revision: https://phab.mercurial-scm.org/D12337
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:53:09 -0700] rev 48911
stringutil: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12314
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:52:27 -0700] rev 48910
procutil: delete Python 2 support code
This entailed deleting a function for Python 2 support and renaming the
Python 3 function to match the exported symbol name.
Differential Revision: https://phab.mercurial-scm.org/D12313
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Mar 2022 20:37:09 -0800] rev 48909
revlogutils: unconditionally pass version to random seed
Differential Revision: https://phab.mercurial-scm.org/D12312
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:48:45 -0700] rev 48908
revlogutils: remove Python 2 variant for iter_seed
Differential Revision: https://phab.mercurial-scm.org/D12311
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:47:31 -0700] rev 48907
charencode: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12310
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:47:08 -0700] rev 48906
hgweb: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12309
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 08:06:37 -0800] rev 48905
hgweb: remove Python 3 conditional
We probably have a better tobytes() implementation somewhere in pycompat.
But I don't want to bloat scope of this commit.
Differential Revision: https://phab.mercurial-scm.org/D12308
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:45:24 -0700] rev 48904
hgweb: simplify uenv assignment
We don't need the Python 3 conditional. We can call items() directly
since we're on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12307
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:43:58 -0700] rev 48903
chgserver: remove Python 2 support code
The logic here is more complicated than most Python 2/3 support code.
But the rewritten logic should be identical.
Differential Revision: https://phab.mercurial-scm.org/D12306
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:40:58 -0700] rev 48902
chgserver: remove Python 2 branch
Differential Revision: https://phab.mercurial-scm.org/D12305
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:39:48 -0700] rev 48901
worker: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12304
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:39:09 -0700] rev 48900
wireprotoframing: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12303
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:38:27 -0700] rev 48899
windows: remove write throttling support
This mode would only be active on Python 2, which is no longer supported.
Differential Revision: https://phab.mercurial-scm.org/D12302
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:36:44 -0700] rev 48898
windows: remove conditional for Python 3
Differential Revision: https://phab.mercurial-scm.org/D12301
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:35:42 -0700] rev 48897
util: remove superfluous ispy3 test
Differential Revision: https://phab.mercurial-scm.org/D12300
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:35:20 -0700] rev 48896
urllibcompat: remove Python 2 support code
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 Python 2/3 differences. But that's for a different commit.
Differential Revision: https://phab.mercurial-scm.org/D12299
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:32:45 -0700] rev 48895
keepalive: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12298
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:31:53 -0700] rev 48894
extensions: remove superfluous pycompat.ispy3 check
This is always True now.
Differential Revision: https://phab.mercurial-scm.org/D12297
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:31:00 -0700] rev 48893
archival: remove check for Python 2
Differential Revision: https://phab.mercurial-scm.org/D12296
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 07:58:29 -0800] rev 48892
encoding: remove Python 2 support code
Differential Revision: https://phab.mercurial-scm.org/D12295
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:28:19 -0700] rev 48891
dispatch: remove Python 2 function variants
Differential Revision: https://phab.mercurial-scm.org/D12294
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:27:34 -0700] rev 48890
config: remove conditional asserts
We always run on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12293
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:27:02 -0700] rev 48889
error: unconditionally define __str__
We always run on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12292
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:26:25 -0700] rev 48888
formatter: remove conditional assert
We always run on Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12291
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:25:53 -0700] rev 48887
httppeer: inline simplified _reqdata()
The function can be reduced to an attribute lookup on Python 3. So
inline it.
Differential Revision: https://phab.mercurial-scm.org/D12290
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:23:54 -0700] rev 48886
url: remove passing of strict
This was needed to support Python 2.7.
Differential Revision: https://phab.mercurial-scm.org/D12289
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 03 Mar 2022 08:04:33 -0800] rev 48885
posix: delete Python 2 posixfile()
The comment no longer makes sense since the stdlib open() behaves
the way we want on Python 3. So it was removed.
Differential Revision: https://phab.mercurial-scm.org/D12288
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:21:18 -0700] rev 48884
match: delete Python 2 conditional code
Differential Revision: https://phab.mercurial-scm.org/D12287
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:20:48 -0700] rev 48883
mail: delete conditional code for Python 2
Differential Revision: https://phab.mercurial-scm.org/D12286
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 20 Feb 2022 16:46:05 -0700] rev 48882
archival: remove GzipFileWithTime
This was required for Python 2 support, which we no longer need to support.
Differential Revision: https://phab.mercurial-scm.org/D12285
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Feb 2022 10:56:31 -0700] rev 48881
check-code: allow importing Python 3 modules
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.
Differential Revision: https://phab.mercurial-scm.org/D12284