Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop python 3.8 #176

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install --upgrade pip wheel invoke toml black"
- name: "Linting: Black"
Expand All @@ -29,7 +29,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install --upgrade pip wheel invoke toml bandit"
- name: "Linting: Bandit"
Expand All @@ -46,7 +46,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install --upgrade pip wheel invoke toml pydocstyle"
- name: "Linting: pydocstyle"
Expand All @@ -63,7 +63,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install --upgrade pip wheel invoke toml flake8"
- name: "Linting: flake8"
Expand All @@ -80,7 +80,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install --upgrade pip wheel invoke toml yamllint"
- name: "Linting: yamllint"
Expand All @@ -95,7 +95,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Setup"
run: "pip install invoke poetry toml"
- name: "Build Container"
Expand All @@ -113,7 +113,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install invoke poetry toml"
- name: "Build Container"
Expand All @@ -126,7 +126,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-20.04"
env:
PYTHON_VER: "${{ matrix.python-version }}"
Expand All @@ -136,7 +136,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install invoke poetry toml"
- name: "Build Container"
Expand All @@ -155,7 +155,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages for Linting"
run: "pip install invoke poetry toml"
- name: "Set env"
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.11"
python-version: "3.12"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This section describes how to install *nornir_nautobot* for development, how to

## Python Versions

This leverages Python3.8 or later. All features will be tested against 3.8 - 3.11 versions of Python.
This leverages Python3.9 or later. All features will be tested against 3.9 - 3.12 versions of Python.

## Versioning

Expand Down
2 changes: 1 addition & 1 deletion nornir_nautobot/plugins/inventory/nautobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _set_host(data: Dict[str, Any], name: str, groups, host, defaults: Defaults)
class NautobotInventory: # pylint: disable=R0902
"""Nautobot Nornir Inventory."""

def __init__( # pylint: disable=R0913
def __init__( # pylint: disable=R0913,too-many-positional-arguments
self,
nautobot_url: Union[str, None],
nautobot_token: Union[str, None],
Expand Down
9 changes: 4 additions & 5 deletions nornir_nautobot/plugins/tasks/dispatcher/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def check_connectivity(cls, task: Task, logger, obj) -> Result:
return Result(host=task.host)

@classmethod
def compliance_config(
def compliance_config( # pylint: disable=too-many-positional-arguments
cls,
task: Task,
logger,
Expand Down Expand Up @@ -138,7 +138,7 @@ def compliance_config(
return Result(host=task.host, result={"feature_data": feature_data})

@classmethod
def generate_config(
def generate_config( # pylint: disable=too-many-positional-arguments,too-many-locals
cls,
task: Task,
logger,
Expand All @@ -149,7 +149,6 @@ def generate_config(
jinja_filters: Optional[dict] = None,
jinja_env: Optional[jinja2.Environment] = None,
) -> Result:
# pylint: disable=too-many-locals
"""A small wrapper around template_file Nornir task.

Args:
Expand Down Expand Up @@ -255,7 +254,7 @@ class NapalmDefault(DispatcherMixin):
"""Default collection of Nornir Tasks based on Napalm."""

@classmethod
def get_config(
def get_config( # pylint: disable=too-many-positional-arguments
cls,
task: Task,
logger,
Expand Down Expand Up @@ -427,7 +426,7 @@ class NetmikoDefault(DispatcherMixin):
config_command = "show run"

@classmethod
def get_config(
def get_config( # pylint: disable=too-many-positional-arguments
cls,
task: Task,
logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ApiMikrotikRouteros(DispatcherMixin):
]

@classmethod
def get_config( # pylint: disable=R0913,R0914
def get_config( # pylint: disable=R0913,R0914,too-many-positional-arguments
cls, task: Task, logger, obj, backup_file: str, remove_lines: list, substitute_lines: list
) -> Result:
"""Get the latest configuration from the device.
Expand Down Expand Up @@ -116,7 +116,7 @@ class NetmikoMikrotikRouteros(NetmikoDefault):
version_command = "system resource print"

@classmethod
def get_config( # pylint: disable=R0913,R0914
def get_config( # pylint: disable=R0913,R0914,too-many-positional-arguments
cls, task: Task, logger, obj, backup_file: str, remove_lines: list, substitute_lines: list
) -> Result:
"""Get the latest configuration from the device using Netmiko. Overrides default get_config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _api_auth(cls, obj, logger, session_params: tuple) -> dict:
return service_ticket

@classmethod
def _build_urls( # pylint: disable=too-many-arguments,too-many-locals
def _build_urls( # pylint: disable=too-many-arguments,too-many-locals,too-many-positional-arguments
cls,
obj,
logger,
Expand Down Expand Up @@ -138,7 +138,7 @@ async def _async_get_data(cls, url_dict: dict) -> dict:
return api_data

@classmethod
def get_config( # pylint: disable=R0913,R0914
def get_config( # pylint: disable=too-many-arguments,too-many-locals,too-many-positional-arguments
cls, task: Task, logger, obj, backup_file: str, remove_lines: list, substitute_lines: list
) -> Result:
"""Get the latest configuration from the device.
Expand Down
Loading