From 30693442ed335460930b32e3e9d8b282edec3213 Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Wed, 24 Nov 2021 23:52:26 -0500 Subject: [PATCH 1/2] CI: update test matrix with Python-3.10 also add cryptography-36.0.0 to test matrix latest pytest 6.2.x required for 3.10 but requires 3.6+ so keep using pytest 4.6.x for python < 3.9 --- .github/workflows/linux.yml | 2 ++ dev-requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 85344b876..37a693e4b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -19,6 +19,7 @@ jobs: - "python:3.7-buster" - "python:3.8-bullseye" - "python:3.9-bullseye" + - "python:3.10-bullseye" - "pypy:2.7-7.3.5" - "pypy:3.7-7.3.5" crypto_ver: @@ -32,6 +33,7 @@ jobs: - {imgtag: "python:2.7-buster", crypto_ver: "3.1.1"} - {imgtag: "python:3.6-buster", crypto_ver: "3.1.1"} - {imgtag: "python:3.8-bullseye", crypto_ver: "3.4.7"} + - {imgtag: "python:3.9-bullseye", crypto_ver: "36.0.0"} - {imgtag: "pypy:3.7-7.3.5", crypto_ver: "3.4.7"} container: "${{matrix.imgtag}}" diff --git a/dev-requirements.txt b/dev-requirements.txt index a06b6c06f..bba6ce6c9 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,5 +4,6 @@ mccabe==0.6.1 pycodestyle==2.6.0 pyflakes==2.2.0 # for running tests -pytest==4.6.11 +pytest==4.6.11;python_version<"3.9" +pytest==6.2.5;python_version>="3.9" mock==2.0.0;python_version<"3.3" From aa43a0e20766d8d865f0dcdd230a10f184fca771 Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Thu, 25 Nov 2021 00:50:07 -0500 Subject: [PATCH 2/2] tests: update Event.isSet() -> Event.is_set() is_set() was added in python-2.6 isSet() is deprecated in python-3.10 --- tests/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index 8b8721a83..ec3c59e97 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -604,7 +604,7 @@ def _setup_for_env(self): self.tc.connect(self.addr, self.port, username='slowdive', password='pygmalion') self.event.wait(1.0) - self.assertTrue(self.event.isSet()) + self.assertTrue(self.event.is_set()) self.assertTrue(self.ts.is_active()) def test_update_environment(self):