summaryrefslogtreecommitdiff
path: root/dev-python/google-auth
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-14 15:13:45 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-14 15:13:45 +0100
commitb9e8f3cc44aed3b6da71c7510c6287bf7bbbc66b (patch)
tree4b47f3026f10252cff69e7a4346215a4da4f0f1c /dev-python/google-auth
parent3d952d0bfe7b386699eb32d1431deb0c538f044d (diff)
gentoo auto-resync : 14:06:2023 - 15:13:45
Diffstat (limited to 'dev-python/google-auth')
-rw-r--r--dev-python/google-auth/Manifest3
-rw-r--r--dev-python/google-auth/files/google-auth-2.20.0-urllib3-2.patch68
-rw-r--r--dev-python/google-auth/google-auth-2.20.0.ebuild63
3 files changed, 134 insertions, 0 deletions
diff --git a/dev-python/google-auth/Manifest b/dev-python/google-auth/Manifest
index 5b2382dbf734..cc9c1b5f8b81 100644
--- a/dev-python/google-auth/Manifest
+++ b/dev-python/google-auth/Manifest
@@ -1,5 +1,8 @@
+AUX google-auth-2.20.0-urllib3-2.patch 2690 BLAKE2B 416a0d93b862cb9bdc695dfd2a301c872204b82623b2c19f2e06d1cbe65690ea44ac5bd3bf8122cbfee5cd9b028441466a03ae4b1c8f0112ed24c49b98a033b2 SHA512 c55afab7de1bad940478a45cd4b12cfe0fbe430dff01d56d7ddfe0ff32d0ac7306ad2b7d44f3f54584875f5092ca84decc9d73d7c71841e15e87f8b14229ea0b
DIST google-auth-2.18.1.tar.gz 224714 BLAKE2B 2fa63ed18d4dfa4940c93e5f3fb099a6892a16148e5161c3e52980cdee80b7b153a60c005bd3d1d856476f85678b88315d3f4b639f693d292abbf8133dee9397 SHA512 34e53a1c0cf42ab600281d815f259bb252987f163925e357dc2e636c945fd4b74c1f4168bf7d90a6e352fe1d7343767b68bf94fdbb1bc90a92c7067b0e2f2f8f
DIST google-auth-2.19.1.tar.gz 230290 BLAKE2B c7f76e1bd936d4d76c81e19fbf6bb50dfe700666d8eb234f762253547fd670d1d26a97a7fe4457bdb719712d32e28e3c8f9adc82c475ee6830f5fd2af994bb3a SHA512 8a8106abb1a0966254caa2e568fe9a9c887601b19e5309f4d43e1b07f3e3280ad358cf8999e34719d6f23473b263d128a2d0321f0ff184c4e188b0b5cf88a6ee
+DIST google-auth-2.20.0.tar.gz 229669 BLAKE2B 547cb99cb72a4a5b224fdfff2bf156effe1cce5d7b4316b16530b1a3bbe50ab24dc54520fce3206fb2cea3fde1ca0c35f7bf5920e5128a5ed1bed13883fc75e5 SHA512 e13471f4452bd5c69c2ca9d1ff145431b160805e4ab2d3a70c35cad78c6e3e4f4bc789dfe99f55a0e60e5f335f9983529eabbfb0fc50794b62dfa7eeb70882b1
EBUILD google-auth-2.18.1.ebuild 1502 BLAKE2B 2584d825075581b0185e33536a49f232989211770e62ba26bd89c7cb8be4f7df68dfde860418c8ab4b8e0b93972d9e1015bebe0eb44a30ea532464f53c55c0f9 SHA512 63c7d81173b43acd8543c6dd14bb6ee55ff3b583ee42f7389a0557f053fe519bd6e065e2ac9923b54d05d15c7a56114461d1d35b8b0c81c417ba77f47875c82e
EBUILD google-auth-2.19.1.ebuild 1504 BLAKE2B e981f35bb9fcebd5b8dd729bb7708d5956951cf9328d679914134a00a2a6d5f92be54c83d52016634612e351d8ccaccc6744ccbd52d4dbd773748df803225537 SHA512 68cb3d305941f1aca108d1c795ee75305ebdbb1bd60c1cf4d352257929240901b332d94135a37b1407e67e3ba35ca6f3538582e5bb2451c608c1f0d96eec0032
+EBUILD google-auth-2.20.0.ebuild 1638 BLAKE2B 71ce7027198f2fc6987ad7db9da0c572baed35616807f12eeb913c19dc012bacab80bd57c8cf48406837eb36699c3dbc393ccdc8698dfcec8c1063c27f4f763c SHA512 64fbe0810cff2ed43359b60672db8ccdccffbff61e1e5c6d5a19cf74c4f21a6f316c8adcab9d29a5b20df56b44f7dae162cf1053be140253d08de561328a5439
MISC metadata.xml 521 BLAKE2B 784282f6a173e7746a408556d77e1277f65a41eae545b6b26054c1e506642e683c1c7d91798f3b7b690bc4f9d2f642a51c1395593177eebf1770d2a0c0ba589e SHA512 c2624ebca3dc42961e61531db4724b2b354a722f71cd7f2c194680fee50125d2251f4b94cc7e31b008a2792e74b0f55f407a1230d3f59572df9cf32ee49d2fb7
diff --git a/dev-python/google-auth/files/google-auth-2.20.0-urllib3-2.patch b/dev-python/google-auth/files/google-auth-2.20.0-urllib3-2.patch
new file mode 100644
index 000000000000..791edeed09cf
--- /dev/null
+++ b/dev-python/google-auth/files/google-auth-2.20.0-urllib3-2.patch
@@ -0,0 +1,68 @@
+From 9ed006d02d7c9de3e6898ee819648c2fd3367c1d Mon Sep 17 00:00:00 2001
+From: Daniel Garcia Moreno <daniel.garcia@suse.com>
+Date: Wed, 10 May 2023 09:18:57 +0200
+Subject: [PATCH] Support urllib3 >= 2.0.0
+
+The urllib3.request.RequestMethods has been moved to
+urllib3._request_methods.RequestMethods.
+
+This patch changes the usage to continue working with the latest
+release, but now it's a "private" class in a "private" module, so maybe
+it's worth to start to think about updating this code to use the public
+API.
+
+https://urllib3.readthedocs.io/en/stable/changelog.html#removed
+---
+ google/auth/transport/urllib3.py | 11 ++++++-----
+ setup.py | 2 +-
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/google/auth/transport/urllib3.py b/google/auth/transport/urllib3.py
+index 4abc26b52..f1dd35320 100644
+--- a/google/auth/transport/urllib3.py
++++ b/google/auth/transport/urllib3.py
+@@ -95,8 +95,8 @@ class Request(transport.Request):
+ credentials.refresh(request)
+
+ Args:
+- http (urllib3.request.RequestMethods): An instance of any urllib3
+- class that implements :class:`~urllib3.request.RequestMethods`,
++ http (urllib3._request_methods.RequestMethods): An instance of any urllib3
++ class that implements :class:`~urllib3._request_methods.RequestMethods`,
+ usually :class:`urllib3.PoolManager`.
+
+ .. automethod:: __call__
+@@ -184,7 +184,7 @@ def _make_mutual_tls_http(cert, key):
+ return http
+
+
+-class AuthorizedHttp(urllib3.request.RequestMethods):
++class AuthorizedHttp(urllib3._request_methods.RequestMethods):
+ """A urllib3 HTTP class with credentials.
+
+ This class is used to perform requests to API endpoints that require
+@@ -197,8 +197,9 @@ class AuthorizedHttp(urllib3.request.RequestMethods):
+ response = authed_http.request(
+ 'GET', 'https://www.googleapis.com/storage/v1/b')
+
+- This class implements :class:`urllib3.request.RequestMethods` and can be
+- used just like any other :class:`urllib3.PoolManager`.
++ This class implements
++ :class:`urllib3._request_methods.RequestMethods` and can be used
++ just like any other :class:`urllib3.PoolManager`.
+
+ The underlying :meth:`urlopen` implementation handles adding the
+ credentials' headers to the request and refreshing credentials as needed.
+diff --git a/setup.py b/setup.py
+index e45512a02..cfb3b504f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -29,7 +29,7 @@
+ # install enum34 to support 2.7. enum34 only works up to python version 3.3.
+ 'enum34>=1.1.10; python_version < "3.4"',
+ "six>=1.9.0",
+- "urllib3<2.0",
++ "urllib3>=2.0",
+ )
+
+ extras = {
diff --git a/dev-python/google-auth/google-auth-2.20.0.ebuild b/dev-python/google-auth/google-auth-2.20.0.ebuild
new file mode 100644
index 000000000000..fae7f6b53c35
--- /dev/null
+++ b/dev-python/google-auth/google-auth-2.20.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Google Authentication Library"
+HOMEPAGE="
+ https://github.com/googleapis/google-auth-library-python/
+ https://pypi.org/project/google-auth/
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+RDEPEND="
+ <dev-python/cachetools-6.0.0[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-modules-0.2.1[${PYTHON_USEDEP}]
+ >=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ !dev-python/namespace-google
+"
+BDEPEND="
+ test? (
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ dev-python/grpcio[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/moto[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pytest-localserver[${PYTHON_USEDEP}]
+ dev-python/pyu2f[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/responses[${PYTHON_USEDEP}]
+ >=dev-python/urllib3-2[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/googleapis/google-auth-library-python/pull/1290
+ "${FILESDIR}"/google-auth-2.20.0-urllib3-2.patch
+)
+
+EPYTEST_IGNORE=(
+ # these are compatibility tests with oauth2client
+ # disable them to unblock removal of that package
+ tests/test__oauth2client.py
+)
+
+python_compile() {
+ distutils-r1_python_compile
+ find "${BUILD_DIR}" -name '*.pth' -delete || die
+}