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 0x
000001EFDF0F21F0>, takes_self=False), 'factory')
>>> print((util.timedcmstats.__attrs_attrs__.start.default, 'factory'))
(Factory(factory=<function timedcmstats.<lambda> at 0x
000001EFDF0F21F0>, takes_self=False), 'factory')
rhg: upgrade the remainder of the dependencies
These are painless, so they are all grouped in this changeset.
rhg: upgrade `clap` dependency
This one is the worst one to upgrade since v2 -> v4 broke a ton of API,
which thankfully seems saner now.
Contrary to what was done in the `hg-core/src/examples/nodemap` rewrite,
we're not switching from the "builder" pattern to the "derive" pattern,
since that would imply a much larger diff. It can be done incrementally.
hg-cpython: upgrade dependencies
`hg-cpython` has no BC breaking dependencies, we can group them all
in this changeset.
hg-core: upgrade all remaining dependencies
Finally, these dependencies do not require any code changes, so they are
all grouped in the same changeset.
hg-core: upgrade `clap` dependency
Upgrading is a finally possible now that we're supporting a more recent
version of Rust.
This required changes in the `nodemap` example.
hg-core: upgrade `zstd` dependency
Now that we support a newer version of Rust, we can update this dependency
to get all the latest bugfixes and improvements.
A slight API adjustment was needed.
rust: remove newly redundant `use` statements with the 2021 edition prelude
https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html