From 2df047c66a6c20d1129af9d7f0a4ba80e34b4c27 Mon Sep 17 00:00:00 2001 From: Michal Cerny Date: Tue, 2 Dec 2025 02:34:18 +0100 Subject: [PATCH] Run pipeline lint with all supported python versions --- .github/workflows/main.yml | 2 +- README.md | 4 ++-- changelogs/fragments/python_versions.yml | 3 +++ poetry.lock | 12 ++++++++---- pyproject.toml | 7 +++++-- 5 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 changelogs/fragments/python_versions.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b108c5b93..ce2534bda 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.13"] + python-version: ["3.11", "3.12", "3.13"] steps: diff --git a/README.md b/README.md index 710222533..bc5ab7b4f 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ This Ansible collection consists of a set of modules to define the intended netw - You must be running one of the two most recent releases of NetBox - A NetBox write-enabled API token when using modules or a read-only token for the `nb_lookup` and `nb_inventory` plugins. -- Python 3.10+ +- Python 3.11+ - Python modules: - pytz - pynetbox -- Ansible 2.15+ +- Ansible 2.18+ ## Installation diff --git a/changelogs/fragments/python_versions.yml b/changelogs/fragments/python_versions.yml new file mode 100644 index 000000000..d11f6b4d6 --- /dev/null +++ b/changelogs/fragments/python_versions.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - test suite expanded to run on Python 3.11, 3.12, and 3.13. diff --git a/poetry.lock b/poetry.lock index 6fa8790d3..8d50713af 100644 --- a/poetry.lock +++ b/poetry.lock @@ -146,6 +146,7 @@ files = [ [package.dependencies] frozenlist = ">=1.1.0" +typing-extensions = {version = ">=4.2", markers = "python_version < \"3.13\""} [[package]] name = "alabaster" @@ -789,7 +790,7 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" groups = ["main"] -markers = "platform_system == \"Windows\" or os_name == \"nt\" or sys_platform == \"win32\"" +markers = "platform_system == \"Windows\" or sys_platform == \"win32\" or os_name == \"nt\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -1851,7 +1852,10 @@ files = [ [package.dependencies] astroid = ">=3.3.8,<=3.4.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} -dill = {version = ">=0.3.7", markers = "python_version >= \"3.12\""} +dill = [ + {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, + {version = ">=0.3.6", markers = "python_version == \"3.11\""}, +] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" @@ -2529,5 +2533,5 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" -python-versions = "^3.13" -content-hash = "fb917643d30d83ca310e4698cbef9002738d2133ad33083418d0ad7f85e2161a" +python-versions = ">=3.11,<3.14" +content-hash = "7d535aae6b77b11cdf20aa281f4e22547383acf6f2f12067645c0ecea99d134b" diff --git a/pyproject.toml b/pyproject.toml index 3b0823fe6..53a94876e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Mikhail Yohman "] license = "GPLv3" [tool.poetry.dependencies] -python = "^3.13" +python = ">=3.11,<3.14" ansible-core = "^2.18" black = "*" codecov = "*" @@ -30,7 +30,10 @@ packaging = "*" importlib-resources = "*" antsibull-docs = "*" -[tool.poetry.dev-dependencies] +[poetry.group.dev.dependencies] + +[tool.ruff] +target-version = "py311" [build-system] requires = ["poetry-core>=1.0.0"]