diff --git a/backport-Fixing-tests-on-Python-2.7.patch b/backport-Fixing-tests-on-Python-2.7.patch new file mode 100644 index 0000000000000000000000000000000000000000..f65890a95915907017f2fd17cf04e86cd7f5b8d0 --- /dev/null +++ b/backport-Fixing-tests-on-Python-2.7.patch @@ -0,0 +1,36 @@ +From 4e67803e410f2abb5b3894f807cb61df7a7c0316 Mon Sep 17 00:00:00 2001 +From: Luke Cousins +Date: Mon, 21 Feb 2022 10:29:55 +0000 +Subject: [PATCH] Fixing tests on Python 2.7 + +--- + tests/test_compliance_fixes.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/test_compliance_fixes.py b/tests/test_compliance_fixes.py +index 78a2a2a..63331af 100644 +--- a/tests/test_compliance_fixes.py ++++ b/tests/test_compliance_fixes.py +@@ -334,7 +334,7 @@ class EbayComplianceFixTest(TestCase): + assert token["token_type"] == "Bearer" + + +-def access_and_refresh_token_request_compliance_fix_test(session, client_secret: str): ++def access_and_refresh_token_request_compliance_fix_test(session, client_secret): + def _non_compliant_header(url, headers, body): + headers["X-Client-Secret"] = client_secret + return url, headers, body +@@ -373,7 +373,9 @@ class RefreshTokenRequestComplianceFixTest(TestCase): + self.addCleanup(mocker.stop) + + session = OAuth2Session() +- self.fixed_session = access_and_refresh_token_request_compliance_fix_test(session, self.value_to_test_for) ++ self.fixed_session = access_and_refresh_token_request_compliance_fix_test( ++ session, self.value_to_test_for ++ ) + + def test_access_token(self): + token = self.fixed_session.fetch_token( +-- +2.9.3.windows.1 + diff --git a/python-requests-oauthlib.spec b/python-requests-oauthlib.spec index b3ba0f0df957b5f130b97151721b52b5c6e1704e..1f6e79edbfb1ca0b2d11ec1a708ed67cdc96b63f 100644 --- a/python-requests-oauthlib.spec +++ b/python-requests-oauthlib.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-requests-oauthlib Version: 1.3.1 -Release: 1 +Release: 2 Summary: OAuthlib authentication support for Requests. License: ISC URL: https://github.com/requests/requests-oauthlib Source0: https://files.pythonhosted.org/packages/95/52/531ef197b426646f26b53815a7d2a67cb7a331ef098bb276db26a68ac49f/requests-oauthlib-1.3.1.tar.gz +Patch0: backport-Fixing-tests-on-Python-2.7.patch BuildArch: noarch %description @@ -66,6 +67,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Fri May 10 2024 wuzhaomin - 1.3.1-2 +- Fixing tests on Python 2.7 + * Thu Jun 16 2022 OpenStack_SIG - 1.3.1-1 - Upgrade version for openstack yoga