Skip to content

Commit

Permalink
Release 4.4.0 (#3451)
Browse files Browse the repository at this point in the history
* Update dev dependencies
* Update black
* Roll to newer Python version in mypy section of setup.cfg
* Adding setuptools to pyproject.toml
*  cffi dependency issue
* Expand tests to windows and macos for GH-Actions
* Breakout testing of macos-14 and macos-13 runner separately
* Disable poetry cache on macos-13 and macos-14 due to ARM/X86_64 issues
  • Loading branch information
ktbyers authored Jul 8, 2024
1 parent 235217b commit a6dca5f
Show file tree
Hide file tree
Showing 51 changed files with 900 additions and 594 deletions.
87 changes: 86 additions & 1 deletion .github/workflows/main_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', "3.12", "3.13.0-beta.2" ]
platform: [ubuntu-24.04]
platform: [ubuntu-24.04, windows-2022]

runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -88,6 +88,91 @@ jobs:
poetry run pytest -v -s tests/unit/test_connection.py
poetry run pytest -v -s tests/unit/test_entry_points.py
# ARM/X86_64 issues on macos
pytest-macos13:
name: Std Test on Python ${{ matrix.python-version }} (${{ matrix.platform}})
defaults:
run:
shell: bash
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
platform: [macos-13]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/checkout@v4

- name: Install poetry
run: |
pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
poetry install
- name: Run Tests
run: |
poetry run pytest -v -s tests/test_import_netmiko.py
poetry run pytest -v -s tests/unit/test_base_connection.py
poetry run pytest -v -s tests/unit/test_ssh_autodetect.py
poetry run pytest -v -s tests/unit/test_connection.py
poetry run pytest -v -s tests/unit/test_entry_points.py
pytest-macos14:
name: Std Test on Python ${{ matrix.python-version }} (${{ matrix.platform}})
defaults:
run:
shell: bash
strategy:
matrix:
python-version: [ "3.12", "3.13.0-beta.2" ]
platform: [macos-14]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/checkout@v4

- name: Install poetry
run: |
pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
poetry install
- name: Run Tests
run: |
poetry run pytest -v -s tests/test_import_netmiko.py
poetry run pytest -v -s tests/unit/test_base_connection.py
poetry run pytest -v -s tests/unit/test_ssh_autodetect.py
poetry run pytest -v -s tests/unit/test_connection.py
poetry run pytest -v -s tests/unit/test_entry_points.py
pytest_parsers:
name: Parsers Test on Python ${{ matrix.python-version }} (${{ matrix.platform}})
defaults:
Expand Down
1 change: 1 addition & 0 deletions netmiko/a10/a10_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A10 support."""

from netmiko.cisco_base_connection import CiscoSSHConnection


Expand Down
1 change: 1 addition & 0 deletions netmiko/adva/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adva Device Drivers"""

from netmiko.adva.adva_aos_fsp_150_f2 import AdvaAosFsp150F2SSH
from netmiko.adva.adva_aos_fsp_150_f3 import AdvaAosFsp150F3SSH

Expand Down
1 change: 1 addition & 0 deletions netmiko/adva/adva_aos_fsp_150_f2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adva support."""

import re
from typing import Any, Optional
from netmiko.no_enable import NoEnable
Expand Down
1 change: 1 addition & 0 deletions netmiko/adva/adva_aos_fsp_150_f3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adva F3 Device Support"""

import re
from typing import (
Optional,
Expand Down
1 change: 1 addition & 0 deletions netmiko/alcatel/alcatel_aos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""

from netmiko.no_enable import NoEnable
from netmiko.no_config import NoConfig
from netmiko.cisco_base_connection import CiscoSSHConnection
Expand Down
1 change: 1 addition & 0 deletions netmiko/aruba/aruba_aoscx.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For use with Aruba AOS CX devices.
"""

from typing import Any
from netmiko.cisco_base_connection import CiscoSSHConnection

Expand Down
1 change: 1 addition & 0 deletions netmiko/aruba/aruba_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For use with Aruba OS Controllers.
"""

from typing import Any
from netmiko.cisco_base_connection import CiscoSSHConnection

Expand Down
1 change: 1 addition & 0 deletions netmiko/base_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Also defines methods that should generally be supported by child classes
"""

from typing import (
Optional,
Callable,
Expand Down
1 change: 1 addition & 0 deletions netmiko/calix/calix_b6.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Calix B6 SSH Driver for Netmiko"""

from typing import Any
import time
from os import path
Expand Down
1 change: 1 addition & 0 deletions netmiko/centec/centec_os.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Centec OS Support"""

from netmiko.cisco_base_connection import CiscoBaseConnection


Expand Down
1 change: 1 addition & 0 deletions netmiko/ciena/ciena_saos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Ciena SAOS support."""

from typing import Optional, Any
import re
import os
Expand Down
1 change: 1 addition & 0 deletions netmiko/cisco/cisco_asa_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Subclass specific to Cisco ASA."""

from typing import Any, Union, List, Dict, Optional
import re
import time
Expand Down
1 change: 1 addition & 0 deletions netmiko/cisco/cisco_ftd_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Subclass specific to Cisco FTD."""

from typing import Any
from netmiko.no_enable import NoEnable
from netmiko.no_config import NoConfig
Expand Down
1 change: 1 addition & 0 deletions netmiko/cisco/cisco_tp_tcce.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Written by Ahmad Barrin
Updated by Kirk Byers
"""

from typing import Any, Union, List, Dict
import time
import re
Expand Down
1 change: 1 addition & 0 deletions netmiko/cisco/cisco_viptela.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Subclass specific to Cisco Viptela."""

from typing import Union, Sequence, Iterator, TextIO, Any
import re

Expand Down
1 change: 1 addition & 0 deletions netmiko/cisco/cisco_wlc_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Netmiko Cisco WLC support."""

from typing import Any, Union, Sequence, Iterator, TextIO
import time
import re
Expand Down
1 change: 1 addition & 0 deletions netmiko/cisco_base_connection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms."""

from typing import Optional
import re
import time
Expand Down
1 change: 1 addition & 0 deletions netmiko/dell/dell_dnos6.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dell N2/3/4000 base driver- supports DNOS6."""

from netmiko.dell.dell_powerconnect import DellPowerConnectBase


Expand Down
1 change: 1 addition & 0 deletions netmiko/dell/dell_force10_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dell Force10 Driver - supports DNOS9."""

from netmiko.cisco_base_connection import CiscoSSHConnection


Expand Down
1 change: 1 addition & 0 deletions netmiko/dell/dell_os10_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dell EMC Networking OS10 Driver - supports dellos10."""

from typing import Any, Optional
from netmiko.base_connection import BaseConnection
from netmiko.cisco_base_connection import CiscoSSHConnection
Expand Down
1 change: 1 addition & 0 deletions netmiko/dell/dell_powerconnect.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dell PowerConnect Driver."""

from typing import Optional
from paramiko import SSHClient
import time
Expand Down
1 change: 1 addition & 0 deletions netmiko/dell/dell_sonic_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver
- supports dellenterprisesonic.
"""

from netmiko.no_enable import NoEnable
from netmiko.cisco_base_connection import CiscoSSHConnection
from netmiko import log
Expand Down
1 change: 1 addition & 0 deletions netmiko/digi/digi_transport.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Digi TransPort Routers"""

from typing import Any
from netmiko.no_enable import NoEnable
from netmiko.no_config import NoConfig
Expand Down
1 change: 1 addition & 0 deletions netmiko/enterasys/enterasys_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Enterasys support."""

from typing import Any
from netmiko.cisco_base_connection import CiscoSSHConnection

Expand Down
1 change: 1 addition & 0 deletions netmiko/ericsson/ericsson_ipos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Ericsson Ipos looks like it was RedBack equipment.
"""

from typing import Optional, Any, Union, Sequence, Iterator, TextIO
import re
import warnings
Expand Down
1 change: 1 addition & 0 deletions netmiko/ericsson/ericsson_mltn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Ericsson MiniLink driver."""

import time
import re
from os import path
Expand Down
1 change: 1 addition & 0 deletions netmiko/extreme/extreme_ers_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Netmiko support for Extreme Ethernet Routing Switch."""

import re
from netmiko.cisco_base_connection import CiscoSSHConnection
from netmiko.exceptions import NetmikoAuthenticationException
Expand Down
1 change: 1 addition & 0 deletions netmiko/extreme/extreme_exos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Extreme support."""

import os
from typing import Any, Callable, Optional, Union, List, Dict
import re
Expand Down
1 change: 1 addition & 0 deletions netmiko/extreme/extreme_nos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for Extreme NOS/VDX."""

import time
from netmiko.no_enable import NoEnable
from netmiko.cisco_base_connection import CiscoSSHConnection
Expand Down
1 change: 1 addition & 0 deletions netmiko/extreme/extreme_slx_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for Extreme SLX."""

import time
from netmiko.no_enable import NoEnable
from netmiko.cisco_base_connection import CiscoSSHConnection
Expand Down
1 change: 1 addition & 0 deletions netmiko/extreme/extreme_tierraos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for Extreme TierraOS."""

import time
from netmiko.no_enable import NoEnable
from netmiko.cisco_base_connection import CiscoSSHConnection
Expand Down
1 change: 1 addition & 0 deletions netmiko/extreme/extreme_vsp_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Extreme Virtual Services Platform Support."""

from netmiko.cisco_base_connection import CiscoSSHConnection


Expand Down
1 change: 1 addition & 0 deletions netmiko/fiberstore/fiberstore_fsos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fiberstore FSOS Driver."""

from typing import Optional
from paramiko import SSHClient
from netmiko.ssh_auth import SSHClient_noauth
Expand Down
1 change: 1 addition & 0 deletions netmiko/mellanox/mellanox_mlnxos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Mellanox MLNX-OS Switch support."""

import re
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions netmiko/mrv/mrv_lx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""MRV Communications Driver (LX)."""

import time
import re
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions netmiko/mrv/mrv_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""MRV Communications Driver (OptiSwitch)."""

import time
import re
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions netmiko/netgear/netgear_prosafe_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ProSafe OS support"""

import time
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions netmiko/oneaccess/oneaccess_oneos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Netmiko driver for OneAccess ONEOS"""

from typing import Any

from netmiko.cisco_base_connection import CiscoBaseConnection
Expand Down
1 change: 1 addition & 0 deletions netmiko/ruijie/ruijie_os.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Ruijie RGOS Support"""

import time
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions netmiko/scp_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
SCP requires a separate SSH connection for a control channel.
"""

from typing import AnyStr, Optional, Callable, Any, Dict
from typing import TYPE_CHECKING
from netmiko.scp_handler import BaseFileTransfer
Expand Down
1 change: 1 addition & 0 deletions netmiko/scp_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
SCP requires a separate SSH connection for a control channel.
"""

from typing import Callable, Optional, Any, Type
from typing import TYPE_CHECKING
from types import TracebackType
Expand Down
1 change: 1 addition & 0 deletions netmiko/snmp_autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Note, pysnmp is a required dependency for SNMPDetect and is intentionally not included in
netmiko requirements. So installation of pysnmp might be required.
"""

from typing import Optional, Dict, List
from typing.re import Pattern
import re
Expand Down
1 change: 1 addition & 0 deletions netmiko/sophos/sophos_sfos_ssh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""SophosXG (SFOS) Firewall support"""

from typing import Any
import time
import os
Expand Down
1 change: 1 addition & 0 deletions netmiko/ssh_autodetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
>>> remote_device['device_type'] = best_match
>>> connection = ConnectHandler(**remote_device)
"""

from typing import Any, List, Optional, Union, Dict
import re
import time
Expand Down
1 change: 1 addition & 0 deletions netmiko/ssh_dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Controls selection of proper class based on the device type."""

from typing import Any, Type, Optional
from typing import TYPE_CHECKING
import re
Expand Down
1 change: 1 addition & 0 deletions netmiko/terminal_server/terminal_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generic Terminal Server driver."""

from typing import Any

from netmiko.base_connection import BaseConnection
Expand Down
Loading

0 comments on commit a6dca5f

Please sign in to comment.