From 0f201e0f2d204c56eebd9bbda664e22b4f772ed7 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Tue, 27 Oct 2026 10:21:00 +0100 Subject: [PATCH 1/2] chore: Python 3.12 is the floor, part B (#6) 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. --- CHANGELOG.md | 4 ++-- STANDARDS.md | 2 +- napalm_standard/check.py | 2 +- tests/conftest.py | 2 +- tests/test_check.py | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ffa955..4ac28e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 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. + its own containers on 3.12, so older versions are no longer tested. `check` + requires `requires-python` ≥ 3.12. - `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 9238d0c..12d259c 100644 --- a/STANDARDS.md +++ b/STANDARDS.md @@ -178,7 +178,7 @@ release tags: - **`py.typed`** ships with the package. `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 `.github/`; strict mypy, a coverage source and floor; on a tag, tag = version and a CHANGELOG section for it. diff --git a/napalm_standard/check.py b/napalm_standard/check.py index 3a8705d..f63f964 100644 --- a/napalm_standard/check.py +++ b/napalm_standard/check.py @@ -22,7 +22,7 @@ from packaging.version import Version from napalm_standard.changelog import changelog_section DEVICE_TYPES = "napalm-device-types" -MIN_PYTHON = Version("3.10") +MIN_PYTHON = Version("3.12") URL_PREFIX = "https://git.netork.io/NAPALM/" REQUIRED_FILES = ("LICENSE", "README.md", "CHANGELOG.md") REQUIRED_FIELDS = ("name", "version", "description", "license") diff --git a/tests/conftest.py b/tests/conftest.py index 1ec1a19..0a7f2fe 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,7 +19,7 @@ version = "1.2.0" description = "NAPALM driver for Example devices" readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.10" +requires-python = ">=3.12" dependencies = [ "napalm>=5.0", "napalm-device-types>=4.21", diff --git a/tests/test_check.py b/tests/test_check.py index 7383c62..5307056 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -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: pyproject = PYPROJECT.replace( - 'requires-python = ">=3.10"\n', - 'requires-python = ">=3.10"\n' + 'requires-python = ">=3.12"\n', + 'requires-python = ">=3.12"\n' 'classifiers = ["License :: OSI Approved :: Apache Software License"]\n', ) assert rules(check_repo(make_repo({"pyproject.toml": pyproject}))) == {"metadata"} -@pytest.mark.parametrize("spec", [">=3.8", ">=3.9", ""]) -def test_python_below_310_or_unbounded_is_reported(make_repo: RepoFactory, spec: str) -> None: - pyproject = PYPROJECT.replace('requires-python = ">=3.10"', f'requires-python = "{spec}"') +@pytest.mark.parametrize("spec", [">=3.9", ">=3.10", ">=3.11", ""]) +def test_python_below_312_or_unbounded_is_reported(make_repo: RepoFactory, spec: str) -> None: + pyproject = PYPROJECT.replace('requires-python = ">=3.12"', f'requires-python = "{spec}"') assert rules(check_repo(make_repo({"pyproject.toml": pyproject}))) == {"python"} 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})) == [] -- 2.54.0 From aa66944e3ca79f5fd191ae1b57ddf42a3b522731 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Tue, 27 Oct 2026 10:50:25 +0100 Subject: [PATCH 2/2] chore: the template's floor on napalm is 5.1 (#6) napalm 5.0 and older import pkg_resources, which a Python 3.12 venv no longer has; every driver's lowest job failed on it. --- CHANGELOG.md | 2 ++ template/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac28e4..26a1ab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ The format follows [Keep a Changelog](https://keepachangelog.com/), versions fol 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` requires `requires-python` ≥ 3.12. +- The template's floor on napalm is 5.1: older releases import `pkg_resources`, which a + Python 3.12 venv no longer has, so `lowest` fails on them. - `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/template/pyproject.toml b/template/pyproject.toml index 3c85393..9cedca1 100644 --- a/template/pyproject.toml +++ b/template/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "Topic :: System :: Networking", ] dependencies = [ - "napalm>=5.0", + "napalm>=5.1", # older releases import pkg_resources, which a 3.12 venv lacks "napalm-device-types>=4.21", ] -- 2.54.0