Skip to content

Commit

Permalink
Updates for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista committed Jul 3, 2024
1 parent f2e2080 commit b85ea99
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
fail-fast: true
matrix:
python_version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ansible_collections/arista/avd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ansible_collections/arista/avd/tests/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
modules:
python_requires: ">=3.9"
python_requires: ">=3.10"
4 changes: 1 addition & 3 deletions python-avd/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ 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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
]
keywords = ["pyavd"]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"aristaproto>=0.1.1",
"cryptography>=38.0.4",
Expand Down Expand Up @@ -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",
]
Expand Down
7 changes: 2 additions & 5 deletions python-avd/schema_tools/metaschema/meta_schema_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"""
2 changes: 0 additions & 2 deletions python-avd/tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tox]
env_list =
py39
py310
py311
py312
Expand All @@ -12,7 +11,6 @@ depends =

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: coverage, report
3.12: py312
Expand Down

0 comments on commit b85ea99

Please sign in to comment.