update to 2.8.1

This commit is contained in:
zhanzhimin 2021-12-01 12:32:01 +08:00
parent 9d840ebf78
commit 55bb2bf844
4 changed files with 50 additions and 4 deletions

View File

@ -0,0 +1,37 @@
From 2dc654a20c4f1908d587060809a9d67b31352497 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 16 Apr 2020 09:46:39 +0200
Subject: [PATCH] Skip tests requiring invoke if it's not installed
Since invoke is an optional dependency and only one group of tests
require it, skip them gracefully rather than failing if it's not
present.
---
tests/test_config.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/test_config.py b/tests/test_config.py
index 5e9aa0592..2095061f2 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -6,7 +6,11 @@
from paramiko.py3compat import string_types
-from invoke import Result
+try:
+ from invoke import Result
+except ImportError:
+ Result = None
+
from mock import patch
from pytest import raises, mark, fixture
@@ -705,6 +709,7 @@ def inner(command, *args, **kwargs):
return inner
+@mark.skipif(Result is None, reason="requires invoke package")
class TestMatchExec(object):
@patch("paramiko.config.invoke", new=None)
@patch("paramiko.config.invoke_import_error", new=ImportError("meh"))

Binary file not shown.

BIN
paramiko-2.8.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,12 +1,15 @@
Name: python-paramiko
Version: 2.7.2
Release: 1
Version: 2.8.1
Release: 2
Summary: Python SSH module
License: LGPLv2+
URL: https://github.com/paramiko/paramiko
Source0: https://github.com/paramiko/paramiko/archive/%{version}/paramiko-%{version}.tar.gz
Patch0: paramiko-2.7.2-drop-pytest-relaxed.patch
# Skip tests requiring invoke if it's not installed
# Can be removed when https://github.com/paramiko/paramiko/pull/1667/ is released
Patch6000: backport-Skip-tests-requiring-invoke.patch
BuildArch: noarch
@ -19,9 +22,9 @@ connections to remote machines.
Summary: Python SSH module
BuildRequires: python3-devel python3-setuptools python3-bcrypt >= 3.1.3 python3-pytest
BuildRequires: python3-cryptography >= 2.5 python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1
BuildRequires: python3-invoke >= 1.3 python3-mock >= 2.0
BuildRequires: python3-mock >= 2.0
Requires: python3-bcrypt >= 3.1.3 python3-cryptography >= 1.5
Requires: python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1 python3-invoke >= 1.3
Requires: python3-pyasn1 >= 0.1.7 python3-pynacl >= 1.0.1
%{?python_provide:%python_provide python3-paramiko}
%description -n python3-paramiko
@ -66,6 +69,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version}
%doc html/ demos/ NEWS README.rst
%changelog
* Sat Feb 26 2022 zhanzhimin <zhanzhimin@h-partners.com> - 2.8.1-2
- drop invoke dependencies as it requires ancient pytest
* Wed Dec 01 2021 zhanzhimin <zhanzhimin@huawei.com> - 2.8.1-1
- update to 2.8.1
* Thu Jan 28 2021 zhaorenhai <zhaorenhai@hotmail.com> - 2.7.2-1
- Upgrade to 2.7.2