[packages/python3-requests-oauthlib] - python-requests-oauthlib.spec updated to 2.0.0 (for python 3.4+) + oauthlib 3.3.0 fix from git

qboosh qboosh at pld-linux.org
Sat Apr 18 09:37:34 CEST 2026


commit 0e33c33f48fc1e8232117c18650d050f18e56994
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Apr 18 09:38:10 2026 +0200

    - python-requests-oauthlib.spec updated to 2.0.0 (for python 3.4+) + oauthlib 3.3.0 fix from git

 ...oauthlib.spec => python3-requests-oauthlib.spec | 77 ++++------------------
 requests-oauthlib-oauthlib3.3.0.patch              | 31 +++++++++
 2 files changed, 44 insertions(+), 64 deletions(-)
---
diff --git a/python-requests-oauthlib.spec b/python3-requests-oauthlib.spec
similarity index 56%
rename from python-requests-oauthlib.spec
rename to python3-requests-oauthlib.spec
index 24d3be8..fa68ca0 100644
--- a/python-requests-oauthlib.spec
+++ b/python3-requests-oauthlib.spec
@@ -2,33 +2,19 @@
 # Conditional build:
 %bcond_without	doc	# API documentation
 %bcond_without	tests	# unit tests
-%bcond_without	python2	# CPython 2.x module
-%bcond_without	python3	# CPython 3.x module
 
 Summary:	OAuthlib authentication support for Requests
 Summary(pl.UTF-8):	Obsługa uwierzytelniania przez OAuthlib dla Requests
-Name:		python-requests-oauthlib
-Version:	1.3.1
+Name:		python3-requests-oauthlib
+Version:	2.0.0
 Release:	1
 License:	ISC
 Group:		Development/Languages/Python
 #Source0Download: https://pypi.org/simple/requests-oauthlib/
 Source0:	https://files.pythonhosted.org/packages/source/r/requests-oauthlib/requests-oauthlib-%{version}.tar.gz
-# Source0-md5:	c4f3b4ecdb72a56a13675e5a3302852a
+# Source0-md5:	713dc7856f9ff625d75335c10d332a1b
+Patch0:		requests-oauthlib-oauthlib3.3.0.patch
 URL:		https://github.com/requests/requests-oauthlib
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-cryptography
-BuildRequires:	python-mock
-BuildRequires:	python-oauthlib >= 3.0.0
-BuildRequires:	python-pyjwt >= 1.0.0
-BuildRequires:	python-requests >= 2.0.0
-BuildRequires:	python-requests-mock
-%endif
-%endif
-%if %{with python3}
 BuildRequires:	python3-modules >= 1:3.4
 BuildRequires:	python3-setuptools
 %if %{with tests}
@@ -38,12 +24,11 @@ BuildRequires:	python3-pyjwt >= 1.0.0
 BuildRequires:	python3-requests >= 2.0.0
 BuildRequires:	python3-requests-mock
 %endif
-%endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
-%{?with_doc:BuildRequires:	sphinx-pdg}
-Requires:	python-modules >= 1:2.7
-Obsoletes:	python-requests_oauthlib < 0.6.1-3
+%{?with_doc:BuildRequires:	sphinx-pdg-3}
+Requires:	python3-modules >= 1:3.4
+Obsoletes:	python3-requests_oauthlib < 0.6.1-3
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -53,19 +38,6 @@ This project provides first-class OAuth library support for Requests.
 %description -l pl.UTF-8
 Ten pakiet zapewnia obsługę biblioteki OAuth dla Requests.
 
-%package -n python3-requests-oauthlib
-Summary:	OAuthlib authentication support for Requests
-Summary(pl.UTF-8):	Obsługa uwierzytelniania przez OAuthlib dla Requests
-Group:		Development/Languages/Python
-Requires:	python3-modules >= 1:3.4
-Obsoletes:	python3-requests_oauthlib < 0.6.1-3
-
-%description -n python3-requests-oauthlib
-This project provides first-class OAuth library support for Requests.
-
-%description -n python3-requests-oauthlib -l pl.UTF-8
-Ten pakiet zapewnia obsługę biblioteki OAuth dla Requests.
-
 %package apidocs
 Summary:	API documentation for requests-oauthlib module
 Summary(pl.UTF-8):	Dokumentacja API biblioteki requests-oauthlib
@@ -79,59 +51,36 @@ Dokumentacja API biblioteki requests-oauthlib.
 
 %prep
 %setup -q -n requests-oauthlib-%{version}
+%patch -P0 -p1
 
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m unittest discover -s tests
-%endif
-%endif
+# selenium-based, downloads chrome webdriver (x86_64 only anyway)
+%{__rm} -r tests/examples
 
-%if %{with python3}
+%build
 %py3_build
 
 %if %{with tests}
 %{__python3} -m unittest discover -s tests
 %endif
-%endif
 
 %if %{with doc}
-%{__make} -C docs html
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-3
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
 %py3_install
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
-%{py_sitescriptdir}/requests_oauthlib
-%{py_sitescriptdir}/requests_oauthlib-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-requests-oauthlib
-%defattr(644,root,root,755)
-%doc AUTHORS.rst HISTORY.rst LICENSE README.rst
 %{py3_sitescriptdir}/requests_oauthlib
 %{py3_sitescriptdir}/requests_oauthlib-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidocs
diff --git a/requests-oauthlib-oauthlib3.3.0.patch b/requests-oauthlib-oauthlib3.3.0.patch
new file mode 100644
index 0000000..fd85d16
--- /dev/null
+++ b/requests-oauthlib-oauthlib3.3.0.patch
@@ -0,0 +1,31 @@
+From b1dd93c5d024500b6236dea06734d6e6482c3565 Mon Sep 17 00:00:00 2001
+From: Jonathan Huot <jonathan.huot at gmail.com>
+Date: Thu, 12 Jun 2025 20:06:32 +0200
+Subject: [PATCH] Updated tests to support 3.3.0/changes rel. to expires_at
+
+---
+ tests/test_compliance_fixes.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test_compliance_fixes.py b/tests/test_compliance_fixes.py
+index c5166bd..9ad6d09 100644
+--- a/tests/test_compliance_fixes.py
++++ b/tests/test_compliance_fixes.py
+@@ -115,7 +115,7 @@ def test_fetch_access_token(self):
+             authorization_response="https://i.b/?code=hello",
+         )
+         # Times should be close
+-        approx_expires_at = time.time() + 3600
++        approx_expires_at = round(time.time()) + 3600
+         actual_expires_at = token.pop("expires_at")
+         self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2)
+ 
+@@ -289,7 +289,7 @@ def test_fetch_access_token(self):
+             authorization_response="https://i.b/?code=hello",
+         )
+ 
+-        approx_expires_at = time.time() + 86400
++        approx_expires_at = round(time.time()) + 86400
+         actual_expires_at = token.pop("expires_at")
+         self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-requests-oauthlib.git/commitdiff/0e33c33f48fc1e8232117c18650d050f18e56994



More information about the pld-cvs-commit mailing list