diff --git a/.github/workflows/pull-request-management.yml b/.github/workflows/pull-request-management.yml index ea8ceaabca3..b1b5b940cc0 100644 --- a/.github/workflows/pull-request-management.yml +++ b/.github/workflows/pull-request-management.yml @@ -95,7 +95,6 @@ jobs: fail-fast: true matrix: python_version: - - "3.9" - "3.10" - "3.11" - "3.12" @@ -482,7 +481,7 @@ jobs: needs.file-changes.outputs.pyavd == 'true' strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12"] + python: ["3.10", "3.11", "3.12"] steps: - name: 'Set environment variables' run: | diff --git a/.sonarcloud.properties b/.sonarcloud.properties index 6e3907878b7..3fc82dee090 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -1,5 +1,5 @@ # Python version -sonar.python.version=3.9, 3.10, 3.11, 3.12 +sonar.python.version=3.10, 3.11, 3.12 # Exclude tests from source sonar.exclusions=python-avd/tests/** # Path to tests diff --git a/ansible_collections/arista/avd/README.md b/ansible_collections/arista/avd/README.md index 73f88010a59..055487a67c0 100644 --- a/ansible_collections/arista/avd/README.md +++ b/ansible_collections/arista/avd/README.md @@ -21,7 +21,7 @@ AVD Documentation: The AVD collection has the following requirements: -- Python 3.9 or above +- Python 3.10 or above - Ansible Core 2.15.0 to 2.17.x - [Additional Python Dependencies](#additional-python-dependencies) - Modify the `ansible.cfg` file to support additional Jinja2 extensions diff --git a/ansible_collections/arista/avd/docs/installation/collection-installation.md b/ansible_collections/arista/avd/docs/installation/collection-installation.md index 69a4b81eda3..d34c0b24338 100644 --- a/ansible_collections/arista/avd/docs/installation/collection-installation.md +++ b/ansible_collections/arista/avd/docs/installation/collection-installation.md @@ -8,7 +8,7 @@ ## Installation workflow -- Install [Python](https://www.python.org/downloads/) **3.9** or later +- Install [Python](https://www.python.org/downloads/) **3.10** or later - Install [arista.avd](#install-collection-from-ansible-galaxy) collection including Python requirements. - Modify `ansible.cfg` file to support additional [jinja2 extensions](#ansible-configuration-file) diff --git a/ansible_collections/arista/avd/plugins/action/verify_requirements.py b/ansible_collections/arista/avd/plugins/action/verify_requirements.py index db6ee7a5e56..ccd0433e175 100644 --- a/ansible_collections/arista/avd/plugins/action/verify_requirements.py +++ b/ansible_collections/arista/avd/plugins/action/verify_requirements.py @@ -25,8 +25,8 @@ except ImportError: HAS_PACKAGING = False -# Python >= 3.9 -MIN_PYTHON_SUPPORTED_VERSION = (3, 9) +# Python >= 3.10 +MIN_PYTHON_SUPPORTED_VERSION = (3, 10) def _validate_python_version(info: dict, result: dict) -> bool: diff --git a/ansible_collections/arista/avd/tests/config.yml b/ansible_collections/arista/avd/tests/config.yml index c26ea59662b..6fe2c43ad80 100644 --- a/ansible_collections/arista/avd/tests/config.yml +++ b/ansible_collections/arista/avd/tests/config.yml @@ -1,3 +1,3 @@ --- modules: - python_requires: ">=3.9" + python_requires: ">=3.10" diff --git a/python-avd/pyproject.toml b/python-avd/pyproject.toml index be1b86278b4..51cea3500ad 100644 --- a/python-avd/pyproject.toml +++ b/python-avd/pyproject.toml @@ -10,7 +10,6 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -18,7 +17,7 @@ classifiers = [ "Topic :: Software Development :: Testing", ] keywords = ["pyavd"] -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "aristaproto>=0.1.1", "cryptography>=38.0.4", @@ -57,7 +56,6 @@ requires = [ "mkdocstrings[python]", "pydantic>=2.3.0", "isort", - "eval-type-backport>=0.2.0", # Only needed for 3.9 "cryptography>=38.0.4", "aristaproto>=0.1.1", ] diff --git a/python-avd/schema_tools/metaschema/meta_schema_model.py b/python-avd/schema_tools/metaschema/meta_schema_model.py index 19df0a3c002..3ef65697bee 100644 --- a/python-avd/schema_tools/metaschema/meta_schema_model.py +++ b/python-avd/schema_tools/metaschema/meta_schema_model.py @@ -6,7 +6,7 @@ from abc import ABC from enum import Enum from functools import cached_property -from typing import Annotated, Any, ClassVar, Generator, Literal, Union +from typing import Annotated, Any, ClassVar, Generator, Literal from pydantic import BaseModel, ConfigDict, Field, constr @@ -601,8 +601,5 @@ def _path(self) -> list[str]: return [] -# Workaround for tox until Python 3.9 is dropped -# https://github.com/microsoft/pyright/issues/4615#issuecomment-1426685471 -AvdSchemaField = Union[AvdSchemaInt, AvdSchemaBool, AvdSchemaStr, AvdSchemaList, AvdSchemaDict] -# AvdSchemaField = AvdSchemaInt | AvdSchemaBool | AvdSchemaStr | AvdSchemaList | AvdSchemaDict +AvdSchemaField = AvdSchemaInt | AvdSchemaBool | AvdSchemaStr | AvdSchemaList | AvdSchemaDict """Alias for any of the AvdSchema field types""" diff --git a/python-avd/tox.ini b/python-avd/tox.ini index b35be4e5303..310797b73ee 100644 --- a/python-avd/tox.ini +++ b/python-avd/tox.ini @@ -1,6 +1,5 @@ [tox] env_list = - py39 py310 py311 py312 @@ -12,7 +11,6 @@ depends = [gh-actions] python = - 3.9: py39 3.10: py310 3.11: coverage, report 3.12: py312