- Mar 04, 2022
-
-
Gregory Szorc authored
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 authored
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
-
- Feb 21, 2022
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12314
-
Gregory Szorc authored
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
-
- Mar 02, 2022
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12312
-
- Feb 21, 2022
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12311
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12310
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12309
-
- Mar 03, 2022
-
-
Gregory Szorc authored
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
-
- Feb 21, 2022
-
-
Gregory Szorc authored
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 authored
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 authored
Differential Revision: https://phab.mercurial-scm.org/D12305
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12304
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12303
-
Gregory Szorc authored
This mode would only be active on Python 2, which is no longer supported. Differential Revision: https://phab.mercurial-scm.org/D12302
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12301
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12300
-
Gregory Szorc authored
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 authored
Differential Revision: https://phab.mercurial-scm.org/D12298
-
Gregory Szorc authored
This is always True now. Differential Revision: https://phab.mercurial-scm.org/D12297
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12296
-
- Mar 03, 2022
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12295
-
- Feb 21, 2022
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12294
-
Gregory Szorc authored
We always run on Python 3 now. Differential Revision: https://phab.mercurial-scm.org/D12293
-
Gregory Szorc authored
We always run on Python 3 now. Differential Revision: https://phab.mercurial-scm.org/D12292
-
Gregory Szorc authored
We always run on Python 3 now. Differential Revision: https://phab.mercurial-scm.org/D12291
-
Gregory Szorc authored
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 authored
This was needed to support Python 2.7. Differential Revision: https://phab.mercurial-scm.org/D12289
-
- Mar 03, 2022
-
-
Gregory Szorc authored
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
-
- Feb 21, 2022
-
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12287
-
Gregory Szorc authored
Differential Revision: https://phab.mercurial-scm.org/D12286
-
- Feb 20, 2022
-
-
Gregory Szorc authored
This was required for Python 2 support, which we no longer need to support. Differential Revision: https://phab.mercurial-scm.org/D12285
-
- Feb 21, 2022
-
-
Gregory Szorc authored
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
-
- Mar 02, 2022
-
-
Gregory Szorc authored
Per code review comment on the changeset that introduced the Python 3.5+ checks. Differential Revision: https://phab.mercurial-scm.org/D12259
-
- Feb 20, 2022
-
-
Gregory Szorc authored
These are no longer needed after dropping support for Python 2. Differential Revision: https://phab.mercurial-scm.org/D12258
-
Gregory Szorc authored
And drop some nearby avoidable py3 checks in close proximity while we are here. Differential Revision: https://phab.mercurial-scm.org/D12257
-
Gregory Szorc authored
This one is slightly more involved since it affects test output. Differential Revision: https://phab.mercurial-scm.org/D12256
-
Gregory Szorc authored
This is no longer required since we require Python 3 and the linter no longer requires these statements. Differential Revision: https://phab.mercurial-scm.org/D12255
-
- Mar 03, 2022
-
-
Gregory Szorc authored
These were needed for Python 2 support. Now that our linter no longer mandates these, we can start deleting them. Differential Revision: https://phab.mercurial-scm.org/D12254
-
- Feb 20, 2022
-
-
Gregory Szorc authored
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 match against. Differential Revision: https://phab.mercurial-scm.org/D12253
-