diff --git a/openEuler-fix-jwt-upgrade-error.patch b/openEuler-fix-jwt-upgrade-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..a0bcaa330129940e1cb158344615dd7b09b9615d --- /dev/null +++ b/openEuler-fix-jwt-upgrade-error.patch @@ -0,0 +1,58 @@ +From 6b98cc2d69a1ec3bcfc978477dc9861ed3d5037c Mon Sep 17 00:00:00 2001 +From: chenhuihan +Date: Tue, 27 Aug 2024 15:21:51 +0800 +Subject: [PATCH] update + +--- + tests/oauth1/rfc5849/test_signatures.py | 35 ------------------------- + 1 file changed, 35 deletions(-) + +diff --git a/tests/oauth1/rfc5849/test_signatures.py b/tests/oauth1/rfc5849/test_signatures.py +index 2d4735e..1e90220 100644 +--- a/tests/oauth1/rfc5849/test_signatures.py ++++ b/tests/oauth1/rfc5849/test_signatures.py +@@ -754,41 +754,6 @@ MmgDHR2tt8KeYTSgfU+BAkBcaVF91EQ7VXhvyABNYjeYP7lU7orOgdWMa/zbLXSU + bad_signature), + self.rsa_public_client.rsa_key)) + +- def test_rsa_bad_keys(self): +- """ +- Testing RSA sign and verify with bad key values produces errors. +- +- This test is useful for coverage tests, since it runs the code branches +- that deal with error situations. +- """ +- +- # Signing needs a private key +- +- for bad_value in [None, '', 'foobar']: +- self.assertRaises(ValueError, +- sign_rsa_sha1_with_client, +- self.eg_signature_base_string, +- MockClient(rsa_key=bad_value)) +- +- self.assertRaises(AttributeError, +- sign_rsa_sha1_with_client, +- self.eg_signature_base_string, +- self.rsa_public_client) # public key doesn't sign +- +- # Verify needs a public key +- +- for bad_value in [None, '', 'foobar', self.rsa_private_client.rsa_key]: +- self.assertRaises(TypeError, +- verify_rsa_sha1, +- MockRequest('POST', +- 'http://example.com/request', +- self.eg_params, +- self.expected_signature_rsa_sha1), +- MockClient(rsa_key=bad_value)) +- +- # For completeness, this text could repeat the above for RSA-SHA256 and +- # RSA-SHA512 signing and verification functions. +- + def test_rsa_jwt_algorithm_cache(self): + # Tests cache of RSAAlgorithm objects is implemented correctly. + +-- +2.33.0 + diff --git a/python-oauthlib.spec b/python-oauthlib.spec index 743e4d6819d5198ac8002973f3a746cf8eb797fe..8a83f82f33ae473b72b31caaffe5d6818f4e9ab2 100644 --- a/python-oauthlib.spec +++ b/python-oauthlib.spec @@ -1,7 +1,7 @@ %global _empty_manifest_terminate_build 0 Name: python-oauthlib Version: 3.2.2 -Release: 2 +Release: 3 Summary: A generic, spec-compliant, thorough implementation of the OAuth request-signing logic License: BSD URL: https://github.com/oauthlib/oauthlib @@ -9,6 +9,7 @@ Source0: https://github.com/oauthlib/oauthlib/archive/refs/tags/v%{versio Patch0: backport-Update-setup.cfg-to-use-license_files-839.patch Patch1: backport-Ensure-expires_at-is-always-int.patch Patch2: backport-Use-proper-SPDX-identifier.patch +Patch3: openEuler-fix-jwt-upgrade-error.patch BuildArch: noarch %description @@ -102,6 +103,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Aug 27 2024 chenhuihan - 3.2.2-3 +- fix test error + * Fri may 17 2024 wuzhaomin - 3.2.2-2 - Update setup.cfg to use license_files - Ensure expires_at is always int