Commit Graph

5 Commits

Author SHA1 Message Date
Johannes Altmanninger
62628f6fb1 CI: respect dependency cooldown in "uv lock check"
Fixes 1db4dc4c3e (build_tools/update-dependencies.sh: add dependency
cooldown for Python packages, 2025-12-16).
2025-12-16 14:22:24 +01:00
seg6
29024806e5 tests: minimum python version validation for user facing scripts
Adds [`Vermin`](https://github.com/netromdk/vermin) to make sure our
user facing Python scripts conform to the proper minimum Python version
requirements.

The tool parses Python code into an AST and checks it against a database
of rules covering Python 2.0-3.13.

Testing Python version compatibility is tricky because most issues only
show up at runtime. Type annotations like `str | None` (Python 3.10+)
compile just fine (under pyc) and they don't throw an exception until
you actually call the relevant function.

This makes it hard to catch compatibility bugs without running the code
(through all possible execution paths) on every Python version.

Signed-off-by: seg6 <hi@seg6.space>

Closes #12044
2025-11-16 11:21:18 +01:00
Johannes Altmanninger
cf2f7eb785 CI: remove tmate used for debugging
Also remove dead code selecting pip version
2025-11-10 10:15:48 +01:00
Johannes Altmanninger
e77102d73e Install Sphinx in macOS CI/CD
Looks like macOS packages didn't have docs??
I noticed via our Cargo warning about sphinx-build.

macOS has a variety of pythons installed:

	bash-3.2$ type -a python python3
	python is /Library/Frameworks/Python.framework/Versions/Current/bin/python
	python3 is /opt/homebrew/bin/python3
	python3 is /usr/local/bin/python3
	python3 is /Library/Frameworks/Python.framework/Versions/Current/bin/python3
	python3 is /usr/bin/python3

by default, "uv --no-managed-python" uses python3 (homebrew), but
"python" (and "pip") use the other one.  Make uv use the same as
our scripts.  Not all uv commands support "--python" today, so set
UV_PYTHON.
2025-11-10 08:18:53 +01:00
Johannes Altmanninger
aec459c795 Upgrade and pin Sphinx version
In future, we should ask "renovatebot" to update these version. I
don't have an opinion on whether to use "uv" or something else, but
I think we do want lockfiles, and I don't know of a natural way to
install Sphinx via Cargo.

No particular reason for this Python version.

Part of #11996
2025-11-01 12:58:13 +01:00