Skip to content

Commit

Permalink
introduce python3.12 for ci (#568)
Browse files Browse the repository at this point in the history
* Updated versioneer (addresses Python 3.12 deprecation of SafeConfigParses and read_fp)
* Deprecated Python 3.5.x testing as 3.5 does not support type hinting required by versioneer
* Preparing for Python 3.12 in CI checks (currently disabled)
  • Loading branch information
einarnn committed Jun 28, 2023
1 parent 65286b5 commit e003f76
Show file tree
Hide file tree
Showing 4 changed files with 923 additions and 350 deletions.
57 changes: 55 additions & 2 deletions .github/workflows/check.yaml
Expand Up @@ -3,11 +3,64 @@ name: Run Tests and Check Coverage
on: [push, pull_request]

jobs:
check:
check_legacy:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.5.10', '3.6.15', '3.7.15', '3.8.15', '3.9.16', '3.10.9', '3.11.1']
python-version: ['3.6.15']
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install coverage coveralls
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Run Check Scripts
run: |
pytest test --verbosity=3 --cov=ncclient
# check_beta:
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# python-version: ['3.12.0-beta.3']
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: 'recursive'

# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install Dependencies
# run: |
# sudo apt install -y python3-dev libxml2-dev libxslt1-dev
# python -m pip install --upgrade pip
# pip install coverage coveralls
# pip install -r requirements.txt
# pip install -r test-requirements.txt

# - name: Run Check Scripts
# run: |
# pytest test --verbosity=3 --cov=ncclient

check:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.7.17', '3.8.17', '3.9.17', '3.10.12', '3.11.4']
steps:
- uses: actions/checkout@v3
with:
Expand Down
5 changes: 2 additions & 3 deletions ncclient/__init__.py
Expand Up @@ -23,6 +23,5 @@ class NCClientError(Exception):
"Base type for all NCClient errors"
pass

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from . import _version
__version__ = _version.get_versions()['version']

0 comments on commit e003f76

Please sign in to comment.