Skip to content

Commit 62d64d0

Browse files
authored
Merge pull request #1005 from gboutry/fix/paramiko-bound
#1005 #### Description This change removes paramiko upper bound, allow using paramiko >3.0 Fixes: #1004 #### QA Steps *<Commands / tests / steps to run to verify that the change works:>* ``` tox -e py3 -- tests/unit/... ``` ``` tox -e integration -- tests/integration/test_model.py::test_add_manual_machine_ssh tox -e integration -- tests/integration/test_model.py::test_add_manual_machine_ssh_root ``` All CI tests need to pass. #### Notes & Discussion I've had to pin `urllib3` to `urllib3==1.25.7` to have the test pass. but the error was from pylxd failing with `TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked'`. Not sure this is related to paramiko change, since paramiko does not depend on urllib3. ``` File "/home/gboutry/python-libjuju/tests/integration/test_model.py", line 596, in test_add_manual_machine_ssh await add_manual_machine_ssh(event_loop, is_root=False) File "/home/gboutry/python-libjuju/tests/integration/test_model.py", line 463, in add_manual_machine_ssh client = pylxd.Client() File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/pylxd/client.py", line 383, in __init__ response = self.api.get() File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/pylxd/client.py", line 192, in get response = self.session.get(self._api_endpoint, *args, **kwargs) File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen response = self._make_request( File "/home/gboutry/python-libjuju/.tox/py3/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request conn.request( TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked' ```
2 parents 2581b0c + e61bb7a commit 62d64d0

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
'websockets>=8.1,<9.0 ; python_version=="3.8"',
2929
'websockets>=9.0,<10.0 ; python_version=="3.9"',
3030
'websockets>=10.0; python_version>"3.9"',
31-
'paramiko>=2.4.0,<3.0.0',
31+
'paramiko>=2.4.0',
3232
'pyasn1>=0.4.4',
3333
'toposort>=1.5,<2',
3434
'typing_inspect>=0.6.0',

tox.ini

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ filterwarnings =
1919
[testenv]
2020
usedevelop=True
2121
commands =
22-
# These need to be installed in a specific order
23-
pip install urllib3
22+
pip install urllib3<2
2423
pip install pylxd
2524
python -m pytest --tb native -ra -v -s -n auto -k 'not integration' -m 'not serial' {posargs}
2625
passenv =
@@ -60,25 +59,22 @@ deps =
6059
[testenv:integration]
6160
envdir = {toxworkdir}/py3
6261
commands =
63-
# These need to be installed in a specific order
64-
pip install urllib3
62+
pip install urllib3<2
6563
pip install pylxd
6664
python -m pytest --tb native -ra -v -n auto -k 'integration' -m 'not serial' {posargs}
6765

6866
[testenv:unit]
6967
envdir = {toxworkdir}/py3
7068
commands =
71-
# These need to be installed in a specific order
72-
pip install urllib3
69+
pip install urllib3<2
7370
pip install pylxd
7471
python -m pytest --tb native -ra -v -n auto {toxinidir}/tests/unit {posargs}
7572

7673
[testenv:serial]
7774
# tests that can't be run in parallel
7875
envdir = {toxworkdir}/py3
7976
commands =
80-
# These need to be installed in a specific order
81-
pip install urllib3
77+
pip install urllib3<2
8278
pip install pylxd
8379
python -m pytest --tb native -ra -v -s {posargs:-m 'serial'}
8480

0 commit comments

Comments
 (0)