Repository navigation
fix: make python 3.14 the default - #110
Merged
Merged
Conversation
The astral role now installs Python 3.14 through uv and pins it as uv's global default, per user. Ubuntu 24.04 and macOS get the same interpreter as Fedora and Ubuntu 26.04, and the system python3 is left alone, so there is no --default and no python3 shim in ~/.local/bin. The pin is read first and only rewritten when it differs, so a second converge reports nothing changed. The version is astral_python_version. The repo's own tooling moves to the 3.14 floor: a root .python-version, and tools/ drops `from __future__ import annotations`, which 3.14 makes redundant. The tools still run on 3.12. hyperi-rust-cache-prune crashed on macOS, where launchd runs it with the Command Line Tools' Python 3.9: `int | str` annotations raised at import, and tomllib does not exist before 3.11. It now keeps annotations unevaluated and, without tomllib, reads the two [build] keys it needs itself. The other host-side scripts keep their floors. The utilities.yml comment no longer claims ansible is a uv tool on macOS.
hyperi-rust-setup imports tomllib, which macOS's Command Line Tools Python 3.9 does not have. Its task now runs it with the astral role's ~/.local/bin/python3.14 where that exists, and python3 otherwise, the same rule on every OS. developer-rust now depends on astral, so that interpreter exists on `--tags developer-rust` alone and in developer-languages, which lists this role ahead of the base. A non-zero exit still does not abort the run, but it now lands in deploy_warnings with the last stderr line, and the report shows stderr as well as stdout. The hyperi-doctor wrapper picks the first interpreter that is 3.11+ and has PyYAML, trying ~/.local/bin/python3.14 before python3. The uv-managed Python has no PyYAML, so Linux keeps using the distro python3. Where neither passes, as on a stock Mac, it falls back to `uv run --with pyyaml`. check_release_matrix.py and hyperi_doctor.py carry a shebang and a main guard, and are now executable.
A failed Python download no longer fails the base converge. The install and pin sit in a block whose rescue records a deploy warning, and the pin is skipped when the install fails, since a pin to a missing Python breaks uv. uv only installs its own Python where the system python3 is older than astral_python_version, read from /usr/bin/python3. Fedora 43+ and Ubuntu 26.04 keep their system 3.14: Fedora's packaged uv prefers it anyway, and a managed python3.14 in ~/.local/bin hid dnf-installed modules from a typed python3.14. The global pin is still set everywhere, and the defaults now say it replaces a user's own. The hyperi-rust-setup task follows the ~/.local/bin/python3.14 link and needs it executable, so a dangling link falls back to python3. Its warning falls back to the module message when stderr is empty and is deduplicated, since developer-rust can run twice. Run by hand on a Python without tomllib, the script hands over to ~/.local/bin/python3.14, or exits 2 naming the Python it needs. The cache-prune fallback reader treats a file with a multi-line string, a repeated [build] key or a repeated [build] table as unconfigured. "Load macOS variables" carries the python tag, so `--tags python` works on macOS.
Contributor
|
Released in v2.24.13 -- https://github.com/hyperi-io/hyperi-developer/releases/tag/v2.24.13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python 3.14 is now the default, both for the repo's own tooling and for the Python a converged box gets from uv.
astral_python_version(3.14). It installs a uv-managed 3.14 only where the system python3 is older: Ubuntu 24.04 and macOS. Fedora 43/44 and Ubuntu 26.04 already ship 3.14, so they keep it, and no copy shadows the distropython3.14. No--default, sopython/python3stay the system ones.astral_python_version.[build]keys without tomllib there, and it treats anything it cannot read exactly as unconfigured, so it prunes nothing.uv run --with pyyaml..python-version). They dropfrom __future__ import annotations, which scripts in roles/*/files keep because they run on 3.12 and 3.9 hosts.Tested in containers:
uv python findgives the managed 3.14 on 24.04 and the system 3.14 on the other two.python3.14link falls back to python3.Not run: anything on macOS, and a full developer-rust converge.
Ruff and ty never run on this repo's Python in CI (#108). On a Mac, install.sh still builds Ansible from the Command Line Tools' Python 3.9 (#109).
Done when a converged box resolves Python 3.14 through uv and every host-side script still runs on the system python3.