parallel-ssh 2.12.0__tar.gz → 2.13.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- parallel_ssh-2.13.0rc1/MANIFEST.in +14 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/PKG-INFO +9 -12
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/README.rst +3 -6
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/parallel_ssh.egg-info/PKG-INFO +9 -12
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/parallel_ssh.egg-info/requires.txt +1 -1
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/__init__.py +3 -3
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/_version.py +4 -4
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/__init__.py +2 -3
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/base/parallel.py +2 -3
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/base/single.py +2 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/native/single.py +7 -2
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/native/tunnel.py +1 -3
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/reader.py +3 -1
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/config.py +1 -1
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/output.py +1 -1
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/setup.cfg +1 -1
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/setup.py +3 -3
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/versioneer.py +776 -346
- parallel-ssh-2.12.0/MANIFEST.in +0 -6
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/COPYING +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/COPYING.LESSER +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/LICENSE +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/parallel_ssh.egg-info/SOURCES.txt +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/parallel_ssh.egg-info/dependency_links.txt +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/parallel_ssh.egg-info/top_level.txt +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/base/__init__.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/common.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/native/__init__.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/native/parallel.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/ssh/__init__.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/ssh/parallel.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/clients/ssh/single.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/constants.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/exceptions.py +0 -0
- {parallel-ssh-2.12.0 → parallel_ssh-2.13.0rc1}/pssh/utils.py +0 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
include versioneer.py
|
2
|
+
include pssh/_version.py
|
3
|
+
include LICENSE
|
4
|
+
include COPYING
|
5
|
+
include COPYING.LESSER
|
6
|
+
exclude .codecov.yml
|
7
|
+
exclude .coveragerc
|
8
|
+
exclude .git*
|
9
|
+
exclude .pre-commit*
|
10
|
+
exclude .readthedocs.yml
|
11
|
+
recursive-exclude tests *
|
12
|
+
recursive-exclude ci *
|
13
|
+
recursive-exclude .circleci *
|
14
|
+
recursive-exclude .github *
|
@@ -1,23 +1,22 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parallel-ssh
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.13.0rc1
|
4
4
|
Summary: Asynchronous parallel SSH library
|
5
5
|
Home-page: https://github.com/ParallelSSH/parallel-ssh
|
6
6
|
Author: Panos Kittenis
|
7
7
|
Author-email: zuboci@yandex.com
|
8
8
|
License: LGPLv2.1
|
9
|
-
Platform: UNKNOWN
|
10
9
|
Classifier: Development Status :: 5 - Production/Stable
|
11
10
|
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
|
12
11
|
Classifier: Intended Audience :: Developers
|
13
12
|
Classifier: Operating System :: OS Independent
|
14
13
|
Classifier: Programming Language :: Python
|
15
14
|
Classifier: Programming Language :: Python :: 3
|
16
|
-
Classifier: Programming Language :: Python :: 3.6
|
17
|
-
Classifier: Programming Language :: Python :: 3.7
|
18
15
|
Classifier: Programming Language :: Python :: 3.8
|
19
16
|
Classifier: Programming Language :: Python :: 3.9
|
20
17
|
Classifier: Programming Language :: Python :: 3.10
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
21
20
|
Classifier: Topic :: System :: Networking
|
22
21
|
Classifier: Topic :: Software Development :: Libraries
|
23
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
@@ -28,6 +27,9 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
28
27
|
License-File: LICENSE
|
29
28
|
License-File: COPYING
|
30
29
|
License-File: COPYING.LESSER
|
30
|
+
Requires-Dist: gevent
|
31
|
+
Requires-Dist: ssh2-python
|
32
|
+
Requires-Dist: ssh-python
|
31
33
|
|
32
34
|
============
|
33
35
|
parallel-ssh
|
@@ -56,6 +58,7 @@ Native code based clients with extremely high performance, making use of C libra
|
|
56
58
|
:alt: Latest documentation
|
57
59
|
|
58
60
|
.. _`read the docs`: https://parallel-ssh.readthedocs.org/en/latest/
|
61
|
+
.. _`SFTP and SCP documentation`: https://parallel-ssh.readthedocs.io/en/latest/advanced.html#sftp-scp
|
59
62
|
|
60
63
|
************
|
61
64
|
Installation
|
@@ -270,7 +273,7 @@ To copy a local file to remote hosts in parallel with SCP:
|
|
270
273
|
cmds = client.scp_send('../test', 'test_dir/test')
|
271
274
|
joinall(cmds, raise_error=True)
|
272
275
|
|
273
|
-
See `SFTP and SCP documentation
|
276
|
+
See `SFTP and SCP documentation`_ for more examples.
|
274
277
|
|
275
278
|
|
276
279
|
*****
|
@@ -306,10 +309,4 @@ In addition, per-host configurable file name functionality is provided for both
|
|
306
309
|
|
307
310
|
Directory recursion is supported in both cases via the ``recurse`` parameter - defaults to off.
|
308
311
|
|
309
|
-
See `SFTP and SCP documentation
|
310
|
-
|
311
|
-
|
312
|
-
.. image:: https://ga-beacon.appspot.com/UA-9132694-7/parallel-ssh/README.rst?pixel
|
313
|
-
:target: https://github.com/igrigorik/ga-beacon
|
314
|
-
|
315
|
-
|
312
|
+
See `SFTP and SCP documentation`_ for more examples.
|
@@ -25,6 +25,7 @@ Native code based clients with extremely high performance, making use of C libra
|
|
25
25
|
:alt: Latest documentation
|
26
26
|
|
27
27
|
.. _`read the docs`: https://parallel-ssh.readthedocs.org/en/latest/
|
28
|
+
.. _`SFTP and SCP documentation`: https://parallel-ssh.readthedocs.io/en/latest/advanced.html#sftp-scp
|
28
29
|
|
29
30
|
************
|
30
31
|
Installation
|
@@ -239,7 +240,7 @@ To copy a local file to remote hosts in parallel with SCP:
|
|
239
240
|
cmds = client.scp_send('../test', 'test_dir/test')
|
240
241
|
joinall(cmds, raise_error=True)
|
241
242
|
|
242
|
-
See `SFTP and SCP documentation
|
243
|
+
See `SFTP and SCP documentation`_ for more examples.
|
243
244
|
|
244
245
|
|
245
246
|
*****
|
@@ -275,8 +276,4 @@ In addition, per-host configurable file name functionality is provided for both
|
|
275
276
|
|
276
277
|
Directory recursion is supported in both cases via the ``recurse`` parameter - defaults to off.
|
277
278
|
|
278
|
-
See `SFTP and SCP documentation
|
279
|
-
|
280
|
-
|
281
|
-
.. image:: https://ga-beacon.appspot.com/UA-9132694-7/parallel-ssh/README.rst?pixel
|
282
|
-
:target: https://github.com/igrigorik/ga-beacon
|
279
|
+
See `SFTP and SCP documentation`_ for more examples.
|
@@ -1,23 +1,22 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parallel-ssh
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.13.0rc1
|
4
4
|
Summary: Asynchronous parallel SSH library
|
5
5
|
Home-page: https://github.com/ParallelSSH/parallel-ssh
|
6
6
|
Author: Panos Kittenis
|
7
7
|
Author-email: zuboci@yandex.com
|
8
8
|
License: LGPLv2.1
|
9
|
-
Platform: UNKNOWN
|
10
9
|
Classifier: Development Status :: 5 - Production/Stable
|
11
10
|
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
|
12
11
|
Classifier: Intended Audience :: Developers
|
13
12
|
Classifier: Operating System :: OS Independent
|
14
13
|
Classifier: Programming Language :: Python
|
15
14
|
Classifier: Programming Language :: Python :: 3
|
16
|
-
Classifier: Programming Language :: Python :: 3.6
|
17
|
-
Classifier: Programming Language :: Python :: 3.7
|
18
15
|
Classifier: Programming Language :: Python :: 3.8
|
19
16
|
Classifier: Programming Language :: Python :: 3.9
|
20
17
|
Classifier: Programming Language :: Python :: 3.10
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
21
20
|
Classifier: Topic :: System :: Networking
|
22
21
|
Classifier: Topic :: Software Development :: Libraries
|
23
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
@@ -28,6 +27,9 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
28
27
|
License-File: LICENSE
|
29
28
|
License-File: COPYING
|
30
29
|
License-File: COPYING.LESSER
|
30
|
+
Requires-Dist: gevent
|
31
|
+
Requires-Dist: ssh2-python
|
32
|
+
Requires-Dist: ssh-python
|
31
33
|
|
32
34
|
============
|
33
35
|
parallel-ssh
|
@@ -56,6 +58,7 @@ Native code based clients with extremely high performance, making use of C libra
|
|
56
58
|
:alt: Latest documentation
|
57
59
|
|
58
60
|
.. _`read the docs`: https://parallel-ssh.readthedocs.org/en/latest/
|
61
|
+
.. _`SFTP and SCP documentation`: https://parallel-ssh.readthedocs.io/en/latest/advanced.html#sftp-scp
|
59
62
|
|
60
63
|
************
|
61
64
|
Installation
|
@@ -270,7 +273,7 @@ To copy a local file to remote hosts in parallel with SCP:
|
|
270
273
|
cmds = client.scp_send('../test', 'test_dir/test')
|
271
274
|
joinall(cmds, raise_error=True)
|
272
275
|
|
273
|
-
See `SFTP and SCP documentation
|
276
|
+
See `SFTP and SCP documentation`_ for more examples.
|
274
277
|
|
275
278
|
|
276
279
|
*****
|
@@ -306,10 +309,4 @@ In addition, per-host configurable file name functionality is provided for both
|
|
306
309
|
|
307
310
|
Directory recursion is supported in both cases via the ``recurse`` parameter - defaults to off.
|
308
311
|
|
309
|
-
See `SFTP and SCP documentation
|
310
|
-
|
311
|
-
|
312
|
-
.. image:: https://ga-beacon.appspot.com/UA-9132694-7/parallel-ssh/README.rst?pixel
|
313
|
-
:target: https://github.com/igrigorik/ga-beacon
|
314
|
-
|
315
|
-
|
312
|
+
See `SFTP and SCP documentation`_ for more examples.
|
@@ -29,9 +29,9 @@ for class documentation.
|
|
29
29
|
|
30
30
|
|
31
31
|
from logging import getLogger, NullHandler
|
32
|
-
from .
|
33
|
-
__version__ = get_versions()['version']
|
34
|
-
del
|
32
|
+
from . import _version
|
33
|
+
__version__ = _version.get_versions()['version']
|
34
|
+
del _version
|
35
35
|
|
36
36
|
host_logger = getLogger('pssh.host_logger')
|
37
37
|
logger = getLogger('pssh')
|
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
# This file was generated by 'versioneer.py' (0.
|
2
|
+
# This file was generated by 'versioneer.py' (0.29) from
|
3
3
|
# revision-control system data, or from the parent directory name of an
|
4
4
|
# unpacked source archive. Distribution tarballs contain a pre-generated copy
|
5
5
|
# of this file.
|
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "
|
11
|
+
"date": "2025-01-13T03:04:42+0000",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "2.
|
14
|
+
"full-revisionid": "f1d46fcf86c331b21dc199f5129f59da3bc1284e",
|
15
|
+
"version": "2.13.0rc1"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# This file is part of parallel-ssh.
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2025 Panos Kittenis and contributors.
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -16,5 +16,4 @@
|
|
16
16
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
17
17
|
|
18
18
|
# flake8: noqa: F401
|
19
|
-
from .native
|
20
|
-
from .native.single import SSHClient
|
19
|
+
from .native import ParallelSSHClient, SSHClient
|
@@ -118,6 +118,7 @@ class BaseParallelSSHClient(object):
|
|
118
118
|
self.disconnect()
|
119
119
|
|
120
120
|
def disconnect(self):
|
121
|
+
"""Disconnect all clients."""
|
121
122
|
if not hasattr(self, '_host_clients'):
|
122
123
|
return
|
123
124
|
for s_client in self._host_clients.values():
|
@@ -126,7 +127,6 @@ class BaseParallelSSHClient(object):
|
|
126
127
|
except Exception as ex:
|
127
128
|
logger.debug("Client disconnect failed with %s", ex)
|
128
129
|
pass
|
129
|
-
del s_client
|
130
130
|
|
131
131
|
def _check_host_config(self):
|
132
132
|
if self.host_config is None:
|
@@ -266,7 +266,7 @@ class BaseParallelSSHClient(object):
|
|
266
266
|
:param cmds: Commands to get output for. Defaults to ``client.cmds``
|
267
267
|
:type cmds: list(:py:class:`gevent.Greenlet`)
|
268
268
|
|
269
|
-
:rtype:
|
269
|
+
:rtype: list(:py:class:`pssh.output.HostOutput`)
|
270
270
|
"""
|
271
271
|
cmds = self.cmds if cmds is None else cmds
|
272
272
|
if cmds is None:
|
@@ -290,7 +290,6 @@ class BaseParallelSSHClient(object):
|
|
290
290
|
gssapi_server_identity=self.gssapi_server_identity,
|
291
291
|
gssapi_client_identity=self.gssapi_client_identity,
|
292
292
|
gssapi_delegate_credentials=self.gssapi_delegate_credentials,
|
293
|
-
alias=None,
|
294
293
|
)
|
295
294
|
return config
|
296
295
|
config = self.host_config[host_i]
|
@@ -213,10 +213,12 @@ class SSHClient(BaseSSHClient):
|
|
213
213
|
sleep(self._eagain(self.session.keepalive_send))
|
214
214
|
|
215
215
|
def configure_keepalive(self):
|
216
|
+
"""Configures keepalive on the server for `self.keepalive_seconds`."""
|
216
217
|
self.session.keepalive_config(False, self.keepalive_seconds)
|
217
218
|
|
218
219
|
def _init_session(self, retries=1):
|
219
220
|
self.session = Session()
|
221
|
+
|
220
222
|
if self.timeout:
|
221
223
|
# libssh2 timeout is in ms
|
222
224
|
self.session.set_timeout(self.timeout * 1000)
|
@@ -266,7 +268,10 @@ class SSHClient(BaseSSHClient):
|
|
266
268
|
return chan
|
267
269
|
|
268
270
|
def open_session(self):
|
269
|
-
"""Open new channel from session
|
271
|
+
"""Open new channel from session.
|
272
|
+
|
273
|
+
:rtype: :py:class:`ssh2.channel.Channel`
|
274
|
+
"""
|
270
275
|
try:
|
271
276
|
chan = self._open_session()
|
272
277
|
except Exception as ex:
|
@@ -662,9 +667,9 @@ class SSHClient(BaseSSHClient):
|
|
662
667
|
elif remote_file.endswith('/'):
|
663
668
|
local_filename = local_file.rsplit('/')[-1]
|
664
669
|
remote_file += local_filename
|
665
|
-
self._scp_send(local_file, remote_file)
|
666
670
|
logger.info("SCP local file %s to remote destination %s:%s",
|
667
671
|
local_file, self.host, remote_file)
|
672
|
+
self._scp_send(local_file, remote_file)
|
668
673
|
|
669
674
|
def _scp_send(self, local_file, remote_file):
|
670
675
|
fileinfo = os.stat(local_file)
|
@@ -16,9 +16,8 @@
|
|
16
16
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
17
17
|
|
18
18
|
import logging
|
19
|
-
|
20
|
-
from threading import Thread, Event
|
21
19
|
from queue import Queue
|
20
|
+
from threading import Thread, Event
|
22
21
|
|
23
22
|
from gevent import spawn, joinall, get_hub, sleep
|
24
23
|
from gevent.server import StreamServer
|
@@ -26,7 +25,6 @@ from ssh2.error_codes import LIBSSH2_ERROR_EAGAIN
|
|
26
25
|
|
27
26
|
from ...constants import DEFAULT_RETRIES
|
28
27
|
|
29
|
-
|
30
28
|
logger = logging.getLogger(__name__)
|
31
29
|
|
32
30
|
|
@@ -34,11 +34,13 @@ class _Eof(Event):
|
|
34
34
|
class ConcurrentRWBuffer(object):
|
35
35
|
"""Concurrent reader/writer of bytes for use from multiple greenlets.
|
36
36
|
|
37
|
-
Supports both concurrent reading and writing.
|
37
|
+
Supports both concurrent reading and writing and combinations there of.
|
38
38
|
|
39
39
|
Iterate on buffer object to read data, yielding event loop if no data exists
|
40
40
|
until self.eof has been set.
|
41
41
|
|
42
|
+
Check if end-of-file without blocking with ``ConcurrentRWBuffer.eof.is_set()``.
|
43
|
+
|
42
44
|
Writers should call ``ConcurrentRWBuffer.eof.set()`` when finished writing data via ``write``.
|
43
45
|
|
44
46
|
Readers can use ``read()`` to get any available data or ``None``.
|
@@ -59,7 +59,7 @@ class HostConfig(object):
|
|
59
59
|
:param allow_agent: Enable/disable SSH agent authentication.
|
60
60
|
:type allow_agent: bool
|
61
61
|
:param alias: Use an alias for this host.
|
62
|
-
:type alias: str
|
62
|
+
:type alias: str
|
63
63
|
:param num_retries: Number of retry attempts before giving up on connection
|
64
64
|
and SSH operations.
|
65
65
|
:type num_retries: int
|
@@ -70,7 +70,7 @@ class HostOutput(object):
|
|
70
70
|
:param stdin: Standard input buffer
|
71
71
|
:type stdin: :py:func:`file`-like object
|
72
72
|
:param client: `SSHClient` output is coming from.
|
73
|
-
:type client: :py:class:`pssh.clients.base.single.BaseSSHClient`
|
73
|
+
:type client: :py:class:`pssh.clients.base.single.BaseSSHClient` or `None`.
|
74
74
|
:param alias: Host alias.
|
75
75
|
:type alias: str
|
76
76
|
:param exception: Exception from host if any
|
@@ -35,7 +35,7 @@ setup(name='parallel-ssh',
|
|
35
35
|
'*.tests', '*.tests.*')
|
36
36
|
),
|
37
37
|
install_requires=[
|
38
|
-
'gevent
|
38
|
+
'gevent', 'ssh2-python', 'ssh-python'],
|
39
39
|
classifiers=[
|
40
40
|
'Development Status :: 5 - Production/Stable',
|
41
41
|
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
|
@@ -43,11 +43,11 @@ setup(name='parallel-ssh',
|
|
43
43
|
'Operating System :: OS Independent',
|
44
44
|
'Programming Language :: Python',
|
45
45
|
'Programming Language :: Python :: 3',
|
46
|
-
'Programming Language :: Python :: 3.6',
|
47
|
-
'Programming Language :: Python :: 3.7',
|
48
46
|
'Programming Language :: Python :: 3.8',
|
49
47
|
'Programming Language :: Python :: 3.9',
|
50
48
|
'Programming Language :: Python :: 3.10',
|
49
|
+
'Programming Language :: Python :: 3.11',
|
50
|
+
'Programming Language :: Python :: 3.12',
|
51
51
|
'Topic :: System :: Networking',
|
52
52
|
'Topic :: Software Development :: Libraries',
|
53
53
|
'Topic :: Software Development :: Libraries :: Python Modules',
|