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})) == []