Skip to content

Commit

Permalink
Merge 047fdfe into ecbc1ba
Browse files Browse the repository at this point in the history
  • Loading branch information
einarnn committed Nov 1, 2022
2 parents ecbc1ba + 047fdfe commit e0295b5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/check.yaml
Expand Up @@ -7,27 +7,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

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

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install rednose coverage coveralls
pip install coverage coveralls
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Run Check Scripts
run: |
nosetests test --rednose --verbosity=3 --with-coverage --cover-package ncclient
pytest test --verbosity=3 --cov=ncclient
- name: Upload Coverage
env:
Expand Down
2 changes: 1 addition & 1 deletion ncclient/operations/rpc.py
Expand Up @@ -358,7 +358,7 @@ def _request(self, op):
else:
self.logger.debug('Sync request, will wait for timeout=%r', self._timeout)
self._event.wait(self._timeout)
if self._event.isSet():
if self._event.is_set():
if self._error:
# Error that prevented reply delivery
raise self._error
Expand Down
4 changes: 1 addition & 3 deletions ncclient/transport/session.py
Expand Up @@ -40,11 +40,9 @@ class Session(Thread):
"Base class for use by transport protocol implementations."

def __init__(self, capabilities):
Thread.__init__(self)
self.setDaemon(True)
Thread.__init__(self, daemon=True, name='session')
self._listeners = set()
self._lock = Lock()
self.setName('session')
self._q = Queue()
self._notification_q = Queue()
self._client_capabilities = capabilities
Expand Down
1 change: 0 additions & 1 deletion test-requirements.txt
Expand Up @@ -3,4 +3,3 @@ pytest-cov
sphinx
flake8
mock; python_version < '3.6'
nose
4 changes: 2 additions & 2 deletions test/unit/operations/test_rpc.py
Expand Up @@ -14,9 +14,9 @@
import sys

if sys.version >= '3':
patch_str = 'ncclient.operations.rpc.Event.isSet'
patch_str = 'ncclient.operations.rpc.Event.is_set'
else:
patch_str = 'threading._Event.isSet'
patch_str = 'threading._Event.is_set'

xml1 = """<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1X46/junos">
<ok/>
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipdist = True
envlist = py27,py36,py37,pep8,cover,docs
envlist = py27,py36,py37,py38,py39,py310,pep8,cover,docs

[testenv]
setenv = VIRTUAL_ENV={envdir}
Expand Down

0 comments on commit e0295b5

Please sign in to comment.