Merge pull request 'chore: Python 3.12 is the floor, part A (#6)' (#7) from chore/python-312-floor into main
CI / test (3.12) (push) Failing after 3s
CI / test (3.13) (push) Successful in 34s

This commit was merged in pull request #7.
This commit is contained in:
christianmanivong committed 2026-10-27 09:19:52 +00:00
commit c7d52864a0
6 files changed
+16 -11

No files matched your search

+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+5
View File
@@ -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.
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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]
+3 -3
View File
@@ -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