parallel-ssh 2.15.0__tar.gz → 2.16.0__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.
Files changed (34) hide show
  1. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/PKG-INFO +1 -1
  2. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/parallel_ssh.egg-info/PKG-INFO +1 -1
  3. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/_version.py +3 -3
  4. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/base/single.py +6 -4
  5. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/output.py +17 -2
  6. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/COPYING +0 -0
  7. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/COPYING.LESSER +0 -0
  8. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/LICENSE +0 -0
  9. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/MANIFEST.in +0 -0
  10. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/README.rst +0 -0
  11. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/parallel_ssh.egg-info/SOURCES.txt +0 -0
  12. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/parallel_ssh.egg-info/dependency_links.txt +0 -0
  13. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/parallel_ssh.egg-info/requires.txt +0 -0
  14. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/parallel_ssh.egg-info/top_level.txt +0 -0
  15. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/__init__.py +0 -0
  16. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/__init__.py +0 -0
  17. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/base/__init__.py +0 -0
  18. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/base/parallel.py +0 -0
  19. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/common.py +0 -0
  20. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/native/__init__.py +0 -0
  21. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/native/parallel.py +0 -0
  22. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/native/single.py +0 -0
  23. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/native/tunnel.py +0 -0
  24. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/reader.py +0 -0
  25. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/ssh/__init__.py +0 -0
  26. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/ssh/parallel.py +0 -0
  27. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/clients/ssh/single.py +0 -0
  28. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/config.py +0 -0
  29. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/constants.py +0 -0
  30. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/exceptions.py +0 -0
  31. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/pssh/utils.py +0 -0
  32. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/setup.cfg +0 -0
  33. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/setup.py +0 -0
  34. {parallel_ssh-2.15.0 → parallel_ssh-2.16.0}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: parallel-ssh
3
- Version: 2.15.0
3
+ Version: 2.16.0
4
4
  Summary: Asynchronous parallel SSH library
5
5
  Home-page: https://github.com/ParallelSSH/parallel-ssh
6
6
  Author: Panos Kittenis
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: parallel-ssh
3
- Version: 2.15.0
3
+ Version: 2.16.0
4
4
  Summary: Asynchronous parallel SSH library
5
5
  Home-page: https://github.com/ParallelSSH/parallel-ssh
6
6
  Author: Panos Kittenis
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-10-12T14:04:45+0100",
11
+ "date": "2025-10-12T16:35:40+0100",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "8fa5a91bbfb7cd87148a566cc3772006ec2ba989",
15
- "version": "2.15.0"
14
+ "full-revisionid": "38d14ee6bb797eacc20308348ca1c827238af9b4",
15
+ "version": "2.16.0"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -158,7 +158,9 @@ class InteractiveShell(object):
158
158
  self._client._shell(self._chan)
159
159
  self._encoding = encoding
160
160
  self.output = self._client._make_host_output(
161
- self._chan, encoding=encoding, read_timeout=read_timeout)
161
+ self._chan, encoding=encoding, read_timeout=read_timeout,
162
+ fully_qualified_command=None,
163
+ )
162
164
 
163
165
  @property
164
166
  def stdout(self):
@@ -471,7 +473,7 @@ class BaseSSHClient(PollMixIn):
471
473
  def open_session(self):
472
474
  raise NotImplementedError
473
475
 
474
- def _make_host_output(self, channel, encoding, read_timeout):
476
+ def _make_host_output(self, channel, encoding, read_timeout, fully_qualified_command=None):
475
477
  _stdout_buffer = ConcurrentRWBuffer()
476
478
  _stderr_buffer = ConcurrentRWBuffer()
477
479
  _stdout_reader, _stderr_reader = self._make_output_readers(
@@ -484,7 +486,7 @@ class BaseSSHClient(PollMixIn):
484
486
  host_out = HostOutput(
485
487
  host=self.host, alias=self.alias, channel=channel, stdin=Stdin(channel, self),
486
488
  client=self, encoding=encoding, read_timeout=read_timeout,
487
- buffers=_buffers,
489
+ buffers=_buffers, fully_qualified_command=fully_qualified_command,
488
490
  )
489
491
  return host_out
490
492
 
@@ -635,7 +637,7 @@ class BaseSSHClient(PollMixIn):
635
637
  with GTimeout(seconds=self.timeout):
636
638
  channel = self._execute(_command, use_pty=use_pty)
637
639
  _timeout = read_timeout if read_timeout else timeout
638
- host_out = self._make_host_output(channel, encoding, _timeout)
640
+ host_out = self._make_host_output(channel, encoding, _timeout, fully_qualified_command=_command)
639
641
  return host_out
640
642
 
641
643
  def _make_sftp(self):
@@ -57,11 +57,14 @@ class HostOutput(object):
57
57
  __slots__ = ('host', 'channel', 'stdin',
58
58
  'client', 'alias', 'exception',
59
59
  'encoding', 'read_timeout', 'buffers',
60
+ 'fully_qualified_command',
60
61
  )
61
62
 
62
63
  def __init__(self, host, channel, stdin,
63
64
  client, alias=None, exception=None, encoding='utf-8', read_timeout=None,
64
- buffers=None):
65
+ buffers=None,
66
+ fully_qualified_command=None,
67
+ ):
65
68
  """
66
69
  :param host: Host name output is for
67
70
  :type host: str
@@ -79,6 +82,15 @@ class HostOutput(object):
79
82
  :type read_timeout: float
80
83
  :param buffers: Host buffer data.
81
84
  :type buffers: :py:class:`HostOutputBuffers`
85
+ :param fully_qualified_command: The fully qualified command after any per-host argument substitution and
86
+ including command string substitution required for executing via sudo or user-switching via 'su -c', using
87
+ any specified shell on `run_command` *and* conversion to bytes via provided encoding.
88
+ The fully_qualified_command is therefor a bytes object that can be saved or otherwise used anywhere bytes can
89
+ be used without conversion.
90
+ Use `fully_qualified_command.decode(encoding)` to decode with the encoding used for the equivalent host
91
+ output object.
92
+ Always `None` on `HostOutput` from interactive shells.
93
+ :type fully_qualified_command: bytes
82
94
  """
83
95
  self.host = host
84
96
  self.channel = channel
@@ -89,6 +101,7 @@ class HostOutput(object):
89
101
  self.encoding = encoding
90
102
  self.read_timeout = read_timeout
91
103
  self.buffers = buffers
104
+ self.fully_qualified_command = fully_qualified_command
92
105
 
93
106
  @property
94
107
  def stdout(self):
@@ -125,10 +138,12 @@ class HostOutput(object):
125
138
  "\tchannel={channel}{linesep}" \
126
139
  "\texception={exception}{linesep}" \
127
140
  "\tencoding={encoding}{linesep}" \
128
- "\tread_timeout={read_timeout}".format(
141
+ "\tread_timeout={read_timeout}{linesep}" \
142
+ "\tfully_qualified_command={fully_qualified_command}".format(
129
143
  host=self.host, alias=self.alias, channel=self.channel,
130
144
  exception=self.exception, linesep=linesep,
131
145
  exit_code=self.exit_code, encoding=self.encoding, read_timeout=self.read_timeout,
146
+ fully_qualified_command=self.fully_qualified_command,
132
147
  )
133
148
 
134
149
  def __str__(self):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes