Mads Kiilerich <mads@kiilerich.com> [Mon, 07 Oct 2024 19:53:24 +0200] rev 51694
hgdemandimport: add collections.abc to the ignore list because Python 3.13 rc3
It worked in Python 3.13 rc2, but something changed for rc3.
Now, when i18n.py imports typing and it touches collections.abc.Hashable , we
get:
ValueError: module object for collections.abc substituted in sys.modules during a lazy load
This seems to be a general problem, released in the final Python 3.13 . I have
not analyzed the problem in details.
We *could* work around the problem by disabling demand import of typing. But
that would effectively disable demand import of collections.abc too. Instead,
just disable demand import for collections.abc .
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 20:50:46 +0200] rev 51693
doctest: use the system hg to find the list of file to tests
Same as what we do for the `.t` tests, but more manually.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51692
relnotes: skip the test if the source repository is not readable
The test want to run the relnot extension, with the tested mercurial, on the
original repository. This is not always possible (e.g. when running with --pure
and the repository use zstd for example). So we skip the test in this case.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51691
check-code: document reason and suggest alternative to exit code negation
The check was introduced in f48b075ff088. We trust the explanation from there.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51690
ci: drop the HGMODULEPOLICY overwrite
The test runner have been setting them properly for a while now. So we don't
need to do it manually anymore.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51689
test: preserve the existing module policy config for testrepohg resuse
The test runner is, righfully, setting HGMODULEPOLICY to match the flavor
requests to run the tests. However this mess with the `testrepohg` ability to
run properly, as the newly set policy might be incompatible with its
installation, or its ability to read the test repo.
So we preserve the initial value in a dedicated variable and use it in the
`testrepohg` helper.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 08 Oct 2024 15:54:59 +0200] rev 51688
module-policy: ignore empty module policy
This make the variable easier to work with, the empty value is not ambiguous
about not wanting to get in the way.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Sep 2024 15:53:56 +0200] rev 51687
run-tests: ensure that --no-rust do not use rust
Since having a valid value in HGWITHRUSTEXT is enough to trigger the use of
rust, we need to unset it before install to be sure.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 17 Sep 2024 16:40:24 +0200] rev 51686
rust: bump rust-cpython version to 0.7.2
This version supports Python 3.12 while 0.7.1 did not.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 12:03:39 +0200] rev 51685
profiling: use "stat" profiler to profile individual request
The ls profiler no longer works for that. As the lsprof profiler is not default
and not great is general, lets side step the issue for now.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 12:02:38 +0200] rev 51684
profiling: improve 3.12 error message for calling lsprof twice
Python 3.12 prevent lsprof to be enabled if it is already enabled. This break
the use of lsprof in `hg serve` as both the initial `serve` command and the
request serving want to profile.
The "stat" profiler (the default) does not have this problem, so we focus on
improving the error message for now.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 11 Sep 2024 00:41:37 +0200] rev 51683
test: display server error log in test-profile.t
This will help us to catch error with Python 3.12
Matt Harbison <mharbison@atto.com> [Thu, 05 Sep 2024 15:37:14 -0400] rev 51682
setup: handle removal of old MSVC compiler from setuptools 65.0 (issue6910)
It was removed a few years ago[1]. When trying to reproduce locally using a
clean py3.12 as called out in the bug report, `setuptools` wasn't installed at
all, and needed a `pip install` to fix a `ModuleNotFoundError` when building
locally. Maybe that needs to be in the requirements clause now.
It looks like this "private" module was added in setuptools 48.0.[2] I can't
find a changelog of what version was included in which version of python, and
the changelog for pip has a huge gap between when it called out 67.6.1 in `pip`
23.1 (2023-04-15), and 41.4.0 in `pip` 19.3 (2019-10-14).[3] So, we'll just add
to the existing code instead of replacing it, for safety.
[1] https://github.com/pypa/setuptools/commit/cc017c77948737d131f683e0c25cd37bc639b8fc
[2] https://github.com/pypa/setuptools/commit/d034a5ec7f707499139f90eb846b9e720923124c
[3] https://pip.pypa.io/en/stable/news/
Manuel Jacob <me@manueljacob.de> [Wed, 07 Aug 2024 22:05:36 +0200] rev 51681
merge: sort filemap only if requested by the caller
The name `sorted` refers to a built-in function, which is always true, so the else branch of this if statement was dead code.
Because, with this fix, the function can iterate over the dict items while yielding values, the dict should not change size while the generator is running. Because of that, it is required to re-introduce code that makes a caller copy the filemap before modification, which was removed in 3c783ff08d40cbaf36eb27ffe1d296718c0f1d77 (that changeset also introduced the filemap() method including the bug that’s being fixed by this changeset).
Manuel Jacob <me@manueljacob.de> [Fri, 09 Aug 2024 22:45:32 +0200] rev 51680
largefiles: fix check that ensures that --all-largefiles is only used locally
Previously, the command added in the test failed with “abort: --all-largefiles is incompatible with non-local destination existing_destination”.
The reason for the buggy behavior was the use of hg.islocal(), which does “return true if repo (or path pointing to repo) is local” and, for local paths, assumes that the path is actually pointing to an existing repository and returns whether the path is not a regular file (in which case it assumes that it is a bundlerepo, which are considered non-local).
Manuel Jacob <me@manueljacob.de> [Fri, 09 Aug 2024 14:26:13 +0200] rev 51679
import: fix erroneous comparison of str with bytes
Anton Shestakov <av6@dwimlabs.net> [Thu, 08 Aug 2024 17:28:38 +0400] rev 51678
histedit: create state and acquire locks earlier
This makes chistedit (histedit with curses UI) not write any files inside repo
without wlock. It also makes sense to wrap the entire process of preparing
commands inside the curses UI inside locks because we don't want anything else
to touch wdir or repo during this time.
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 22:51:41 +0200] rev 51677
py3: use str literal instead of bytes literal
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 18:23:59 +0200] rev 51676
typing: fix type annotation
Manuel Jacob <me@manueljacob.de> [Tue, 06 Aug 2024 17:53:59 +0200] rev 51675
cffi: pass bytes instead of str to ffi.new("char[]", …)
The type annotations seem to imply that the passed values are always already bytes, but they aren’t necessarily. Before Python 3.11, the documentation stated that bytes can be used to annotate arguments whose type is actually any of bytes, bytearray, or memoryview.
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 21:21:32 +0200] rev 51674
cffi: call bytes() instead of str() on CFFI buffer instances
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 21:08:36 +0200] rev 51673
cffi: pass C type and attribute names as str instead of bytes
Manuel Jacob <me@manueljacob.de> [Mon, 05 Aug 2024 20:47:17 +0200] rev 51672
py3: fix type of some elements of __all__ lists
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 01 Aug 2024 11:14:58 +0100] rev 51671
copytracing: fix a bug in an edge case in metadata.compute_all_files_changes