From a7bf79aeecf45c243c308591cd3551087ea793d7 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 15 Dec 2018 08:51:14 +0800 Subject: pin pytest-xdist to < 1.25.0 1.25.0 requires pytest >=3.6, but pytest-relaxed doesn't support pytest >3.2.x. This temporary pin can work around that issue. Without this the test suite is broken (although ultimately pytest-relaxed should be updated to support newer pytest) --- dev-requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index b4829cb3..2034b4b1 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,7 +3,9 @@ invoke>=1.0,<2.0 invocations>=1.2.0,<2.0 # NOTE: pytest-relaxed currently only works with pytest >=3, <3.3 pytest>=3.2,<3.3 -pytest-relaxed==1.1.2 +pytest-relaxed==1.1.4 +# pytest-xdist for test dir watching and the inv guard task +pytest-xdist>=1.22,<1.25.0 mock==2.0.0 # Linting! flake8==2.4.0 -- cgit v1.2.3 From 61ea0d14a388ec2729c2e9d17fa123c09f89101b Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Dec 2018 19:25:42 -0800 Subject: flake8 updated for Python 3.7 support --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index 2034b4b1..4c118991 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -8,7 +8,7 @@ pytest-relaxed==1.1.4 pytest-xdist>=1.22,<1.25.0 mock==2.0.0 # Linting! -flake8==2.4.0 +flake8==3.6.0 # Coverage! coverage==3.7.1 codecov==1.6.3 -- cgit v1.2.3 From 2ff999c1f8c2170a3f4de260db19880b95f0b971 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Dec 2018 21:05:30 -0800 Subject: pycparser 2.19 dropped Python 2.6, 3.3 However Paramiko 2.0-2.3 still support those, so. --- dev-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index 4c118991..eea5f21f 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -20,3 +20,5 @@ releases>=1.5,<2.0 semantic_version>=2.4,<2.5 wheel==0.24 twine==1.11.0 +# Test-matrix-oriented pins of production deps; should only exist on 2.0-2.3 +pycparser==2.18 -- cgit v1.2.3 From b3129327d96b064a61a82511491259200e2072bf Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Dec 2018 21:06:38 -0800 Subject: Remove 2.[0-3]-only pycparser test pin --- dev-requirements.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index eea5f21f..4c118991 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -20,5 +20,3 @@ releases>=1.5,<2.0 semantic_version>=2.4,<2.5 wheel==0.24 twine==1.11.0 -# Test-matrix-oriented pins of production deps; should only exist on 2.0-2.3 -pycparser==2.18 -- cgit v1.2.3 From 2b42accd3164a3ebac1c902fc394dfe1eb5dd05f Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Dec 2018 21:39:06 -0800 Subject: More 2.6/3.3 related dep tweaks - Setting pytest-xdist this far back was actually a mistake...ugh - But a few other things also would've popped up anyway with recent cryptography/etc releases --- dev-requirements.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index eea5f21f..3af84aa9 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,11 +4,9 @@ invocations>=1.2.0,<2.0 # NOTE: pytest-relaxed currently only works with pytest >=3, <3.3 pytest>=3.2,<3.3 pytest-relaxed==1.1.4 -# pytest-xdist for test dir watching and the inv guard task -pytest-xdist>=1.22,<1.25.0 mock==2.0.0 # Linting! -flake8==3.6.0 +flake8==2.4.0 # Coverage! coverage==3.7.1 codecov==1.6.3 @@ -21,4 +19,5 @@ semantic_version>=2.4,<2.5 wheel==0.24 twine==1.11.0 # Test-matrix-oriented pins of production deps; should only exist on 2.0-2.3 -pycparser==2.18 +pycparser<2.19 +idna<2.8 -- cgit v1.2.3 From 1d33faa410a274be7d4ad26d4137c947c41ecdc4 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Jun 2019 14:33:27 -0400 Subject: Update to modern pytest(-relaxed) Also fix some low hanging warnings fruit --- dev-requirements.txt | 4 ++-- tests/test_client.py | 10 ++++------ tests/test_util.py | 10 +++------- 3 files changed, 9 insertions(+), 15 deletions(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index 3af84aa9..c9fd4965 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,8 +2,8 @@ invoke>=1.0,<2.0 invocations>=1.2.0,<2.0 # NOTE: pytest-relaxed currently only works with pytest >=3, <3.3 -pytest>=3.2,<3.3 -pytest-relaxed==1.1.4 +pytest==4.6.3 +pytest-relaxed==1.1.5 mock==2.0.0 # Linting! flake8==2.4.0 diff --git a/tests/test_client.py b/tests/test_client.py index 03b163fc..7d431384 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -277,15 +277,13 @@ class SSHClientTest(unittest.TestCase): os.close(fd) client = paramiko.SSHClient() - self.assertEquals(0, len(client.get_host_keys())) + assert len(client.get_host_keys()) == 0 host_id = "[%s]:%d" % (self.addr, self.port) client.get_host_keys().add(host_id, "ssh-rsa", public_host_key) - self.assertEquals(1, len(client.get_host_keys())) - self.assertEquals( - public_host_key, client.get_host_keys()[host_id]["ssh-rsa"] - ) + assert len(client.get_host_keys()) == 1 + assert public_host_key == client.get_host_keys()[host_id]["ssh-rsa"] client.save_host_keys(localname) @@ -336,7 +334,7 @@ class SSHClientTest(unittest.TestCase): with paramiko.SSHClient() as tc: self.tc = tc self.tc.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - self.assertEquals(0, len(self.tc.get_host_keys())) + assert len(self.tc.get_host_keys()) == 0 self.tc.connect(**dict(self.connect_kwargs, password="pygmalion")) self.event.wait(1.0) diff --git a/tests/test_util.py b/tests/test_util.py index 12256b39..36d69de7 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -453,9 +453,7 @@ Host param4 "p a r" "p" "par" para f = StringIO(test_config_file) config = paramiko.util.parse_ssh_config(f) for host, values in res.items(): - self.assertEquals( - paramiko.util.lookup_ssh_host_config(host, config), values - ) + assert paramiko.util.lookup_ssh_host_config(host, config) == values def test_quoted_params_in_config(self): test_config_file = """\ @@ -486,9 +484,7 @@ Host param3 parara f = StringIO(test_config_file) config = paramiko.util.parse_ssh_config(f) for host, values in res.items(): - self.assertEquals( - paramiko.util.lookup_ssh_host_config(host, config), values - ) + assert paramiko.util.lookup_ssh_host_config(host, config) == values def test_quoted_host_in_config(self): conf = SSHConfig() @@ -507,7 +503,7 @@ Host param3 parara } incorrect_data = ['param"', '"param', 'param "pam', 'param "pam" "p a'] for host, values in correct_data.items(): - self.assertEquals(conf._get_hosts(host), values) + assert conf._get_hosts(host) == values for host in incorrect_data: self.assertRaises(Exception, conf._get_hosts, host) -- cgit v1.2.3 From 3c06250ac019ab6e3ce51da43659ebc74ebab5e6 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Jun 2019 14:39:16 -0400 Subject: Latest pytest-xdist I guess, I don't use it tho --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index d163df10..9a7be339 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -5,7 +5,7 @@ invocations>=1.2.0,<2.0 pytest==4.6.3 pytest-relaxed==1.1.5 # pytest-xdist for test dir watching and the inv guard task -pytest-xdist>=1.22,<1.25.0 +pytest-xdist==1.28.0 mock==2.0.0 # Linting! flake8==3.6.0 -- cgit v1.2.3 From 809b52a0abbd0286a75f3cfe65a297e8bc363e03 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 14 Jun 2019 20:33:15 -0400 Subject: More pytest version tweaks - 4.5+ has gross logging related tracebacks at the end of every run (probably related to https://github.com/pytest-dev/pytest/issues/5282) - also, old comment did not get removed earlier --- dev-requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dev-requirements.txt') diff --git a/dev-requirements.txt b/dev-requirements.txt index 9a7be339..f4f84748 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,8 +1,7 @@ # Invocations for common project tasks invoke>=1.0,<2.0 invocations>=1.2.0,<2.0 -# NOTE: pytest-relaxed currently only works with pytest >=3, <3.3 -pytest==4.6.3 +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 -- cgit v1.2.3