From 416c41f75d08193a149570fe22b5f34bc792f846 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Tue, 27 Oct 2026 10:18:59 +0100 Subject: [PATCH] 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 ++++ napalm_redfish/driver.py | 4 ++-- pyproject.toml | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 638089e..92ceb3f 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.6.0] - 2026-10-23 The first release on PyPI. diff --git a/napalm_redfish/driver.py b/napalm_redfish/driver.py index f0e3e19..d772144 100644 --- a/napalm_redfish/driver.py +++ b/napalm_redfish/driver.py @@ -26,7 +26,7 @@ member of ``Managers``/``Chassis`` when the links are missing). from __future__ import annotations import logging -from datetime import datetime, timezone +from datetime import UTC, datetime from typing import Any from napalm.base.exceptions import ConnectionException @@ -123,7 +123,7 @@ def _timestamp(created: str | None) -> float | None: except ValueError: return None if when.tzinfo is None: - when = when.replace(tzinfo=timezone.utc) + when = when.replace(tzinfo=UTC) return when.timestamp() diff --git a/pyproject.toml b/pyproject.toml index 4f5abcb..a324bcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "0.6.0" description = "NAPALM driver for server baseboard management controllers over DMTF Redfish" readme = "README.md" license = "Apache-2.0" -requires-python = ">=3.10" +requires-python = ">=3.12" dependencies = [ "napalm>=5.0", "napalm-device-types>=4.21.1", @@ -45,7 +45,7 @@ napalm_redfish = ["py.typed"] [tool.ruff] line-length = 100 -target-version = "py310" +target-version = "py312" [tool.ruff.lint] select = ["E", "F", "I", "UP", "B"] @@ -55,7 +55,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