!41 Update to 3.2.0
From: @starlet-dx Reviewed-by: @lyn1001 Signed-off-by: @lyn1001
This commit is contained in:
commit
be28e8fc0c
@ -1,68 +0,0 @@
|
|||||||
--- a/dev-requirements.txt
|
|
||||||
+++ b/dev-requirements.txt
|
|
||||||
@@ -2,7 +2,6 @@
|
|
||||||
invoke==1.6.0
|
|
||||||
invocations==2.6.0
|
|
||||||
pytest==4.4.2
|
|
||||||
-pytest-relaxed==1.1.5
|
|
||||||
# pytest-xdist for test dir watching and the inv guard task
|
|
||||||
pytest-xdist==1.28.0
|
|
||||||
mock==2.0.0
|
|
||||||
--- a/pytest.ini
|
|
||||||
+++ b/pytest.ini
|
|
||||||
@@ -1,7 +1,4 @@
|
|
||||||
[pytest]
|
|
||||||
-# We use pytest-relaxed just for its utils at the moment, so disable it at the
|
|
||||||
-# plugin level until we adapt test organization to really use it.
|
|
||||||
-addopts = -p no:relaxed
|
|
||||||
# Loop on failure
|
|
||||||
looponfailroots = tests paramiko
|
|
||||||
# Ignore some warnings we cannot easily handle.
|
|
||||||
--- a/tests/test_client.py
|
|
||||||
+++ b/tests/test_client.py
|
|
||||||
@@ -33,7 +33,7 @@ import warnings
|
|
||||||
import weakref
|
|
||||||
from tempfile import mkstemp
|
|
||||||
|
|
||||||
-from pytest_relaxed import raises
|
|
||||||
+import pytest
|
|
||||||
from mock import patch, Mock
|
|
||||||
|
|
||||||
import paramiko
|
|
||||||
@@ -733,11 +733,11 @@ class PasswordPassphraseTests(ClientTest
|
|
||||||
|
|
||||||
# TODO: more granular exception pending #387; should be signaling "no auth
|
|
||||||
# methods available" because no key and no password
|
|
||||||
- @raises(SSHException)
|
|
||||||
@requires_sha1_signing
|
|
||||||
def test_passphrase_kwarg_not_used_for_password_auth(self):
|
|
||||||
- # Using the "right" password in the "wrong" field shouldn't work.
|
|
||||||
- self._test_connection(passphrase="pygmalion")
|
|
||||||
+ with pytest.raises(SSHException):
|
|
||||||
+ # Using the "right" password in the "wrong" field shouldn't work.
|
|
||||||
+ self._test_connection(passphrase="pygmalion")
|
|
||||||
|
|
||||||
@requires_sha1_signing
|
|
||||||
def test_passphrase_kwarg_used_for_key_passphrase(self):
|
|
||||||
@@ -757,15 +757,15 @@ class PasswordPassphraseTests(ClientTest
|
|
||||||
password="television",
|
|
||||||
)
|
|
||||||
|
|
||||||
- @raises(AuthenticationException) # TODO: more granular
|
|
||||||
@requires_sha1_signing
|
|
||||||
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
|
|
||||||
# a passphrase.
|
|
||||||
- self._test_connection(
|
|
||||||
- key_filename=_support("test_rsa_password.key"),
|
|
||||||
- password="television",
|
|
||||||
- passphrase="wat? lol no",
|
|
||||||
- )
|
|
||||||
+ with pytest.raises(AuthenticationException):
|
|
||||||
+ self._test_connection(
|
|
||||||
+ key_filename=_support("test_rsa_password.key"),
|
|
||||||
+ password="television",
|
|
||||||
+ passphrase="wat? lol no",
|
|
||||||
+ )
|
|
||||||
26
Remove-icecream-dep.patch
Normal file
26
Remove-icecream-dep.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
--- a/dev-requirements.txt
|
||||||
|
+++ b/dev-requirements.txt
|
||||||
|
@@ -17,7 +17,5 @@ coverage>=6.2,<7
|
||||||
|
alabaster==0.7.13
|
||||||
|
releases>=2.1
|
||||||
|
watchdog<2
|
||||||
|
-# Debuggery
|
||||||
|
-icecream>=2.1
|
||||||
|
# Self (sans GSS which is a pain to bother with most of the time)
|
||||||
|
-e ".[invoke]"
|
||||||
|
--- a/tests/conftest.py
|
||||||
|
+++ b/tests/conftest.py
|
||||||
|
@@ -22,13 +22,6 @@ from ._loop import LoopSocket
|
||||||
|
from ._stub_sftp import StubServer, StubSFTPServer
|
||||||
|
from ._util import _support
|
||||||
|
|
||||||
|
-from icecream import ic, install as install_ic
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-# Better print() for debugging - use ic()!
|
||||||
|
-install_ic()
|
||||||
|
-ic.configureOutput(includeContext=True)
|
||||||
|
-
|
||||||
|
|
||||||
|
# Perform logging by default; pytest will capture and thus hide it normally,
|
||||||
|
# presenting it on error/failure. (But also allow turning it off when doing
|
||||||
@ -1,37 +0,0 @@
|
|||||||
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-3.2.0.tar.gz
Normal file
BIN
paramiko-3.2.0.tar.gz
Normal file
Binary file not shown.
@ -1,15 +1,12 @@
|
|||||||
Name: python-paramiko
|
Name: python-paramiko
|
||||||
Version: 2.11.0
|
Version: 3.2.0
|
||||||
Release: 1
|
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
|
||||||
|
|
||||||
# Skip tests requiring invoke if it's not installed
|
Patch0: Remove-icecream-dep.patch
|
||||||
# Can be removed when https://github.com/paramiko/paramiko/pull/1667/ is released
|
|
||||||
Patch6000: backport-Skip-tests-requiring-invoke.patch
|
|
||||||
Patch6001: 0003-remove-pytest-relaxed-dep.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -23,6 +20,7 @@ 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 >= 2.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-mock >= 2.0
|
BuildRequires: python3-mock >= 2.0
|
||||||
|
BuildRequires: python3-lexicon >= 2.0.1 python3-invoke python3-pytest-relaxed
|
||||||
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
|
||||||
%{?python_provide:%python_provide python3-paramiko}
|
%{?python_provide:%python_provide python3-paramiko}
|
||||||
@ -57,7 +55,6 @@ sphinx-build -b html sites/docs/ html/
|
|||||||
rm -f html/.buildinfo
|
rm -f html/.buildinfo
|
||||||
|
|
||||||
%check
|
%check
|
||||||
rm -f tests/test_sftp*.py
|
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version}
|
PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-%{python3_version}
|
||||||
|
|
||||||
%files -n python3-paramiko
|
%files -n python3-paramiko
|
||||||
@ -69,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 Jun 15 2023 yaoxin <yao_xin001@hoperun.com> - 3.2.0-1
|
||||||
|
- Update to 3.2.0
|
||||||
|
|
||||||
* Thu Jun 23 2022 houyingchao <houyingchao@h-partners.com> - 2.11.0-1
|
* Thu Jun 23 2022 houyingchao <houyingchao@h-partners.com> - 2.11.0-1
|
||||||
- Upgrade to version 2.11.0
|
- Upgrade to version 2.11.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user