From 67f26434cbe347c85ad76210b1cafe263fb4432c Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 3 Oct 2018 00:02:42 +0100 Subject: [PATCH 1/3] tests: Run tests on CPython 3.5 and 3.6 with Tox Python 3.0 to 3.4 are excluded because no version of Ansible supports them. Due to their setup.py declarations pip refuses to install Ansible on these versions of Python. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index ae761121..6bf8bb53 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,8 @@ envlist = py26, py27, + py35, + py36, [testenv] deps = From b9112a9cbb10da3200d07dcc5acc16b2a01b4af9 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 3 Oct 2018 00:06:53 +0100 Subject: [PATCH 2/3] ssh: Fix password authentication with Python 3.x & OpenSSH 7.5+ Since PERMDENIED_PROMPT is a byte string the interpolation was resulting in: b"user@host: b'permission denied'". Needless to say this didn't match. --- mitogen/ssh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mitogen/ssh.py b/mitogen/ssh.py index f8255865..ee97425b 100644 --- a/mitogen/ssh.py +++ b/mitogen/ssh.py @@ -291,8 +291,8 @@ class Stream(mitogen.parent.Stream): raise HostKeyError(self.hostkey_failed_msg) elif buf.lower().startswith(( PERMDENIED_PROMPT, - b("%s@%s: %s" % (self.username, self.hostname, - PERMDENIED_PROMPT)), + b("%s@%s: " % (self.username, self.hostname)) + + PERMDENIED_PROMPT, )): # issue #271: work around conflict with user shell reporting # 'permission denied' e.g. during chdir($HOME) by only matching From 6da31c9deef1dbb001ebabc0c13377b0f44e7e7c Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Wed, 3 Oct 2018 00:10:41 +0100 Subject: [PATCH 3/3] docs: Remove unneeded backslash escapes Python 3.x was emitting a DeprecationWarning. AFAICT there has been no impact on the HTML rendering. --- mitogen/core.py | 2 +- mitogen/parent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mitogen/core.py b/mitogen/core.py index d829d624..9aa95973 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -374,7 +374,7 @@ def io_op(func, *args): :returns: Tuple of `(return_value, disconnected)`, where `return_value` is the - return value of `func(\*args)`, and `disconnected` is :data:`True` if + return value of `func(*args)`, and `disconnected` is :data:`True` if disconnection was detected, otherwise :data:`False`. """ while True: diff --git a/mitogen/parent.py b/mitogen/parent.py index fe5e6889..c0d2d294 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -1256,7 +1256,7 @@ class CallChain(object): def call_async(self, fn, *args, **kwargs): """ - Arrange for `fn(\*args, \**kwargs)` to be invoked on the context's main + Arrange for `fn(*args, **kwargs)` to be invoked on the context's main thread. :param fn: