[Python-modules-commits] [python-asyncssh] 01/06: Import python-asyncssh_1.7.2.orig.tar.gz
Vincent Bernat
bernat at moszumanska.debian.org
Tue Nov 1 19:00:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
bernat pushed a commit to branch master
in repository python-asyncssh.
commit c35de600ebdf2dc6e83aa2849678cb4b18e3a2b4
Author: Vincent Bernat <bernat at debian.org>
Date: Tue Nov 1 19:55:34 2016 +0100
Import python-asyncssh_1.7.2.orig.tar.gz
---
asyncssh/agent.py | 16 ++++++++--------
asyncssh/connection.py | 2 +-
asyncssh/public_key.py | 25 -------------------------
asyncssh/sftp.py | 2 ++
asyncssh/version.py | 2 +-
docs/api.rst | 2 +-
docs/changes.rst | 15 +++++++++++++--
tests/test_sftp.py | 7 +++++--
8 files changed, 31 insertions(+), 40 deletions(-)
diff --git a/asyncssh/agent.py b/asyncssh/agent.py
index 2ee353c..570af31 100644
--- a/asyncssh/agent.py
+++ b/asyncssh/agent.py
@@ -265,7 +265,7 @@ class SSHAgentClient:
:type keylist: *see* :ref:`SpecifyingPrivateKeys`
:type lifetime: `int` or ``None``
- :raises: ::exc::`ValueError` if the keys cannot be added
+ :raises: :exc:`ValueError` if the keys cannot be added
"""
@@ -312,7 +312,7 @@ class SSHAgentClient:
:type pin: `str` or ``None``
:type lifetime: `int` or ``None``
- :raises: ::exc::`ValueError` if the keys cannot be added
+ :raises: :exc:`ValueError` if the keys cannot be added
"""
@@ -339,7 +339,7 @@ class SSHAgentClient:
The list of keys to remove.
:type keylist: list of :class:`SSHKeyPair`
- :raises: ::exc::`ValueError` if any keys are not found
+ :raises: :exc:`ValueError` if any keys are not found
"""
@@ -365,7 +365,7 @@ class SSHAgentClient:
The PIN to use to unlock the smart card
:type pin: `str` or ``None``
- :raises: ::exc::`ValueError` if the keys are not found
+ :raises: :exc:`ValueError` if the keys are not found
"""
@@ -384,7 +384,7 @@ class SSHAgentClient:
def remove_all(self):
"""Remove all keys stored in the agent
- :raises: ::exc::`ValueError` if the keys can't be removed
+ :raises: :exc:`ValueError` if the keys can't be removed
"""
@@ -405,7 +405,7 @@ class SSHAgentClient:
:param str passphrase:
The passphrase required to later unlock the agent
- :raises: ::exc::`ValueError` if the agent can't be locked
+ :raises: :exc:`ValueError` if the agent can't be locked
"""
@@ -426,7 +426,7 @@ class SSHAgentClient:
:param str passphrase:
The passphrase to use to unlock the agent
- :raises: ::exc::`ValueError` if the agent can't be unlocked
+ :raises: :exc:`ValueError` if the agent can't be unlocked
"""
@@ -474,7 +474,7 @@ class SSHAgentClient:
"""Close the SSH agent connection
This method closes the connection to the ssh-agent. Any
- attempts to use this :class:``SSHAgentClient`` or the key
+ attempts to use this :class:`SSHAgentClient` or the key
pairs it previously returned will result in an error.
"""
diff --git a/asyncssh/connection.py b/asyncssh/connection.py
index c3f2a01..a9a281e 100644
--- a/asyncssh/connection.py
+++ b/asyncssh/connection.py
@@ -2970,7 +2970,7 @@ class SSHServerConnection(SSHConnection):
:class:`SSHServer` objects wishing to create UNIX domain socket
connection objects with non-default channel properties can call
:meth:`create_unix_channel` from the :meth:`unix_connection_requested()
- <SSHServer.unix_connection_requested>' method and return a tuple of
+ <SSHServer.unix_connection_requested>` method and return a tuple of
the :class:`SSHUNIXChannel` object returned from that and either
an :class:`SSHUNIXSession` object or a coroutine which returns an
:class:`SSHUNIXSession`.
diff --git a/asyncssh/public_key.py b/asyncssh/public_key.py
index fa5ed98..2de1b3e 100644
--- a/asyncssh/public_key.py
+++ b/asyncssh/public_key.py
@@ -1074,31 +1074,6 @@ class SSHKeyPair:
algorithm and public key or certificate information needed to
identify what key was used for signing.
- .. attribute:: algorithm
-
- The public key or certificate algorithm associated with this
- key pair.
-
- .. attribute:: sig_algorithm
-
- The public key signature algorithm currently associated with
- this key pair.
-
- .. attribute:: host_key_algorithms
-
- The list of host key algorithms this key pair is capable of
- supporting.
-
- .. attribute:: sig_algorithms
-
- The list of signature algorithms this key pair is capable of
- supporting.
-
- .. attribute:: public_data
-
- The public key or certificate associated with this key pair
- in OpenSSH binary format.
-
"""
_key_type = 'unknown'
diff --git a/asyncssh/sftp.py b/asyncssh/sftp.py
index 04c9527..cf92c4e 100644
--- a/asyncssh/sftp.py
+++ b/asyncssh/sftp.py
@@ -1617,6 +1617,8 @@ class SFTPClient:
dstpath, srcattrs.size)
if preserve:
+ srcattrs = yield from srcfs.stat(srcpath)
+
yield from dstfs.setstat(
dstpath, SFTPAttrs(permissions=srcattrs.permissions,
atime=srcattrs.atime,
diff --git a/asyncssh/version.py b/asyncssh/version.py
index 39d4851..dcb77b0 100644
--- a/asyncssh/version.py
+++ b/asyncssh/version.py
@@ -18,4 +18,4 @@ __author_email__ = 'ronf at timeheart.net'
__url__ = 'http://asyncssh.timeheart.net'
-__version__ = '1.7.1'
+__version__ = '1.7.2'
diff --git a/docs/api.rst b/docs/api.rst
index 4a643b7..b71ef0c 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -59,7 +59,7 @@ and :class:`SSHWriter` objects in a callback when new connections are opened.
SSH client sessions can also be opened by calling :meth:`create_process()
<SSHClientConnection.create_process>`. This returns a :class:`SSHClientProcess`
object which has members ``stdin``, ``stdout``, and ``stderr`` which are
-:class:``SSHReader`` and :class:``SSHWriter`` objects. This API also makes
+:class:`SSHReader` and :class:`SSHWriter` objects. This API also makes
it very easy to redirect input and output from the remote process to local
files, pipes, sockets, or other :class:`SSHReader` and :class:`SSHWriter`
objects. In cases where you just want to run a remote process to completion
diff --git a/docs/changes.rst b/docs/changes.rst
index 6a6c9c2..fffa15f 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -3,6 +3,17 @@
Change Log
==========
+Release 1.7.2 (28 Oct 2016)
+---------------------------
+
+* Fixed an issue with preserving file access times in SFTP, and update
+ the unit tests to more accurate detect this kind of failure.
+
+* Fixed some markup errors in the documentation.
+
+* Fixed a small error in the change log for release 1.7.0 regarding
+ the newly added Diffie Hellman key exchange algorithms.
+
Release 1.7.1 (7 Oct 2016)
--------------------------
@@ -12,8 +23,8 @@ Release 1.7.1 (7 Oct 2016)
Release 1.7.0 (7 Oct 2016)
--------------------------
-* Added support for group 14 and group 16 Diffie Hellman key exchange
- algorithms.
+* Added support for group 14, 16, and 18 Diffie Hellman key exchange
+ algorithms which use SHA-256 and SHA-512.
* Added support for using SHA-256 and SHA-512 based signature algorithms
for RSA keys and support for OpenSSH extension negotiation to advertise
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index b2c75f1..ff0fb96 100644
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -341,7 +341,7 @@ class _AsyncSFTPServer(SFTPServer):
class _CheckSFTP(ServerTestCase):
"""Utility functions for AsyncSSH SFTP unit tests"""
- def _create_file(self, name, data=(), mode=None):
+ def _create_file(self, name, data=(), mode=None, utime=None):
"""Create a test file"""
if data is ():
@@ -353,6 +353,9 @@ class _CheckSFTP(ServerTestCase):
if mode is not None:
os.chmod(name, mode)
+ if utime is not None:
+ os.utime(name, utime)
+
def _check_attr(self, name1, name2, follow_symlinks=False):
"""Check if attributes on two files are equal"""
@@ -424,7 +427,7 @@ class _TestSFTP(_CheckSFTP):
for method in ('get', 'put', 'copy'):
with self.subTest(method=method):
try:
- self._create_file('src', mode=0o400)
+ self._create_file('src', mode=0o400, utime=(1, 2))
yield from getattr(sftp, method)('src', 'dst',
preserve=True)
self._check_file('src', 'dst', preserve=True)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-asyncssh.git
More information about the Python-modules-commits
mailing list