Wed, 23 Nov 2022 15:50:20 -0500 typing: add missing signature for mercurial.cext.parsers.parse_index2()
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Nov 2022 15:50:20 -0500] rev 49649
typing: add missing signature for mercurial.cext.parsers.parse_index2() Flagged by pytype 2022.11.18 when the cext stubs are made visible to it. There are very likely other signatures that are missing, but this is enough to keep it happy for now.
Wed, 23 Nov 2022 11:22:22 -0500 typing: minor tweaks to allow updating to pytype 2022.11.18
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Nov 2022 11:22:22 -0500] rev 49648
typing: minor tweaks to allow updating to pytype 2022.11.18
Wed, 23 Nov 2022 14:42:11 +0100 python-compat: adapt to Python 3.11 BC breakage with `random.sample` stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Nov 2022 14:42:11 +0100] rev 49647
python-compat: adapt to Python 3.11 BC breakage with `random.sample` As per https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11: "The population parameter of `random.sample()` must be a sequence, and automatic conversion of sets to lists is no longer supported. Also, if the sample size is larger than the population size, a `ValueError` is raised"
Sun, 20 Nov 2022 22:54:43 -0500 typing: add type hints to mercurial/help.py
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Nov 2022 22:54:43 -0500] rev 49646
typing: add type hints to mercurial/help.py Was hoping to find more issues like f09bc2ed9100, but it may be that nothing checks the args to that operation. In any event, the work is done and pytype doesn't do a very good job inferring the types. A few of th emore complicated things like the command table are left untyped, because they come from modules that aren't typed yet.
Tue, 22 Nov 2022 11:55:26 -0500 match: make the FLAG_RE pattern a raw string stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 Nov 2022 11:55:26 -0500] rev 49645
match: make the FLAG_RE pattern a raw string PyCharm was complaining about invalid escape sequences since this was added recently in 3eda36e9b3d6.
Sun, 20 Nov 2022 23:09:12 -0500 configitems: add a default value for "merge-tools.xxx.regappend"
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Nov 2022 23:09:12 -0500] rev 49644
configitems: add a default value for "merge-tools.xxx.regappend" When trying to figure out how `hg help -v` took the Set interpolation path in f09bc2ed9100, I turned on devel warnings and noticed this (unrelated) warning: devel-warn: specifying a mismatched default value for a registered config item: 'merge-tools.beyondcompare4.regappend' '' at: c:\Users\Matt\hg\mercurial\filemerge.py:46 (_toolstr) The previous default value for this config was `None`, but that slightly complicates the code at the only site it is used, referenced above.
Mon, 21 Nov 2022 15:04:42 -0500 attr: vendor 22.1.0
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Nov 2022 15:04:42 -0500] rev 49643
attr: vendor 22.1.0 The previous version was 5 years old, and pytype 2022.06.30 started complaining about various uses (e.g. seeing `mercurial.thirdparty.attr._make._CountingAttr` instead of `bytearray`). Hopefully this helps. Additionally, this has official python 3.11 support. The `attrs` package is left out, because it is simply a bunch of *.pyi stubs and `from attr.X import *`, and that's not how they've been used up to this point. We'd probably need to customize those anyway to `from mercurial.thirdparty.attr import *`.
Mon, 21 Nov 2022 16:18:28 -0500 tests: update test-util.py for modern attrs package
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 Nov 2022 16:18:28 -0500] rev 49642
tests: update test-util.py for modern attrs package When updating to 22.1.0, this test started failing: Traceback (most recent call last): File "/tmp/mercurial-ci/tests/test-util.py", line 53, in <module> _start_default = (util.timedcmstats.start.default, 'factory') AttributeError: type object 'timedcmstats' has no attribute 'start' Poking around in `hg debugshell`, the attribute is indeed missing, but looks to be attached to `__attrs_attrs__` in both the currently vendored and the modern version of attrs. The old attrs packages will print the same for both accesses, so fingers crossed... >>> print((util.timedcmstats.start.default, 'factory')) (Factory(factory=<function timedcmstats.<lambda> at 0x000001EFDF0F21F0>, takes_self=False), 'factory') >>> print((util.timedcmstats.__attrs_attrs__.start.default, 'factory')) (Factory(factory=<function timedcmstats.<lambda> at 0x000001EFDF0F21F0>, takes_self=False), 'factory')
Sun, 20 Nov 2022 15:55:27 -0500 help: fix a py3 error interpolating Set into b'%s' stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 Nov 2022 15:55:27 -0500] rev 49641
help: fix a py3 error interpolating Set into b'%s' I can't reproduce it, but a coworker hit this with `hg help -v` with 6.2.3: ... File "mercurial\help.pyc", line 865, in helplist TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'set' I can confirm that the original expression fails in `hg debugshell`, and the new one works. The second instance was found by searching for "%s", but PyCharm detects a lot of variables as Any type, so I have no idea if there are other lurking problems.
Tue, 15 Nov 2022 01:52:46 +0100 rhg: upgrade the remainder of the dependencies
Raphaël Gomès <rgomes@octobus.net> [Tue, 15 Nov 2022 01:52:46 +0100] rev 49640
rhg: upgrade the remainder of the dependencies These are painless, so they are all grouped in this changeset.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip