Tue, 21 Sep 2021 00:16:35 -0400 typing: add a fake `__init__()` to bytestr to distract pytype
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Sep 2021 00:16:35 -0400] rev 48006
typing: add a fake `__init__()` to bytestr to distract pytype I'm not sure what changed before pytype 09-09-2021 (from 04-15-2021), but these started getting flagged. This wrapping an exception in a `bytestr` pattern has been flagged before, and I've fixed it then with `stringutil.forcebytestr()`. But that doesn't work here, because it would create a circular import. I suspect the issue is `bytes.__new__()` wants `Iterable[int]`, so it just assumes the subclass will also take that. The referenced pytype bug isn't an exact match, but seems related and the suggested workaround helps. The specific warnings fixed are: File "/mnt/c/Users/Matt/hg/mercurial/encoding.py", line 212, in tolocal: Function bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: LookupError) Attributes of protocol Iterable[int] are not implemented on LookupError: __iter__ Called from (traceback): line 353, in current file File "/mnt/c/Users/Matt/hg/mercurial/encoding.py", line 240, in fromlocal: Function bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: UnicodeDecodeError) Attributes of protocol Iterable[int] are not implemented on UnicodeDecodeError: __iter__ Differential Revision: https://phab.mercurial-scm.org/D11466
Mon, 20 Sep 2021 15:51:23 -0400 merge: with stable
Augie Fackler <augie@google.com> [Mon, 20 Sep 2021 15:51:23 -0400] rev 48005
merge: with stable
Thu, 09 Sep 2021 10:42:28 +0200 pep-517: remove the `build-backend` key to allow for users to build extensions stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 09 Sep 2021 10:42:28 +0200] rev 48004
pep-517: remove the `build-backend` key to allow for users to build extensions PEP 517 changed how projects should define their build dependencies. The presence of a `pyproject.toml` file changes the behavior of `pip` to conform to PEP 517. Since we haven't updated the `setup.py` file yet (I'm not even sure we're not an edge case which would make it harder/impossible, I have not tried yet), this is a workaround to issue6589: it allows users to pass `--no-use-pep517` to pip to revert to the legacy installer. The build backend is simply assumed to be the `build_meta:__legacy__` one. Differential Revision: https://phab.mercurial-scm.org/D11393
Wed, 15 Sep 2021 18:41:38 +0200 dirstate: drop the `dirstatemap.dropfile` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 18:41:38 +0200] rev 48003
dirstate: drop the `dirstatemap.dropfile` method All use have been migrated. Differential Revision: https://phab.mercurial-scm.org/D11443
Thu, 16 Sep 2021 15:21:22 +0200 dirstate: use `reset_state` instead of `dropfile` in test-rebuildstate.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Sep 2021 15:21:22 +0200] rev 48002
dirstate: use `reset_state` instead of `dropfile` in test-rebuildstate.t As `dirstatemap.dropfile` is on its way out. Differential Revision: https://phab.mercurial-scm.org/D11442
Thu, 16 Sep 2021 15:20:28 +0200 dirstate: use `reset_state` instead of `dropfile` in largefile
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Sep 2021 15:20:28 +0200] rev 48001
dirstate: use `reset_state` instead of `dropfile` in largefile As `dirstatemap.dropfile` is on its way out. Differential Revision: https://phab.mercurial-scm.org/D11441
Wed, 15 Sep 2021 18:40:25 +0200 dirstate: use `reset_state` in `rebuild` instead of `dropfile`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 18:40:25 +0200] rev 48000
dirstate: use `reset_state` in `rebuild` instead of `dropfile` As `dirstatemap.dropfile` is on its way out. Differential Revision: https://phab.mercurial-scm.org/D11440
Wed, 15 Sep 2021 18:38:24 +0200 dirstate: use `reset_state` to drop file in `update_file_p1`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 18:38:24 +0200] rev 47999
dirstate: use `reset_state` to drop file in `update_file_p1` The `dropfile` function is on its way out. Differential Revision: https://phab.mercurial-scm.org/D11439
Wed, 15 Sep 2021 18:36:59 +0200 dirstate: support file tracked nowhere in `reset_state`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 18:36:59 +0200] rev 47998
dirstate: support file tracked nowhere in `reset_state` This let the dirstatemap decide when to drop files. Differential Revision: https://phab.mercurial-scm.org/D11438
Wed, 15 Sep 2021 18:30:06 +0200 dirstate: drop dirstatemap.addfile
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 18:30:06 +0200] rev 47997
dirstate: drop dirstatemap.addfile All users have been migrated. Differential Revision: https://phab.mercurial-scm.org/D11437
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip