!7 Upgrade version to 2.7.2

From: @zhaorenhai
Reviewed-by: 
Signed-off-by:
This commit is contained in:
openeuler-ci-bot 2021-02-09 14:06:21 +08:00 committed by Gitee
commit 9d840ebf78
5 changed files with 33 additions and 34 deletions

View File

@ -1,17 +0,0 @@
diff -ru paramiko-2.3.1.orig/paramiko/ssh_gss.py paramiko-2.3.1/paramiko/ssh_gss.py
--- paramiko-2.3.1.orig/paramiko/ssh_gss.py 2017-09-22 21:15:16.000000000 +0100
+++ paramiko-2.3.1/paramiko/ssh_gss.py 2017-10-29 21:16:08.071429184 +0100
@@ -51,7 +51,12 @@
try:
import gssapi
- GSS_EXCEPTIONS = (gssapi.GSSException,)
+ try:
+ GSS_EXCEPTIONS = (gssapi.GSSException,)
+ except AttributeError:
+ # Unsupported GSS API
+ GSS_AUTH_AVAILABLE = False
+ _API = None
except (ImportError, OSError):
try:
import pywintypes

Binary file not shown.

View File

@ -1,5 +1,14 @@
From 953d9a1f1055de97e35c7060fcebc7283eff9e29 Mon Sep 17 00:00:00 2001
From: zhaorenhai <zhaorenhai@hotmail.com>
Date: Fri, 29 Jan 2021 06:48:10 +0000
Subject: [PATCH] drop pytest-relaxed
---
tests/test_client.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/test_client.py b/tests/test_client.py diff --git a/tests/test_client.py b/tests/test_client.py
index 7163fdc..947e4b3 100644 index 60ad310c..2d665cdd 100644
--- a/tests/test_client.py --- a/tests/test_client.py
+++ b/tests/test_client.py +++ b/tests/test_client.py
@@ -33,7 +33,7 @@ import warnings @@ -33,7 +33,7 @@ import warnings
@ -8,35 +17,37 @@ index 7163fdc..947e4b3 100644
-from pytest_relaxed import raises -from pytest_relaxed import raises
+from pytest import raises +from pytest import raises
from mock import patch, Mock
import paramiko import paramiko
from paramiko.pkey import PublicBlob @@ -684,10 +684,10 @@ class PasswordPassphraseTests(ClientTest):
@@ -656,10 +656,10 @@ class PasswordPassphraseTests(ClientTest):
# TODO: more granular exception pending #387; should be signaling "no auth # TODO: more granular exception pending #387; should be signaling "no auth
# methods available" because no key and no password # methods available" because no key and no password
- @raises(SSHException) - @raises(SSHException)
def test_passphrase_kwarg_not_used_for_password_auth(self): def test_passphrase_kwarg_not_used_for_password_auth(self):
- # Using the "right" password in the "wrong" field shouldn't work. - # Using the "right" password in the "wrong" field shouldn't work.
- self._test_connection(passphrase='pygmalion') - self._test_connection(passphrase="pygmalion")
+ with raises(SSHException): + with raises(SSHException):
+ # Using the "right" password in the "wrong" field shouldn't work. + # Using the "right" password in the "wrong" field shouldn't work.
+ self._test_connection(passphrase='pygmalion') + self._test_connection(passphrase='pygmalion')
def test_passphrase_kwarg_used_for_key_passphrase(self): def test_passphrase_kwarg_used_for_key_passphrase(self):
# Straightforward again, with new passphrase kwarg. # Straightforward again, with new passphrase kwarg.
@@ -675,12 +675,12 @@ class PasswordPassphraseTests(ClientTest): @@ -705,14 +705,14 @@ class PasswordPassphraseTests(ClientTest):
password='television', password="television",
) )
- @raises(AuthenticationException) # TODO: more granular - @raises(AuthenticationException) # TODO: more granular
def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(self): # noqa def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given( # noqa
self
):
- # Sanity: if we're given both fields, the password field is NOT used as - # Sanity: if we're given both fields, the password field is NOT used as
- # a passphrase. - # a passphrase.
- self._test_connection( - self._test_connection(
- key_filename=_support('test_rsa_password.key'), - key_filename=_support("test_rsa_password.key"),
- password='television', - password="television",
- passphrase='wat? lol no', - passphrase="wat? lol no",
- ) - )
+ with raises(AuthenticationException): # TODO: more granular + with raises(AuthenticationException): # TODO: more granular
+ # Sanity: if we're given both fields, the password field is NOT used as + # Sanity: if we're given both fields, the password field is NOT used as
@ -46,4 +57,6 @@ index 7163fdc..947e4b3 100644
+ password='television', + password='television',
+ passphrase='wat? lol no', + passphrase='wat? lol no',
+ ) + )
--
2.27.0

BIN
paramiko-2.7.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,13 +1,12 @@
Name: python-paramiko Name: python-paramiko
Version: 2.4.1 Version: 2.7.2
Release: 8 Release: 1
Summary: Python SSH module Summary: Python SSH module
License: LGPLv2+ License: LGPLv2+
URL: https://github.com/paramiko/paramiko URL: https://github.com/paramiko/paramiko
Source0: https://github.com/paramiko/paramiko/archive/%{version}/paramiko-%{version}.tar.gz Source0: https://github.com/paramiko/paramiko/archive/%{version}/paramiko-%{version}.tar.gz
Patch0: paramiko-2.3.1-disable-gssapi-on-unsupported-version.patch Patch0: paramiko-2.7.2-drop-pytest-relaxed.patch
Patch1: paramiko-2.4.1-drop-pytest-relaxed.patch
BuildArch: noarch BuildArch: noarch
@ -19,9 +18,10 @@ connections to remote machines.
%package -n python3-paramiko %package -n python3-paramiko
Summary: Python SSH module Summary: Python SSH module
BuildRequires: python3-devel python3-setuptools python3-bcrypt >= 3.1.3 python3-pytest BuildRequires: python3-devel python3-setuptools python3-bcrypt >= 3.1.3 python3-pytest
BuildRequires: python3-cryptography >= 1.5 python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1 BuildRequires: python3-cryptography >= 2.5 python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1
BuildRequires: python3-invoke >= 1.3 python3-mock >= 2.0
Requires: python3-bcrypt >= 3.1.3 python3-cryptography >= 1.5 Requires: python3-bcrypt >= 3.1.3 python3-cryptography >= 1.5
Requires: python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1 Requires: python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1 python3-invoke >= 1.3
%{?python_provide:%python_provide python3-paramiko} %{?python_provide:%python_provide python3-paramiko}
%description -n python3-paramiko %description -n python3-paramiko
@ -66,6 +66,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version}
%doc html/ demos/ NEWS README.rst %doc html/ demos/ NEWS README.rst
%changelog %changelog
* Thu Jan 28 2021 zhaorenhai <zhaorenhai@hotmail.com> - 2.7.2-1
- Upgrade to 2.7.2
* Mon Aug 10 2020 lingsheng <lingsheng@huawei.com> - 2.4.1-8 * Mon Aug 10 2020 lingsheng <lingsheng@huawei.com> - 2.4.1-8
- Remove python2-paramiko subpackage - Remove python2-paramiko subpackage