dev-python/oauth2client: treeclean

Closes: https://bugs.gentoo.org/733064
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
David Seifert
2023-03-18 17:42:42 +01:00
parent e6d4c9e216
commit 96f18d1fb9
6 changed files with 0 additions and 188 deletions
-2
View File
@@ -1,2 +0,0 @@
DIST oauth2client-4.1.3-fixes-20230207.patch 21827 BLAKE2B c04886be0efad92fff75f0d78c5597bbc386939001f1fc5d094f96899bcc25bbd80c4e620cdf401a45c7ed48a8c83515adc98a190cecbbd345f55b78ca4a0257 SHA512 4d648aff20e56628c6fa916627851d7bb50f927c1cb1a056e115130e0aec128e7e2a5571b4a35a167bbcf01762669c22008cffd5530e0006846250d32b3f8093
DIST oauth2client-4.1.3.tar.gz 185589 BLAKE2B 6cd61448e0d55cef7f2ba640c8cbb50ac83e76d0993391eb0acb3e156f937fcdee80576c9d45d505235a9f266495069664ccbfafd649a4e2d7a0990517ee8cb6 SHA512 80f49e09a6dd6767307a2c278544926fbf20b4f55e4cf83563ac7a7c1043622bd3c8c7fcf6de62896b623ca8c7947b309a5e6bf2b7cb0fccff3ff7634386b287
@@ -1,35 +0,0 @@
diff --git a/oauth2client/contrib/xsrfutil.py b/oauth2client/contrib/xsrfutil.py
index 7c3ec03..20f35c9 100644
--- a/oauth2client/contrib/xsrfutil.py
+++ b/oauth2client/contrib/xsrfutil.py
@@ -44,7 +44,7 @@ def generate_token(key, user_id, action_id='', when=None):
Returns:
A string XSRF protection token.
"""
- digester = hmac.new(_helpers._to_bytes(key, encoding='utf-8'))
+ digester = hmac.new(_helpers._to_bytes(key, encoding='utf-8'), digestmod='MD5')
digester.update(_helpers._to_bytes(str(user_id), encoding='utf-8'))
digester.update(DELIMITER)
digester.update(_helpers._to_bytes(action_id, encoding='utf-8'))
diff --git a/tests/contrib/test_xsrfutil.py b/tests/contrib/test_xsrfutil.py
index 3115827..deae568 100644
--- a/tests/contrib/test_xsrfutil.py
+++ b/tests/contrib/test_xsrfutil.py
@@ -54,7 +54,7 @@ class Test_generate_token(unittest.TestCase):
TEST_USER_ID_1,
action_id=TEST_ACTION_ID_1,
when=TEST_TIME)
- hmac.new.assert_called_once_with(TEST_KEY)
+ hmac.new.assert_called_once_with(TEST_KEY, digestmod='MD5')
digester.digest.assert_called_once_with()
expected_digest_calls = [
@@ -87,7 +87,7 @@ class Test_generate_token(unittest.TestCase):
TEST_USER_ID_1,
action_id=TEST_ACTION_ID_1)
- hmac.new.assert_called_once_with(TEST_KEY)
+ hmac.new.assert_called_once_with(TEST_KEY, digestmod='MD5')
time.time.assert_called_once_with()
digester.digest.assert_called_once_with()
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="github">googleapis/oauth2client</remote-id>
<remote-id type="pypi">oauth2client</remote-id>
</upstream>
</pkgmetadata>
@@ -1,52 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..10} )
inherit distutils-r1
DESCRIPTION="Library for accessing resources protected by OAuth 2.0"
HOMEPAGE="https://github.com/googleapis/oauth2client"
SRC_URI="https://github.com/googleapis/oauth2client/archive/v${PV/_p/-post}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/${P/_p/-post}
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
RDEPEND="
>=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
>=dev-python/pyasn1-modules-0.0.5[${PYTHON_USEDEP}]
>=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
>=dev-python/six-1.6.1[${PYTHON_USEDEP}]
dev-python/keyring[${PYTHON_USEDEP}]
!<=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/flask[${PYTHON_USEDEP}]
dev-python/sqlalchemy[${PYTHON_USEDEP}]
)
"
distutils_enable_tests nose
PATCHES=(
"${FILESDIR}/oauth2client-4.1.3-py38.patch"
)
python_test() {
nosetests -v \
-e appengine \
-e django_util \
-e test_multiprocess_file_storage \
-e test_bad_positional || die "tests fail with ${EPYTHON}"
# appengine - requires appengine
# django_util - requires django
# test_multiprocess_file_storage - requires fasteners
# test_bad_positional - expects TypeError, gets ValueError
}
@@ -1,85 +0,0 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1
DESCRIPTION="Library for accessing resources protected by OAuth 2.0"
HOMEPAGE="https://github.com/googleapis/oauth2client"
SRC_URI="
https://github.com/googleapis/oauth2client/archive/v${PV/_p/-post}.tar.gz -> ${P}.tar.gz
https://dev.gentoo.org/~robbat2/distfiles/oauth2client-4.1.3-fixes-20230207.patch
"
S="${WORKDIR}"/${P/_p/-post}
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
# This package supports 3 different crypto options, but tests ALL of them
CRYPTO_A=">=dev-python/pycryptodome-2.6[${PYTHON_USEDEP}]"
CRYPTO_B="dev-python/pyopenssl[${PYTHON_USEDEP}]"
CRYPTO_C="(
>=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
>=dev-python/pyasn1-modules-0.0.5[${PYTHON_USEDEP}]
>=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
)"
RDEPEND="
>=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
>=dev-python/six-1.6.1[${PYTHON_USEDEP}]
|| ( ${CRYPTO_A} ${CRYPTO_B} ${CRYPTO_C} )
dev-python/keyring[${PYTHON_USEDEP}]
!<=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
"
# Not well-tested upstream, and broken:
# django dev-python/django[${PYTHON_USEDEP}]
# flask dev-python/flask[${PYTHON_USEDEP}]
BDEPEND="
test? (
dev-python/mock[${PYTHON_USEDEP}]
dev-python/sqlalchemy[${PYTHON_USEDEP}]
dev-python/fasteners[${PYTHON_USEDEP}]
${CRYPTO_A}
${CRYPTO_B}
${CRYPTO_C}
)
"
distutils_enable_tests pytest
PATCHES=(
"${DISTDIR}/oauth2client-4.1.3-fixes-20230207.patch"
)
src_prepare() {
default
# These contrib modules are broken upstream:
REMOVE=(
# django
"${S}"/oauth2client/contrib/django_util/
"${S}"/samples/django/
"${S}"/tests/contrib/django_util/
"${S}"/docs/source/oauth2client.contrib.django*
# flask
"${S}"/docs/source/oauth2client.contrib.flask_util.rst
"${S}"/oauth2client/contrib/flask_util.py
"${S}"/tests/contrib/test_flask_util.py
)
rm -rf "${REMOVE[@]}"
}
python_test() {
TEST_ARGS=(
# appengine - requires appengine
# django_util - requires django, contrib module broken upstream
# flash - requires flask, contrib module broken upstream
--ignore-glob='*appengine*'
)
epytest "${TEST_ARGS[@]}" || die "tests fail with ${EPYTHON}"
}
-1
View File
@@ -290,7 +290,6 @@ app-misc/goobook
dev-python/gcs-oauth2-boto-plugin
dev-python/google-apitools
dev-python/google-reauth-python
dev-python/oauth2client
# Michał Górny <mgorny@gentoo.org> (2023-02-02)
# dev-python/citeproc-py requires dev-python/nose and is not maintained