chore: Python 3.12 is the floor, part A (#6)
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 on 3.12, and the tool itself needs 3.12. netOrk runs every driver on 3.12 in its own containers. check keeps accepting a 3.10 floor until every driver has moved; part B raises it.
This commit is contained in:
1 parent
7e03ad6ab3
commit
8cbcd20a3a
6 files changed
+16
-11
No files matched your search
@@ -11,7 +11,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.11", "3.12", "3.13"]
|
python-version: ["3.12", "3.13"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ on:
|
|||||||
python-versions:
|
python-versions:
|
||||||
description: "JSON list of the Python versions the tests run on"
|
description: "JSON list of the Python versions the tests run on"
|
||||||
type: string
|
type: string
|
||||||
default: '["3.10", "3.11", "3.12", "3.13"]'
|
default: '["3.12", "3.13"]'
|
||||||
pypi-url:
|
pypi-url:
|
||||||
description: "Upload target; https://test.pypi.org/legacy/ for a dry run"
|
description: "Upload target; https://test.pypi.org/legacy/ for a dry run"
|
||||||
type: string
|
type: string
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.12"
|
||||||
- name: Install the lowest versions the package allows
|
- name: Install the lowest versions the package allows
|
||||||
run: |
|
run: |
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ The format follows [Keep a Changelog](https://keepachangelog.com/), versions fol
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed
|
### 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:
|
- `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 refuses both from 2027-02-18 (PEP 639). The template builds with
|
||||||
setuptools>=77.
|
setuptools>=77.
|
||||||
|
|||||||
+2
-2
@@ -155,7 +155,7 @@ release tags:
|
|||||||
| `standard` | `napalm-standard check` (with `--tag` on a tag) and `napalm-standard ratchet` |
|
| `standard` | `napalm-standard check` (with `--tag` on a tag) and `napalm-standard ratchet` |
|
||||||
| `lint` | `ruff format --check`, `ruff check` |
|
| `lint` | `ruff format --check`, `ruff check` |
|
||||||
| `types` | `mypy` on the package |
|
| `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 |
|
| `lowest` | the tests again with every direct dependency at its declared floor |
|
||||||
| `security` | `bandit`, `pip-audit` |
|
| `security` | `bandit`, `pip-audit` |
|
||||||
| `build` | wheel and sdist, `twine check --strict` |
|
| `build` | wheel and sdist, `twine check --strict` |
|
||||||
@@ -168,7 +168,7 @@ release tags:
|
|||||||
names do not change with the package name.
|
names do not change with the package name.
|
||||||
- **`pyproject.toml`** declares `name`, `version`, `description`, `readme`,
|
- **`pyproject.toml`** declares `name`, `version`, `description`, `readme`,
|
||||||
`license = "Apache-2.0"` (an SPDX string, PEP 639; no table, no `License ::`
|
`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
|
`dev` extra, `[project.urls]` with `Repository` (and `Issues`) on
|
||||||
`https://git.netork.io/NAPALM/…`, and the `napalm.drivers` entry points.
|
`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
|
- **Dependencies are ranges with true floors.** A driver is a library: it never pins
|
||||||
|
|||||||
+3
-3
@@ -8,7 +8,7 @@ version = "0.1.0"
|
|||||||
description = "Rules, CI and release tooling shared by the drivers of the NAPALM org"
|
description = "Rules, CI and release tooling shared by the drivers of the NAPALM org"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.12"
|
||||||
authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }]
|
authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }]
|
||||||
dependencies = ["packaging>=23"]
|
dependencies = ["packaging>=23"]
|
||||||
|
|
||||||
@@ -30,13 +30,13 @@ napalm_standard = ["py.typed"]
|
|||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
target-version = "py311"
|
target-version = "py312"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I", "UP", "B"]
|
select = ["E", "F", "I", "UP", "B"]
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.11"
|
python_version = "3.12"
|
||||||
strict = true
|
strict = true
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ version = "0.1.0"
|
|||||||
description = "NAPALM driver for Example switches"
|
description = "NAPALM driver for Example switches"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.12"
|
||||||
authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }]
|
authors = [{ name = "Christian Manivong", email = "christian@manivong.de" }]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
@@ -38,7 +38,7 @@ napalm_example = ["py.typed"]
|
|||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
target-version = "py310"
|
target-version = "py312"
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I", "UP", "B"]
|
select = ["E", "F", "I", "UP", "B"]
|
||||||
@@ -48,7 +48,7 @@ select = ["E", "F", "I", "UP", "B"]
|
|||||||
"tests/**" = ["E501"]
|
"tests/**" = ["E501"]
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.10"
|
python_version = "3.12"
|
||||||
strict = true
|
strict = true
|
||||||
# napalm itself is untyped, so every driver subclasses Any.
|
# napalm itself is untyped, so every driver subclasses Any.
|
||||||
disallow_subclassing_any = false
|
disallow_subclassing_any = false
|
||||||
|
|||||||
Reference in new issue
Block a user