Make Python 3.14 the MAIN_VERSION #20

Merged
alexander merged 6 commits from python-3.14 into develop 2026-12-02 22:30:08 +01:00
Showing only changes of commit df53ce7bc4 - Show all commits

Pin MAIN_PYTHON in the "init-project" session

Otherwise, `uv` creates ".venv" with the newest installed Python.
Alexander Hess 2026-12-02 21:43:23 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -17,7 +17,7 @@ Further sessions run on demand with `uv run nox -s <session>`:
- "deps-lock": Lock dependencies after manual changes in pyproject.toml
- "deps-upgrade": Upgrade dependencies within their allowed ranges
- "deps-upgrade-check": Show newer versions and the age of all pinned releases
- "init-project": Install the `pre-commit` hooks and configure `git blame`
- "init-project": Set up a freshly cloned project
- "clean-cwd": Run approx. `git clean -X` with minor exceptions
- "verify-db-objects": Compare a live database with the ORM models
@ -540,7 +540,16 @@ def check_dependency_upgrades(session: nox.Session) -> None:
@nox.session(name="init-project", python=MAIN_PYTHON, venv_backend="none")
def initialize_project(session: nox.Session) -> None:
"""Install the `pre-commit` hooks and configure `git blame`."""
"""Set up a freshly cloned project.
This does the following:
- Pin the `MAIN_PYTHON` for `uv`
- Install the `pre-commit` hooks
- Configure `git blame`
"""
# Without a ".python-version" file, `uv` picks the newest installed Python
session.run("uv", "python", "pin", MAIN_PYTHON)
# .pre-commit-config.yaml sets the hook types via "default_install_hook_types"
session.run("uv", "run", "pre-commit", "install")
@ -559,7 +568,7 @@ def clean_cwd(session: nox.Session) -> None:
"""Remove (almost) all glob patterns listed in git's ignore file.
Compared to `git clean -X`, never remove local environment variables
in the ".env" and ".envrc" files, pyenv's ".python-version" file,
in the ".env" and ".envrc" files, the ".python-version" file,
and the local develop environment in ".venv".
An existing ".cache/" folder is always deleted first.