##// END OF EJS Templates
Commit Message Age Author Refs
r53561:f5091286
packaging: modernize (compat PEP 517) with less distutils and setup.py calls - setup.py: less distutils imports and setuptools required distutils is deprecated and one should import commands from setuptools to support modern workflows depending on PEP 517 and 518. Moreover, for Python >=3.12, distutils comes from setuptools. It corresponds to old and unmaintain code that do not support PEP 517. The PEP 517 frontends (pip, build, pipx, PDM, UV, etc.) are responsible for creating a venv just for the build. The build dependencies (currently only setuptools) are specified in the pyproject.toml file. Therefore, there is no reason to support building without setuptools. Calling directly setup.py is deprecated and we have to use a PEP 517 frontend. For this commit we use pip with venv. - run-tests.py: install with pip instead of direct call of setup.py Mercurial is then built in an isolated environment. - Makefile: use venv+pip instead of setup.py
paugier
0
r53560:25bb409d
setup-py: remove unused and deprecated setup argument datafiles
paugier
0
r53559:e5aadff6
setup: skip building rust extensions on Windows Without this, the build process in the next commit would have started trying (and failing) to copy the associated module. Not sure why this worked before. I'd like to think there's a better way to conditionalize this inside the extension declaration. [snip] done updating hg.exe's manifest copying build\lib.win-amd64-cpython-39\mercurial\cext\base85.cp39-win_amd64.pyd -> mercurial\cext copying build\lib.win-amd64-cpython-39\mercurial\cext\bdiff.cp39-win_amd64.pyd -> mercurial\cext copying build\lib.win-amd64-cpython-39\mercurial\cext\mpatch.cp39-win_amd64.pyd -> mercurial\cext copying build\lib.win-amd64-cpython-39\mercurial\cext\parsers.cp39-win_amd64.pyd -> mercurial\cext copying build\lib.win-amd64-cpython-39\mercurial\cext\osutil.cp39-win_amd64.pyd -> mercurial\cext copying build\lib.win-amd64-cpython-39\mercurial\thirdparty\sha1dc.cp39-win_amd64.pyd -> mercurial\thirdparty copying build\lib.win-amd64-cpython-39\hgext\fsmonitor\pywatchman\bser.cp39-win_amd64.pyd -> hgext\fsmonitor\pywatchman error: can't copy 'build\lib.win-amd64-cpython-39\mercurial\rustext.cp39-win_amd64.pyd': doesn't exist or not a regular file
Matt Harbison
0
r53558:958d5c99
paugier
0
r53557:1c8bc611
git: skip recursing into manifest subtrees that are the same If during manifest comparison we are presented with identical tree objects, then we are guaranteed that: 1. the contents of these tree objects are the same 2. the contents of any of their children are the same This speeds up 'hg diff -c <hash>' considerably since unchanged subtrees are are skipped. For example, a commit that modified the README in the linux kernel repo (~84k tracked files) now takes 1.1s instead of 15.7s.
Josef 'Jeff' Sipek
0
r53556:70a75d37
tests: obfuscate Python version checks to subvert `pyupgrade` When specifying `--py38-plus`, it reasonably deletes conditionals that check for that version of python or earlier. But we actually want the check to remain, so use a simple obfuscation to preserve it.
Matt Harbison
0
r53555:c975e8ec
tests: drop py2 support for `fsmonitor-run-tests.py` There's some py2 compat code still in the fsmonitor extension, but I don't care about that and this doesn't affect that.
Matt Harbison
0
r53554:62546ee1
pyupgrade: drop redundant `''.encode("utf-8")` Again, I'd prefer explicit. But without a way to selectively choose what fixes are applied by `_fix_tokens()`, I'll accept this for the sake of reducing the nuisance output when running `pyupgrade`.
Matt Harbison
0
r53553:3e84e001
pyupgrade: drop redundant `open()` modes On one hand, this gets rid of some py2 cruft (like `U` and `t` modes). OTOH, I like being explict. But there's no way to disable individual transformations (and this change is part of `_fix_tokens()`, which is even harder to selectively use locally), and I'd rather have less noise when using `pyupgrade`. Warning: `contrib/synthrepo.py` appears not to have been updated to py3, as it's passing str to `error.Abort`. But since it was opening the file in unicode on py2, this change is a no-op.
Matt Harbison
0
r53552:5027ae0d
pyupgrade: convert `str.format()` to f-strings This is part of the `_fix_tokens()` changes made by `pyupgrade` once py36 is the minimum.
Matt Harbison
0
r53551:f19a3f14
pyupgrade: drop `coding=UTF-8` comments PEP-3120[1] (Python 3.0 in 2007) says that UTF-8 is the default encoding. That should be long enough ago that no reasonable editor would trip over this, and certainly any supported version of Python won't. The comments were probably harmless, but as `pyupgrade` has no mechanism to disable this change, omitting this change makes it unusable as a code checking tool, and makes it a pain to use occasionally to upgrade the source (since these changes would need to be manually reverted). [1] https://peps.python.org/pep-3120/
Matt Harbison
0
r53550:b3e68fd7
pyupgrade: primitive types directly where possible This was rewritten by the `type_of_primitive` fixer in `pyupgrade`. Interesting that 9db77d46de79 missed a bunch of these `u''` prefixes.
Matt Harbison
0
r53549:0e713555
pyupgrade: rewrite `' '.join(shlex.quote(x) for x in ...)` with `shlex.join()` This was rewritten by the `shlex_join` fixer in `pyupgrade`. This is new in Python 3.8.
Matt Harbison
0
r53548:f066fc0b
pyupgrade: use set literals where possible This was rewritten by the `set_literals` fixer in `pyupgrade`. I thought there was a past change around using set literals, but I can't find it now.
Matt Harbison
0
r53547:b95b12cb
pyupgrade: replace `io.open()` with `open()` This was rewritten by the `io_open` fixer in `pyupgrade`.
Matt Harbison
0
r53546:d903647a
pyupgrade: replace `dict(...)` with dict comprehensions This was rewritten by the `dict_literals` fixer in `pyupgrade`. The last pass over the code for this that I could find was a61ed1c2d7a7.
Matt Harbison
0
r53545:abc327f9
pyupgrade: replace unnecessary lambdas in `collections.defaultdict()` calls This was rewritten by the `defaultdict_lambda` fixer in `pyupgrade`.
Matt Harbison
0
r53544:ab7b4fba
pyupgrade: drop a few redundant types in `isinstance` lists This was rewritten by the `constant_fold` fixer in `pyupgrade`. I suspect that one of these `int`s were `long` in the py2 days, and some automated py2 -> py3 tool wasn't smart enough to elide these.
Matt Harbison
0
r53543:cb769c0f
pyupgrade: drop a usage of `typing.Text` This is the `typing_text` fixer in `pyupgrade`. This type was meant to be for py2/py3 interoperability, being bytes on py2 and str on py3.
Matt Harbison
0
r53542:4cb75772
pyupgrade: drop the quoting around type annotations This is the `typing_pep563` fixer in `pyupgrade`. Quoting to delay evaluation hasn't been necessary since adding `from __future__ import annotations` in 1c5810ce737e.
Matt Harbison
0
load next
< 1 2 3 4 5 6 7 .. 2679 >
showing 20 out of 53562 commits