Skip to content

Commit f8bc2aa

Browse files
authored
Version 2 API changes (#221)
* Removed paramiko clients, tests and embedded server. Removed deprecated imports test. * Removed paramiko agent and utility functions. Removed deprecated modules. Updated docstrings. * Updated utils tests. * Updated imports * Made single client return host output objects from run_command. Removing deprecated output. * Updated tests for new API version. Removed deprecated functions. * Removed deprecated dictionary output support. Updated tests. * Updated libssh client tests * Updated output test * Updated libssh clients, parallel base client. * Updated changelog, setup.py. docstrings * Updated documentation * Added upgrade guide. * Updated finished and unfinished arguments to join timeout exception to be easier to use - added test. * Updated changelog. Removed unused host_clients from parallel clients. Updated make ssh client to not use locks since no longer using old host clients. * Updated circleci cfg * Updated tunnel tests and code to cleanup more safely
1 parent 131e13f commit f8bc2aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+940
-4433
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
skip_branch_with_pr: true
12
environment:
23
global:
34
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the

.circleci/config.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,39 @@ jobs:
1919
- run:
2020
name: Deps
2121
command: |
22-
sudo apt-get install openssh-server
22+
sudo apt-get install openssh-server --fix-missing
2323
- python/save-cache:
2424
dependency-file: requirements_dev.txt
2525
key: depsv3-{{ .Branch }}.{{ arch }}-PY<< parameters.python_ver >>
26+
- run:
27+
command: |
28+
python setup.py check --restructuredtext
29+
name: Check readme
2630
- run:
2731
command: |
2832
pip install -U -r requirements_dev.txt
2933
name: Build
34+
- run:
35+
command: |
36+
flake8 pssh
37+
name: flake
3038
- run:
3139
command: |
3240
eval "$(ssh-agent -s)"
33-
pytest --cov-append --cov=pssh tests/test_imports.py tests/test_output.py tests/test_utils.py
34-
pytest --reruns 5 --cov-append --cov=pssh tests/miko
41+
pytest --cov-append --cov=pssh tests/test_output.py tests/test_utils.py tests/test_host_config.py
3542
pytest --reruns 10 --cov-append --cov=pssh tests/native/test_tunnel.py tests/native/test_agent.py
3643
pytest --reruns 5 --cov-append --cov=pssh tests/native/test_*_client.py
3744
pytest --reruns 5 --cov-append --cov=pssh tests/ssh
38-
flake8 pssh
45+
name: Integration tests
46+
- run:
47+
command: |
3948
cd doc; make html; cd ..
40-
# Test building from source distribution
49+
name: make docs
50+
- run:
51+
command: |
4152
python setup.py sdist
4253
cd dist; pip install *; cd ..
43-
python setup.py check --restructuredtext
44-
name: Test
54+
name: Source dist install
4555
- run:
4656
command: codecov
4757
name: Coverage
@@ -71,7 +81,7 @@ jobs:
7181
- run:
7282
name: Upload Wheel
7383
command: |
74-
twine upload --skip-existing -u $PYPI_U -p $PYPI_P wheels/*
84+
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
7585
7686
manylinux:
7787
machine:

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ services:
1111
- docker
1212
python:
1313
- 2.7
14-
- 3.6
15-
- 3.7
16-
- 3.8
1714
addons:
1815
apt:
1916
packages:
@@ -28,8 +25,7 @@ install:
2825
script:
2926
# For testing SSH agent related functionality
3027
- eval `ssh-agent -s`
31-
- pytest --cov-append --cov=pssh tests/test_imports.py tests/test_output.py tests/test_utils.py tests/test_host_config.py
32-
- pytest --reruns 5 --cov-append --cov=pssh tests/miko
28+
- pytest --cov-append --cov=pssh tests/test_output.py tests/test_utils.py tests/test_host_config.py
3329
- pytest --reruns 10 --cov-append --cov=pssh tests/native/test_tunnel.py tests/native/test_agent.py
3430
- pytest --reruns 5 --cov-append --cov=pssh tests/native/test_*_client.py
3531
- pytest --reruns 5 --cov-append --cov=pssh tests/ssh

Changelog.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
Change Log
22
============
33

4+
2.0.0
5+
+++++
6+
7+
Changes
8+
--------
9+
10+
See `Upgrading to API 2.0 <upgrade-link>`_ for examples of code that will need updating.
11+
12+
* Removed paramiko clients and dependency.
13+
* ``ParallelSSHClient.run_command`` now always returns a list of ``HostOutput`` - ``return_list`` argument is a no-op and may be removed.
14+
* ``ParallelSSHClient.get_last_output`` now always returns a list of ``HostOutput``.
15+
* ``SSHClient.run_command`` now returns ``HostOutput``.
16+
* Removed deprecated since `1.0.0` ``HostOutput`` dictionary attributes.
17+
* Removed deprecated since `1.0.0` imports and modules.
18+
* Removed paramiko based ``load_private_key`` and ``read_openssh_config`` functions from ``pssh.utils``.
19+
* Removed paramiko based ``pssh.tunnel``.
20+
* Removed paramiko based ``pssh.agent``.
21+
* Removed deprecated ``ParallelSSHClient.get_output`` function.
22+
* Removed deprecated ``ParallelSSHClient.get_exit_code`` and ``get_exit_codes`` functions.
23+
* Removed deprecated ``ParallelSSHClient`` ``host_config`` dictionary implementation - now list of ``HostConfig``.
24+
* Removed ``HostOutput.cmd`` attribute.
25+
* Removed ``ParallelSSHClient.host_clients`` attribute.
26+
27+
28+
Fixes
29+
-----
30+
31+
* Removed now unnecessary locking around SSHClient initialisation so it can be parallelised - #219.
32+
33+
434
1.13.0
535
++++++
636

0 commit comments

Comments
 (0)