chore: Python 3.12 is the floor, part B (#6)
CI / test (3.12) (pull_request) Successful in 28s
CI / test (3.13) (pull_request) Successful in 26s

check now requires requires-python >= 3.12. Every standard driver moved
to that floor in its own PR, so none of them goes red with this.
This commit is contained in:
Christian Manivong committed 2026-10-27 10:21:00 +01:00
1 parent c7d52864a0
commit 0f201e0f2d
5 files changed
+11 -11

No files matched your search

+2 -2
View File
@@ -9,8 +9,8 @@ The format follows [Keep a Changelog](https://keepachangelog.com/), versions fol
- Python 3.12 is the floor: the shared workflow tests on 3.12 and 3.13 by default and - 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 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 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 its own containers on 3.12, so older versions are no longer tested. `check`
accepting a 3.10 floor until every driver has moved. requires `requires-python` ≥ 3.12.
- `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.
+1 -1
View File
@@ -178,7 +178,7 @@ release tags:
- **`py.typed`** ships with the package. - **`py.typed`** ships with the package.
`napalm-standard check` verifies: LICENSE, README and CHANGELOG present; the `napalm-standard check` verifies: LICENSE, README and CHANGELOG present; the
metadata fields; `requires-python` ≥ 3.10; a floor on `napalm-device-types`; a metadata fields; `requires-python` ≥ 3.12; a floor on `napalm-device-types`; a
`napalm.drivers` entry point; URLs in the org; `py.typed`; CI in `.gitea/` and no `napalm.drivers` entry point; URLs in the org; `py.typed`; CI in `.gitea/` and no
`.github/`; strict mypy, a coverage source and floor; on a tag, tag = version and a `.github/`; strict mypy, a coverage source and floor; on a tag, tag = version and a
CHANGELOG section for it. CHANGELOG section for it.
+1 -1
View File
@@ -22,7 +22,7 @@ from packaging.version import Version
from napalm_standard.changelog import changelog_section from napalm_standard.changelog import changelog_section
DEVICE_TYPES = "napalm-device-types" DEVICE_TYPES = "napalm-device-types"
MIN_PYTHON = Version("3.10") MIN_PYTHON = Version("3.12")
URL_PREFIX = "https://git.netork.io/NAPALM/" URL_PREFIX = "https://git.netork.io/NAPALM/"
REQUIRED_FILES = ("LICENSE", "README.md", "CHANGELOG.md") REQUIRED_FILES = ("LICENSE", "README.md", "CHANGELOG.md")
REQUIRED_FIELDS = ("name", "version", "description", "license") REQUIRED_FIELDS = ("name", "version", "description", "license")
+1 -1
View File
@@ -19,7 +19,7 @@ version = "1.2.0"
description = "NAPALM driver for Example devices" description = "NAPALM driver for Example devices"
readme = "README.md" readme = "README.md"
license = "Apache-2.0" license = "Apache-2.0"
requires-python = ">=3.10" requires-python = ">=3.12"
dependencies = [ dependencies = [
"napalm>=5.0", "napalm>=5.0",
"napalm-device-types>=4.21", "napalm-device-types>=4.21",
+6 -6
View File
@@ -67,23 +67,23 @@ def test_a_license_table_is_reported(make_repo: RepoFactory, license_line: str)
def test_a_license_classifier_is_reported(make_repo: RepoFactory) -> None: def test_a_license_classifier_is_reported(make_repo: RepoFactory) -> None:
pyproject = PYPROJECT.replace( pyproject = PYPROJECT.replace(
'requires-python = ">=3.10"\n', 'requires-python = ">=3.12"\n',
'requires-python = ">=3.10"\n' 'requires-python = ">=3.12"\n'
'classifiers = ["License :: OSI Approved :: Apache Software License"]\n', 'classifiers = ["License :: OSI Approved :: Apache Software License"]\n',
) )
assert rules(check_repo(make_repo({"pyproject.toml": pyproject}))) == {"metadata"} assert rules(check_repo(make_repo({"pyproject.toml": pyproject}))) == {"metadata"}
@pytest.mark.parametrize("spec", [">=3.8", ">=3.9", ""]) @pytest.mark.parametrize("spec", [">=3.9", ">=3.10", ">=3.11", ""])
def test_python_below_310_or_unbounded_is_reported(make_repo: RepoFactory, spec: str) -> None: def test_python_below_312_or_unbounded_is_reported(make_repo: RepoFactory, spec: str) -> None:
pyproject = PYPROJECT.replace('requires-python = ">=3.10"', f'requires-python = "{spec}"') pyproject = PYPROJECT.replace('requires-python = ">=3.12"', f'requires-python = "{spec}"')
assert rules(check_repo(make_repo({"pyproject.toml": pyproject}))) == {"python"} assert rules(check_repo(make_repo({"pyproject.toml": pyproject}))) == {"python"}
def test_a_higher_python_floor_is_fine(make_repo: RepoFactory) -> None: def test_a_higher_python_floor_is_fine(make_repo: RepoFactory) -> None:
pyproject = PYPROJECT.replace('">=3.10"', '">=3.11"') pyproject = PYPROJECT.replace('">=3.12"', '">=3.13"')
assert check_repo(make_repo({"pyproject.toml": pyproject})) == [] assert check_repo(make_repo({"pyproject.toml": pyproject})) == []