From 3b3f5d9d02602d13f1215500e4601ad0959170e9 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Tue, 27 Oct 2026 10:19:01 +0100 Subject: [PATCH 1/3] chore: Python 3.12 is the floor (NAPALM/driver-standard#6) netOrk runs every driver in its own containers on Python 3.12, so 3.10 and 3.11 are no longer supported or tested. requires-python, mypy and ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite. --- CHANGELOG.md | 4 ++++ README.md | 2 +- napalm_vmware/_tasks.py | 6 ++---- pyproject.toml | 8 +++----- tests/test_plain.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41fb624..b0aba69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver + on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6). + ## [0.3.0] - 2026-10-23 The first release on PyPI. diff --git a/README.md b/README.md index 3db982d..16a5de5 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Unverified assumptions, to be checked against real hardware: ## Install -Python 3.10 or later. +Python 3.12 or later. ```bash pip install napalm-vmware diff --git a/napalm_vmware/_tasks.py b/napalm_vmware/_tasks.py index a10debd..8b43990 100644 --- a/napalm_vmware/_tasks.py +++ b/napalm_vmware/_tasks.py @@ -9,14 +9,12 @@ from __future__ import annotations import time from collections.abc import Callable -from typing import Any, TypeVar +from typing import Any from pyVmomi import vmodl from napalm_vmware._plain import to_plain -T = TypeVar("T") - _POLL_SECONDS = 0.5 _FREE_LICENSE = ( "the host runs the free vSphere Hypervisor license, which makes the " @@ -31,7 +29,7 @@ def fault_message(fault: dict[str, Any]) -> str: return fault.get("localizedMessage") or fault.get("msg") or fault.get("_type", "unknown fault") -def invoke(call: Callable[..., T], *args: Any, **kwargs: Any) -> T: +def invoke[T](call: Callable[..., T], *args: Any, **kwargs: Any) -> T: """Run a vSphere call, re-raising any ``MethodFault`` as ``RuntimeError``.""" try: return call(*args, **kwargs) diff --git a/pyproject.toml b/pyproject.toml index c94264a..b021593 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "napalm-vmware" version = "0.3.0" description = "NAPALM drivers for VMware ESXi hosts and vCenter Server (vSphere API via pyVmomi)" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.12" license = "Apache-2.0" authors = [ { name = "Christian Manivong", email = "christian@manivong.de" }, @@ -19,8 +19,6 @@ classifiers = [ "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: System :: Networking", @@ -69,7 +67,7 @@ markers = [ [tool.ruff] line-length = 100 -target-version = "py310" +target-version = "py312" [tool.ruff.lint] select = ["E", "F", "I", "UP", "B"] @@ -79,7 +77,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 diff --git a/tests/test_plain.py b/tests/test_plain.py index dcbad37..86f7bde 100644 --- a/tests/test_plain.py +++ b/tests/test_plain.py @@ -54,7 +54,7 @@ def test_lists_are_converted_elementwise(): def test_datetime_becomes_epoch_seconds(): - when = datetime.datetime(2026, 1, 1, tzinfo=datetime.timezone.utc) + when = datetime.datetime(2026, 1, 1, tzinfo=datetime.UTC) assert to_plain(when) == 1767225600.0 -- 2.54.0 From e66c7795bcd6446cf40ce413b34106cb12135318 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Tue, 27 Oct 2026 10:49:32 +0100 Subject: [PATCH 2/3] fix: the floor on napalm is 5.1 (NAPALM/driver-standard#6) napalm 5.0 and older import pkg_resources, which a Python 3.12 venv no longer has, so the lowest job failed on them. --- CHANGELOG.md | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0aba69..b7cd8cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Python 3.12 is the floor (`requires-python = ">=3.12"`): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6). +- The floor on napalm is 5.1: older releases import `pkg_resources`, which a Python + 3.12 venv no longer has. ## [0.3.0] - 2026-10-23 diff --git a/pyproject.toml b/pyproject.toml index b021593..6197986 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "napalm>=5.0.0", + "napalm>=5.1", # older releases import pkg_resources, which a 3.12 venv lacks "napalm-device-types>=4.21.1", "pyvmomi>=8.0.1", # Provisioning: download the image, write the NoCloud seed ISO and its YAML. -- 2.54.0 From fdb43fe882f46e9d98b92e06711cc7464cceecbf Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Tue, 27 Oct 2026 12:22:48 +0100 Subject: [PATCH 3/3] fix: the floor on PyYAML is 6.0.1 (NAPALM/driver-standard#6) PyYAML 6.0 ships no Python 3.12 wheel and fails to build from source there, so the lowest job could not install it. --- CHANGELOG.md | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7cd8cb..28622bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6). - The floor on napalm is 5.1: older releases import `pkg_resources`, which a Python 3.12 venv no longer has. +- The floor on PyYAML is 6.0.1: 6.0 has no Python 3.12 wheel and does not build there. ## [0.3.0] - 2026-10-23 diff --git a/pyproject.toml b/pyproject.toml index 6197986..c977c90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ # Provisioning: download the image, write the NoCloud seed ISO and its YAML. "requests>=2.31", "pycdlib>=1.14", - "PyYAML>=6.0", + "PyYAML>=6.0.1", # 6.0 has no Python 3.12 wheel and does not build there ] [project.optional-dependencies] -- 2.54.0