- Oct 26, 2024
-
-
Pierre-Yves David authored
The traceback changes again with 3.13. So we filter it to only keeps the bits we care about. This is actually only reusing the approach from a few line below.
-
- Oct 24, 2024
-
-
Pierre-Yves David authored
No known issues has been reported and this is breaking the CI quite hard. So for now we have to delay the issue.
-
- Oct 25, 2024
-
-
Matt Harbison authored
This goes back to f5fcf7123a92, and I suspect it was a misread of the error message is describes- the LHS of `.sorted()` is always bytes, and bytes didn't have this method in py2 either. The invalid names were already handled like this a few lines above. PyCharm flagged this, and it stood out after converting the zope interfaces to Protocol classes (which hasn't been published yet).
-
- Jan 11, 2024
-
-
kiilerix authored
Build failed with a reference to https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned which seems reasonable. There doesn't seem to be any reason to not follow the advice.
-
- Jul 22, 2024
-
-
kiilerix authored
Some importlib functionality was deprecated in 3.11 . The documentation on https://docs.python.org/3.12/library/importlib.resources.html recommends using the new .files() API that was introduced in 3.9.
-
- Jun 27, 2023
-
-
kiilerix authored
imp has been deprecated for a long time, and were removed in Python 3.12 . As a workaround, we started using the internal _imp. That is ugly and risky. It seems less risky to get the functionality in some other way. Here, we just inspect if 'origin' of the '__main__' module is set and 'frozen'. That seems to work and do the same, and might be better than using the internal _imp directly. This way of inspecting module attributes seems to work in some test cases, but it is a risky change. This level of importlib doesn't have much documentation, a complicated implementation, and we are dealing with some odd use cases.
-
- Jan 11, 2024
-
-
kiilerix authored
Fix warning with Python 3.13: mercurial/cext/parsers.c: In function 'check_python_version': mercurial/cext/parsers.c:1243:30: warning: 'Py_GetProgramFullPath' is deprecated [-Wdeprecated-declarations] 1243 | Py_GetProgramFullPath()); | ^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.13/Python.h:119, from mercurial/cext/parsers.c:11: /usr/include/python3.13/pylifecycle.h:43:43: note: declared here 43 | Py_DEPRECATED(3.13) PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void); | ^~~~~~~~~~~~~~~~~~~~~ At this point in time, the PyConfig struct memory has been released and the PyConfig API can't be used. https://docs.python.org/3.13/c-api/init.html#c.Py_GetProgramFullPath recommands using sys.executable instead. Let's assume that will work in all versions. It would perhaps be better to use PySys_GetObject, but I prefer to stay consistent with how the same function is retrieving sys.hexversion.
-
kiilerix authored
Python 3.13 started warning: DeprecationWarning: 'count' is passed as positional argument
-
kiilerix authored
This bug was caught by the new Python 3.13 warning: DeprecationWarning: 'count' is passed as positional argument
-
- Jun 29, 2023
-
-
kiilerix authored
When invoking StrictVersion in 3.12 we got: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. distutils is dead in the standard library, and we have to move towards using `setuptools` as general extern dependency. Instead of also requiring the extern `packaging`, we will just use the packaging that is vendored in setuptools.
-
- Jun 26, 2023
-
-
kiilerix authored
The test would fail because warnings: /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils. warnings.warn( /usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") The test for distutils.msvc9compiler comes from 2205d00b6d2b. But since then, distutils is going away, and this test must change somehow. It is unclear exactly how setuptools depended on msvc9compiler, but setuptools also moved forward, and this exact test no longer seems relevant. It thus seems like a fair solution to remove the test while keeping the demandimport blacklist of distutils.msvc9compiler.
-
- Jun 29, 2023
-
-
kiilerix authored
Explore the scenario from ae04af1ce78d to avoid future regressions. This was intended to give some coverage of the change in faccec1edc2c.
-
- Oct 25, 2024
-
-
Pierre-Yves David authored
In retrospect this is too much of a behavior change for stable. So I grafted the same change as 31076a2301f1 on default, and I am backing out its version on stable.
-
- Oct 24, 2024
-
-
Raphaël Gomès authored
We could follow-up with an actual vendoring update from the newest version of zope-interface in the new cycle since we're dropping 3.7 and down. However we are also in the process of replacing zope-interface with Protocol, so hopefully we can simply drop the zope-interface vendoring.
-
Raphaël Gomès authored
-
Raphaël Gomès authored
Python 3.13 now trims indents from docstrings at compilation time (to save space in .pyc), so all of our helptext is affected. The indentation has never served a user-facing purpose and was more here because nobody cared enough to remove it: we gain some screen space this way. Rather than undo the transformation (which isn't really possible since the transform also deletes leading/trailing whitespace), we align the behavior of older Python versions with that of 3.13. Unfortunately, this means breaking some of the translations. I've only touched the ones that need to work for some tooling tests to pass, but I do not have the time to fix the rest of them across all languages, since they cannot be done in an automated way. i18n updates have been basically abandonned for a good while now, hopefully someone cares enough to bring them back.
-
Raphaël Gomès authored
The traceback differences between all supported Python versions is about to become insane to handle, so let's check what we're actually looking to check.
-
- Mar 31, 2024
-
-
Felipe Resende authored
There was already a fix made in 5dbff89cf107 for pull and push commands. I did the same for the outgoing command. The problem I identified is that when the parent repository has multiple paths, the outgoing command was not respecting the parent path used and was always using the default path for subrepositories.
-
- Oct 24, 2024
-
-
Felipe Resende authored
This will make the next changeset clearer.
-
Pierre-Yves David authored
This make the core code simpler.
-
Felipe Resende authored
This will clarify future patches.
-
- Jun 11, 2024
-
-
Pierre-Yves David authored
-
- Oct 23, 2024
-
-
Raphaël Gomès authored
This test is quite noisy, but the fix was very easy.
-
Raphaël Gomès authored
This is a bug in Python's `email` package and shouldn't be relied on. Python 3.12 has fixed this problem¹ and raises an exception. We keep the multiple `-t` because this is still relevant for testing. [1] https://github.com/python/cpython/issues/102988 [2] https://docs.python.org/3/whatsnew/changelog.html
-
- Oct 16, 2024
-
-
Matt Harbison authored
I got here by bisecting the issue1790 related failure on Windows to keep an entry from being marked "unset" in `test-dirstate.t` back to eedbf8256263. There were a handful of other tests failing with an unexpected dirstate entry state like this, as well as numerous "skip updating dirstate: identity mismatch" messages added to various tests, as well as an issue with dirstate wrapping with the largefiles extension[1], all of which appear to be fixed by this. In total, ~25 tests are fully fixed on Windows with this change on default. This is basically a copy/paste of the posix implementation, but we drop the `st_mode` comparison- I think the only reason we care about the mode on posix is to detect +/-x mode changes, but the executable bits on Windows are synthesized based on the name of the file[2]. None of the other parts of the codebase are equipped to handle executable bits in the filesystem on Windows anyway, so it doesn't make sense to worry about them here. Note that `st_uid` and `st_gid` seem to always be 0 on Windows (and I can't find them being initialized), so they can probably be dropped from the comparison. But I doubt they matter any more on posix, since we don't track ownership. The `st_ino`, `st_dev`, and `st_nlink` attributes all seem to have reasonable values for comparing like on posix[3]. Also note that `st_ctime` is apparently deprecated in 3.12+ (for reasons I haven't explored)[4]. [1] !884 [2] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Modules/posixmodule.c#L1948 [3] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Python/fileutils.c#L1158 [4] https://github.com/python/cpython/blob/aab3210271136ad8e8fecd927b806602c463e1f2/Modules/posixmodule.c#L2200
-
- Oct 14, 2024
-
-
Julien Cristau authored
The pipes module got removed in python 3.13. https://bugs.debian.org/1084553
-
- Oct 15, 2024
-
-
Pierre-Yves David authored
The `telnetlib` module has been dropped in 3.13. The `wsgiref` module fit the same purpose of being obscure and not imported yet.
-
- Oct 07, 2024
-
-
kiilerix authored
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 .
-
- Oct 08, 2024
-
-
Pierre-Yves David authored
Same as what we do for the `.t` tests, but more manually.
-
Pierre-Yves David authored
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 authored
The check was introduced in f48b075ff088. We trust the explanation from there.
-
Pierre-Yves David authored
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 authored
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 authored
This make the variable easier to work with, the empty value is not ambiguous about not wanting to get in the way.
-
- Sep 27, 2024
-
-
Pierre-Yves David authored
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.
-
- Sep 17, 2024
-
-
Pierre-Yves David authored
This version supports Python 3.12 while 0.7.1 did not.
-
- Sep 11, 2024
-
-
Pierre-Yves David authored
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 authored
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.
-
- Sep 10, 2024
-
-
Pierre-Yves David authored
This will help us to catch error with Python 3.12
-
- Sep 05, 2024
-
-
Matt Harbison authored
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/
-