From 1905d199248a7ae6d289ac1a910cb486b53ae6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 26 May 2022 08:18:23 +0200 Subject: [PATCH 1/3] Adjust expected exceptions in option merging tests for PyPy3 PyPy3 raises ValueError rather than TypeError when trying to combine a dict and a str in dict unpacking. Update the test expectations appropriately. Fixes #580 --- tests/test_api_jws.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_api_jws.py b/tests/test_api_jws.py index 0a0e2954..23975fa4 100644 --- a/tests/test_api_jws.py +++ b/tests/test_api_jws.py @@ -83,7 +83,7 @@ def test_non_object_options_dont_persist(self, jws, payload): def test_options_must_be_dict(self, jws): pytest.raises(TypeError, PyJWS, options=object()) - pytest.raises(TypeError, PyJWS, options=("something")) + pytest.raises((TypeError, ValueError), PyJWS, options=("something")) def test_encode_decode(self, jws, payload): secret = "secret" @@ -607,7 +607,7 @@ def test_decode_options_must_be_dict(self, jws, payload): with pytest.raises(TypeError): jws.decode(token, "secret", options=object()) - with pytest.raises(TypeError): + with pytest.raises((TypeError, ValueError)): jws.decode(token, "secret", options="something") def test_custom_json_encoder(self, jws, payload): From 2c08d422a18f75e5728de24e1dc6f6c4ac330274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 26 May 2022 08:21:41 +0200 Subject: [PATCH 2/3] Enable GHA testing on Python 3.11 and all PyPy3 versions Enable testing on all Python 3 versions supported by GitHub Actions at the moment. While at it, fix the tox invocation for Python 3.10. --- .github/workflows/main.yml | 3 ++- tox.ini | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e4843fd..148933f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,8 @@ jobs: strategy: matrix: platform: ["ubuntu-latest", "windows-latest"] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", + "3.11.0-beta - 3.11", "pypy-3.8", "pypy-3.9"] steps: - uses: "actions/checkout@v3" diff --git a/tox.ini b/tox.ini index d3664617..39e6733e 100644 --- a/tox.ini +++ b/tox.ini @@ -13,13 +13,17 @@ python = 3.8: py38, typing 3.9: py39 3.10: py310 + 3.11: py311 + pypy-3.7: pypy3 + pypy-3.8: pypy3 + pypy-3.9: pypy3 [tox] envlist = lint typing - py{36,37,38,39}-{crypto,nocrypto} + py{36,37,38,39,310,311,py3}-{crypto,nocrypto} docs pypi-description coverage-report From bf346f081f4f9982493128d2554f680e05000028 Mon Sep 17 00:00:00 2001 From: Asif Saif Uddin Date: Thu, 26 May 2022 15:11:09 +0600 Subject: [PATCH 3/3] drop pypy3.7 from tox --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 39e6733e..74fff6a2 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,6 @@ python = 3.9: py39 3.10: py310 3.11: py311 - pypy-3.7: pypy3 pypy-3.8: pypy3 pypy-3.9: pypy3