diff --git a/.github/workflows/py3-packages-ci.yml b/.github/workflows/py3-packages-ci.yml index 22d0af6..81a364d 100644 --- a/.github/workflows/py3-packages-ci.yml +++ b/.github/workflows/py3-packages-ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7] + python-version: [3.9] steps: - name: Checkout code uses: actions/checkout@v2 @@ -56,10 +56,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: | python -m pip install pip -U @@ -74,10 +74,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: | python -m pip install pip -U @@ -107,10 +107,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: | python -m pip install pip -U @@ -134,10 +134,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: | python -m pip install pip -U @@ -170,10 +170,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: | python -m pip install pip -U diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d30c9ee..1c37c2d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,27 +1,23 @@ - -repos: - - repo: https://github.com/timothycrosley/isort - rev: 5.6.4 - hooks: - - id: isort - language_version: python3.7 - exclude: '/mibs' - - repo: https://github.com/python/black - rev: 20.8b1 - hooks: - - id: black - language_version: python3.7 - exclude: '/mibs' - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.4 - hooks: - - id: flake8 - additional_dependencies: [ - flake8-docstrings, - flake8-builtins, - flake8-comprehensions, - flake8-print, - flake8-eradicate, - ] - language_version: python3.7 - exclude: '/mibs' \ No newline at end of file +repos: + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 + hooks: + - id: isort + exclude: '/mibs' + - repo: https://github.com/psf/black + rev: 24.8.0 + hooks: + - id: black + exclude: '/mibs' + - repo: https://github.com/PyCQA/flake8 + rev: 7.1.1 + hooks: + - id: flake8 + additional_dependencies: [ + flake8-docstrings, + flake8-builtins, + flake8-comprehensions, + flake8-print, + flake8-eradicate, + ] + exclude: '/mibs' diff --git a/cloudshell/checkpoint/gaia/cli/sessions/console_telnet_session.py b/cloudshell/checkpoint/gaia/cli/sessions/console_telnet_session.py index 5fe6148..2ba1a20 100644 --- a/cloudshell/checkpoint/gaia/cli/sessions/console_telnet_session.py +++ b/cloudshell/checkpoint/gaia/cli/sessions/console_telnet_session.py @@ -54,9 +54,9 @@ def connect(self, prompt, logger): self._handler.get_socket().send(telnetlib.IAC + telnetlib.WILL + telnetlib.ECHO) action_map = OrderedDict() - action_map[ - "[Ll]ogin:|[Uu]ser:|[Uu]sername:" - ] = lambda session, logger: session.send_line(session.username, logger) + action_map["[Ll]ogin:|[Uu]ser:|[Uu]sername:"] = ( + lambda session, logger: session.send_line(session.username, logger) + ) action_map["[Pp]assword:"] = lambda session, logger: session.send_line( session.password, logger ) diff --git a/requirements.txt b/requirements.txt index 5066386..2c85181 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ setuptools>=40.0 cloudshell-shell-flows>=1.0,<2 cloudshell-cli>=4.0,<5 -cloudshell-snmp>=4.0,<5 -passlib==1.7.4 \ No newline at end of file +cloudshell-snmp>=6.0,<7.0 +passlib==1.7.4 +standard-telnetlib>=3.13; python_version >= "3.13" diff --git a/setup.py b/setup.py index c6f9d24..143d28f 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,15 @@ packages=find_packages(), install_requires=required, tests_require=required_for_tests, - python_requires="~=3.7", + python_requires=">=3.9", version=version_from_file, + classifiers=[ + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + ], package_data={"": ["*.txt"]}, description="Quali checkpoint specific package", include_package_data=True, diff --git a/tox.ini b/tox.ini index 902bbd7..9653cc7 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] envlist = - py{37}-{master,dev} + py{39}-{master,dev} pre-commit build distshare = dist @@ -27,7 +27,7 @@ commands = pre-commit run --all-files --show-diff-on-failure [testenv:build] skip_install = true commands = - python setup.py -q sdist --format zip + python setup.py -q sdist python setup.py -q bdist_wheel [isort] @@ -39,5 +39,5 @@ skip = mibs max-line-length = 88 ;we don't need have docstrings in every func, class and package ;and W503 is not PEP 8 compliant -ignore = D100,D101,D102,D103,D104,D105,D106,D107,D401,W503,E203 +ignore = D100,D101,D102,D103,D104,D105,D106,D107,D401,W503,E203,E741 exclude = mibs \ No newline at end of file diff --git a/version.txt b/version.txt index a6a3a43..1cc5f65 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.4 \ No newline at end of file +1.1.0 \ No newline at end of file