diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ccc186b..ddf6272 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.12", "3.13"] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.gitea/workflows/driver.yml b/.gitea/workflows/driver.yml index 415bf3d..dfd816f 100644 --- a/.gitea/workflows/driver.yml +++ b/.gitea/workflows/driver.yml @@ -24,7 +24,7 @@ on: python-versions: description: "JSON list of the Python versions the tests run on" type: string - default: '["3.10", "3.11", "3.12", "3.13"]' + default: '["3.12", "3.13"]' pypi-url: description: "Upload target; https://test.pypi.org/legacy/ for a dry run" type: string @@ -123,7 +123,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install the lowest versions the package allows run: | python -m venv .venv diff --git a/CHANGELOG.md b/CHANGELOG.md index 9231dce..3ffa955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format follows [Keep a Changelog](https://keepachangelog.com/), versions fol ## [Unreleased] ### Changed +- Python 3.12 is the floor: the shared workflow tests on 3.12 and 3.13 by default and + runs `lowest` on 3.12, the template declares `requires-python = ">=3.12"` with ruff + and mypy targeting 3.12, and the tool itself needs 3.12. netOrk runs every driver in + its own containers on 3.12, so older versions are no longer tested. `check` keeps + accepting a 3.10 floor until every driver has moved. - `check` reports a license given as a TOML table or as a `License ::` classifier: setuptools refuses both from 2027-02-18 (PEP 639). The template builds with setuptools>=77. diff --git a/STANDARDS.md b/STANDARDS.md index 3685c5a..9238d0c 100644 --- a/STANDARDS.md +++ b/STANDARDS.md @@ -155,7 +155,7 @@ release tags: | `standard` | `napalm-standard check` (with `--tag` on a tag) and `napalm-standard ratchet` | | `lint` | `ruff format --check`, `ruff check` | | `types` | `mypy` on the package | -| `test` | `pytest --cov` on Python 3.10–3.13; the floor is `fail_under` | +| `test` | `pytest --cov` on Python 3.12 and 3.13; the floor is `fail_under` | | `lowest` | the tests again with every direct dependency at its declared floor | | `security` | `bandit`, `pip-audit` | | `build` | wheel and sdist, `twine check --strict` | @@ -168,7 +168,7 @@ release tags: names do not change with the package name. - **`pyproject.toml`** declares `name`, `version`, `description`, `readme`, `license = "Apache-2.0"` (an SPDX string, PEP 639; no table, no `License ::` - classifier, `setuptools>=77`), `requires-python = ">=3.10"`, the dependencies, a + classifier, `setuptools>=77`), `requires-python = ">=3.12"`, the dependencies, a `dev` extra, `[project.urls]` with `Repository` (and `Issues`) on `https://git.netork.io/NAPALM/…`, and the `napalm.drivers` entry points. - **Dependencies are ranges with true floors.** A driver is a library: it never pins diff --git a/pyproject.toml b/pyproject.toml index 05ac39c..5ba1b15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "0.1.0" description = "Rules, CI and release tooling shared by the drivers of the NAPALM org" readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.11" +requires-python = ">=3.12" authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }] dependencies = ["packaging>=23"] @@ -30,13 +30,13 @@ napalm_standard = ["py.typed"] [tool.ruff] line-length = 100 -target-version = "py311" +target-version = "py312" [tool.ruff.lint] select = ["E", "F", "I", "UP", "B"] [tool.mypy] -python_version = "3.11" +python_version = "3.12" strict = true [tool.pytest.ini_options] diff --git a/template/pyproject.toml b/template/pyproject.toml index de35015..3c85393 100644 --- a/template/pyproject.toml +++ b/template/pyproject.toml @@ -8,7 +8,7 @@ version = "0.1.0" description = "NAPALM driver for Example switches" readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.10" +requires-python = ">=3.12" authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }] classifiers = [ "Programming Language :: Python :: 3", @@ -38,7 +38,7 @@ napalm_example = ["py.typed"] [tool.ruff] line-length = 100 -target-version = "py310" +target-version = "py312" [tool.ruff.lint] select = ["E", "F", "I", "UP", "B"] @@ -48,7 +48,7 @@ select = ["E", "F", "I", "UP", "B"] "tests/**" = ["E501"] [tool.mypy] -python_version = "3.10" +python_version = "3.12" strict = true # napalm itself is untyped, so every driver subclasses Any. disallow_subclassing_any = false