-
Matt Harbison authored
I noticed this when running `py hghave` on a system that still has Python2- the Windows launcher attempts to honor the version of python in the shebang, but `hghave` recently gained py3 type annotations, so that resulted in a SyntaxError. I guess CI has the compat shim installed to redirect `python` to `python3`, and maybe that's why nobody noticed. These were located by grepping for `#!.+python\b`. The remaining handful of cases are tests trying to find python files, which is fine as-is. The one thing to call out here is that apparently the RPM building hasn't worked with Python3 (or we've been getting lucky). `contrib/hg-ssh` has had a python3 shebang line since late 2020, which means the EOL anchor would have caused it to not match and not be replaced with `%{pythonexe}`. OTOH, it looks like that variable was used prior to the `hg-ssh` update in order to default to python3 (as opposed to using a specific /path/to/pythonX), and maybe the update to `hg-ssh` simply broke python2 builds. I'm not going to worry about this for now, since there are also direct calls to `setup.py`, which no longer work as of this release cycle. Somebody interested in RPMs can figure out all of the issues at once.
Matt Harbison authoredI noticed this when running `py hghave` on a system that still has Python2- the Windows launcher attempts to honor the version of python in the shebang, but `hghave` recently gained py3 type annotations, so that resulted in a SyntaxError. I guess CI has the compat shim installed to redirect `python` to `python3`, and maybe that's why nobody noticed. These were located by grepping for `#!.+python\b`. The remaining handful of cases are tests trying to find python files, which is fine as-is. The one thing to call out here is that apparently the RPM building hasn't worked with Python3 (or we've been getting lucky). `contrib/hg-ssh` has had a python3 shebang line since late 2020, which means the EOL anchor would have caused it to not match and not be replaced with `%{pythonexe}`. OTOH, it looks like that variable was used prior to the `hg-ssh` update in order to default to python3 (as opposed to using a specific /path/to/pythonX), and maybe the update to `hg-ssh` simply broke python2 builds. I'm not going to worry about this for now, since there are also direct calls to `setup.py`, which no longer work as of this release cycle. Somebody interested in RPMs can figure out all of the issues at once.
test-highlight.t 37.77 KiB