summaryrefslogtreecommitdiff
path: root/dev-python/paramiko
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
commit38423c67c8a23f6a1bc42038193182e2da3116eb (patch)
tree04e2cf4bd43601b77daa79fe654e409187093c5e /dev-python/paramiko
parent623ee73d661e5ed8475cb264511f683407d87365 (diff)
gentoo resync : 25.04.2020
Diffstat (limited to 'dev-python/paramiko')
-rw-r--r--dev-python/paramiko/Manifest4
-rw-r--r--dev-python/paramiko/files/paramiko-2.7.1-tests.patch108
-rw-r--r--dev-python/paramiko/paramiko-2.7.1.ebuild6
3 files changed, 93 insertions, 25 deletions
diff --git a/dev-python/paramiko/Manifest b/dev-python/paramiko/Manifest
index 7693d8595b80..a5a66485d2f7 100644
--- a/dev-python/paramiko/Manifest
+++ b/dev-python/paramiko/Manifest
@@ -1,6 +1,6 @@
AUX paramiko-2.4.2-disable-server.patch 1596 BLAKE2B 7e2ef1e216f34086c06d985556dde82eccfc08b835a9b336f1e54e81ddf32567872daec9dadc728bfaab8e3c4728439d704d51f9b1df5e04a64b5064f6d79bf5 SHA512 5e2f9285ffa3ece551ce929c6d50691761da6269e906355bbf79b0664a764083f7d55a9e347e2ed236a4c9a7f934d489315b68ebea984694ee9d1714416d34fd
AUX paramiko-2.6.0-tests.patch 1193 BLAKE2B 86063ffd478f5772e2aacbbd6e6a74262ebaa1e67126af598eb589e49484efc15b581df0bbc796c0790a5ca80d6b5a72cbd07782c7790a9782e66f857e9c2336 SHA512 5b5de9c209d6aee83dc57f2f04d1d43f7106ed135fc12427d9237cf63932408c6385f878d02ef5dbb3d09476ee516148208d0390caa21f82a113bf6ed5a8176e
-AUX paramiko-2.7.1-tests.patch 2370 BLAKE2B 9d63e9e96a3bc4a1ecc7762ff0b7663c13ae82b6f4d2b46343847059b03bd91ad3b16ddb2e2204f15cf8c6eb14310857ff7c0af7ad420f27d2ef11f500057414 SHA512 4c9dbe97d9c2957f26838b46897d776c08ea20040c452b9dea8466288271811e51f491277c8c5e544c0b47e1eb50fdb5baacce1e6254c7f2cf2f45de6ab20a19
+AUX paramiko-2.7.1-tests.patch 4618 BLAKE2B 9c1d055e24e360574fdcb63ef01a1669e380da42aa2ca72ba158159a1d618b447936a3c3f746625126a1bf8c945d8000bd09aabc5918d25b3840296b57bb5469 SHA512 6192dadd31c33ccf178cd813b726c5c2cc31a12ac7698377ede19d10b19b4e32b6e203ec2bbf26b486f58151f642c4d44095e9efeabad96e2751fa4631ee11c4
DIST paramiko-2.7.1.tar.gz 330391 BLAKE2B 0f7a2f3b6c15a68002001d69f8402deea5421a8b1f6cf35061a8a36f4b81b7a291d7b0f0b457f32de4c4769659a2e067f0bdb6cc5dcdd0810ebf917e349e85af SHA512 2cebed2420cf9af77cb0d459b64a74adcffcdb15bd58c8fc9243855ae91f43e16706665b64ce2851f6e99e59ca6a47d7299a2aae35a4c9d01ab97b343569c4b2
-EBUILD paramiko-2.7.1.ebuild 1492 BLAKE2B 1b097faec002d14dced8eb1ab42bb09fe638c30016c6d65d8295bacbcbbc9c3c3d3c421ef6d026151d4740ea2ec7c67af4f9b6b54933b138f7a44eaa647cb34b SHA512 8c255efb737f85c46656ec9a10c770f158015274661eaaf566c6af0ea298133414275da1885d83f30ec159c0ccf14b854876806c0df7938294dc8b32a950b822
+EBUILD paramiko-2.7.1.ebuild 1417 BLAKE2B 2d5b5b788dd203bf8b94fcdcf4834effacea9d4c1a87b5463819c9e6e9928d2a3f2b7b5dd81624d832316e79f7074ab08e29593ac4bddfa6c90e96a71acd7700 SHA512 69a4f4244ba8ed18208f45efacda8f84abde3b46699ecacb96df8d2b08626572c70cc89b1fabfb74bfced85f1a67e2323d20c3cdfe80f6aa753787c25c69e0ba
MISC metadata.xml 1331 BLAKE2B 4e53a314a1a86c488328a89170e03932bab1944bb133cd8551333da5a4cb80600e1bd5238b858bdc3565334cbc7251782979f4a770b43d064a9bb5096fdec7d7 SHA512 14cad597d85d0778ee8b2ce5c7cdda768e8f3cfb8de084189e7d0b422b77c73c2410448c8c013c1f03864e7b4365a87c1bba16fe49081f728c3bfef3d0ba455a
diff --git a/dev-python/paramiko/files/paramiko-2.7.1-tests.patch b/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
index 9c3570c2c58d..5791afd044ad 100644
--- a/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
+++ b/dev-python/paramiko/files/paramiko-2.7.1-tests.patch
@@ -1,26 +1,60 @@
-From e3e904cc88a08e88c9051de4f5a6f1b6e78bf4a6 Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping <sebastian@pipping.org>
-Date: Mon, 16 Dec 2019 17:39:50 +0100
-Subject: [PATCH] Strip use of pytest-relaxed
+From e91cac80d679dfe16897988b0c14c1293a93c805 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:22:59 +0200
+Subject: [PATCH 1/2] Replace pytest-relaxed with plain pytest.raises
-.. since it was removed from the tree due to breaking pytest.
+There is really no technical reason to bring pytest-relaxed to call
+@raises as a decorator while plain pytest works just fine. Plus,
+pytest.raises() is used in test_sftp already.
+
+pytest-relaxed causes humongous breakage to other packages
+on the system. It has been banned from Gentoo for this reason.
---
- tests/test_client.py | 23 +++++++++++------------
- 1 file changed, 11 insertions(+), 12 deletions(-)
+ dev-requirements.txt | 1 -
+ setup.cfg | 3 ---
+ tests/test_client.py | 20 ++++++++++----------
+ 3 files changed, 10 insertions(+), 14 deletions(-)
+diff --git a/dev-requirements.txt b/dev-requirements.txt
+index f4f84748..b1b0cdf5 100644
+--- a/dev-requirements.txt
++++ b/dev-requirements.txt
+@@ -2,7 +2,6 @@
+ invoke>=1.0,<2.0
+ invocations>=1.2.0,<2.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
+diff --git a/setup.cfg b/setup.cfg
+index 44d029c4..99159096 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -17,9 +17,6 @@ ignore = E124,E125,E128,E261,E301,E302,E303,E402,E721,W503,E203,E722
+ max-line-length = 79
+
+ [tool: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.
diff --git a/tests/test_client.py b/tests/test_client.py
-index 60ad310..22a2e40 100644
+index 60ad310c..88fd1d53 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
-@@ -33,7 +33,6 @@ import warnings
+@@ -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
-@@ -684,10 +683,10 @@ class PasswordPassphraseTests(ClientTest):
+@@ -684,10 +684,10 @@ class PasswordPassphraseTests(ClientTest):
# TODO: more granular exception pending #387; should be signaling "no auth
# methods available" because no key and no password
@@ -28,13 +62,13 @@ index 60ad310..22a2e40 100644
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 self.assertRaises(SSHException):
++ with pytest.raises(SSHException):
+ # Using the "right" password in the "wrong" field shouldn't work.
+ self._test_connection(passphrase="pygmalion")
def test_passphrase_kwarg_used_for_key_passphrase(self):
# Straightforward again, with new passphrase kwarg.
-@@ -705,14 +704,14 @@ class PasswordPassphraseTests(ClientTest):
+@@ -705,14 +705,14 @@ class PasswordPassphraseTests(ClientTest):
password="television",
)
@@ -42,21 +76,59 @@ index 60ad310..22a2e40 100644
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.
+ # 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 self.assertRaises(AuthenticationException):
-+ # Sanity: if we're given both fields, the password field is NOT used as
-+ # a passphrase.
++ with pytest.raises(AuthenticationException):
+ self._test_connection(
+ key_filename=_support("test_rsa_password.key"),
+ password="television",
+ passphrase="wat? lol no",
+ )
--
-2.23.0
+2.26.1
+
+From af228a2d950654ccdd4a5d665da0018bd976c108 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 2/2] 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 5e9aa059..5eeaeac3 100644
+--- a/tests/test_config.py
++++ b/tests/test_config.py
+@@ -6,7 +6,11 @@ from socket import gaierror
+
+ 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 _expect(success_on):
+ 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"))
+--
+2.26.1
diff --git a/dev-python/paramiko/paramiko-2.7.1.ebuild b/dev-python/paramiko/paramiko-2.7.1.ebuild
index 654fb81112a4..114317d36879 100644
--- a/dev-python/paramiko/paramiko-2.7.1.ebuild
+++ b/dev-python/paramiko/paramiko-2.7.1.ebuild
@@ -30,11 +30,11 @@ BDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
)
"
distutils_enable_sphinx sites/docs
+distutils_enable_tests pytest
src_prepare() {
eapply "${FILESDIR}"/${P}-tests.patch
@@ -46,10 +46,6 @@ src_prepare() {
eapply_user
}
-python_test() {
- py.test -v || die "Tests fail with ${EPYTHON}"
-}
-
python_install_all() {
distutils-r1_python_install_all