diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-06-14 08:17:28 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-06-14 08:17:28 +0000 |
| commit | 4876afda8bd2a2ff7739c35d2217e076f969b700 (patch) | |
| tree | 5d3aa7f305cca311eb5135d2e7ffbfa065082d83 /dev-python/google-auth | |
| parent | 26cb790d5c3144747fa0bf0ee13fc2c41728f304 (diff) | |
| download | baldeagleos-repo-4876afda8bd2a2ff7739c35d2217e076f969b700.tar.gz baldeagleos-repo-4876afda8bd2a2ff7739c35d2217e076f969b700.tar.xz baldeagleos-repo-4876afda8bd2a2ff7739c35d2217e076f969b700.zip | |
Adding metadata
Diffstat (limited to 'dev-python/google-auth')
| -rw-r--r-- | dev-python/google-auth/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/google-auth/files/google-auth-2.20.0-urllib3-2.patch | 68 | ||||
| -rw-r--r-- | dev-python/google-auth/google-auth-2.20.0.ebuild | 63 |
3 files changed, 132 insertions, 0 deletions
diff --git a/dev-python/google-auth/Manifest b/dev-python/google-auth/Manifest index ece7dc22db47..7d797b35a71a 100644 --- a/dev-python/google-auth/Manifest +++ b/dev-python/google-auth/Manifest @@ -1,2 +1,3 @@ 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 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..20b132312687 --- /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_{7,8,9,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 +} |
