* [gentoo-commits] repo/gentoo:master commit in: dev-python/botocore/files/, dev-python/botocore/
@ 2021-05-04 12:41 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2021-05-04 12:41 UTC (permalink / raw
To: gentoo-commits
commit: 8882c7fea126b4bbd0d71913d54ec0bf4d1122e1
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 4 10:20:02 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 4 12:41:12 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8882c7fe
dev-python/botocore: Bump to 1.20.64
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/botocore/Manifest | 1 +
dev-python/botocore/botocore-1.20.64.ebuild | 60 ++++++++++++++++++++++
.../botocore/files/botocore-1.20.64-bpo43882.patch | 35 +++++++++++++
3 files changed, 96 insertions(+)
diff --git a/dev-python/botocore/Manifest b/dev-python/botocore/Manifest
index 142357e159b..248c5903d73 100644
--- a/dev-python/botocore/Manifest
+++ b/dev-python/botocore/Manifest
@@ -14,3 +14,4 @@ DIST botocore-1.20.59.tar.gz 7649640 BLAKE2B 7757d85d5ecfdc65d7da607824fa9abf566
DIST botocore-1.20.60.tar.gz 7666269 BLAKE2B 1e32a46be67cb23bc26592036296adf1410b7d43888bbb27a156f996fe4db0f7e11a048b584671bbd9fb9f9dc3f426c43ffc7b4515227e373b97c1fa3a6ccdf4 SHA512 55bb5514a150b4fe152d2bdc501ea238cce83a81f9593e8984dd94cbeb80389f1feb9ea840ce64198aa2976d1130962f652620da540330fa9627f4fcd1299eca
DIST botocore-1.20.61.tar.gz 7668184 BLAKE2B 2b48af271b0a7c90f18de0e1742fbf5a7fa9ae024acbcce45c8c18bd5d81b70e83b1be1833aee9ff01e6715c4bc1494483d3f903edde9f76fe3acc5b5f950a64 SHA512 8b79a524c17a70b44587485a27dc5334db8d0f4072beccdbed84599e4405231eaeaeec0a4b0ec01ad302d19c190759b99e80a93b55d2c4f7513045452813373c
DIST botocore-1.20.62.tar.gz 7674812 BLAKE2B 6fec1213c13bc12937f45c2584ce52532ea75d6973e9741d18933dc399e8f0ec569d6aacdf4a9f83f997ff9898cb39c327410965d992836bbfbd9aa06ea81311 SHA512 ae25e2266955964de7be499fe17b64dd5008b1c1abec84167593b04a1bd4f7baa506f91013b292cd42aae01990ec3523d75e3529398185fdaedc358bb5048e83
+DIST botocore-1.20.64.tar.gz 7685481 BLAKE2B d939b262f04a67918fe61ba0789a4ac9a73bd571096fde881ad537bd7b193798960096ea6d966b49634f33454845c8227786c7bb16c0008e8b5dd84591c2e018 SHA512 a2e82988e59f05ae7050b3e8f86b379dde83f516736c9ca133c0fa678cb7c6ba5448e2165cb0ab3f4262e8e3681ede37048508092ba62313e6ce3f89700c8827
diff --git a/dev-python/botocore/botocore-1.20.64.ebuild b/dev-python/botocore/botocore-1.20.64.ebuild
new file mode 100644
index 00000000000..f051cb0e68a
--- /dev/null
+++ b/dev-python/botocore/botocore-1.20.64.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit distutils-r1
+
+DESCRIPTION="Low-level, data-driven core of boto 3"
+HOMEPAGE="https://github.com/boto/botocore"
+LICENSE="Apache-2.0"
+SLOT="0"
+
+if [[ "${PV}" == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/boto/botocore"
+ inherit git-r3
+else
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+RDEPEND="
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/jmespath[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ >=dev-python/urllib3-1.25.4[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/jsonschema[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch"
+ "${FILESDIR}/botocore-1.20.64-bpo43882.patch"
+)
+
+distutils_enable_sphinx docs/source \
+ 'dev-python/guzzle_sphinx_theme'
+distutils_enable_tests nose
+
+src_prepare() {
+ # unpin deps
+ sed -i -e "s:>=.*':':" setup.py || die
+ # very unstable
+ sed -i -e 's:test_stress_test_token_bucket:_&:' \
+ tests/functional/retries/test_bucket.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ # note: suites need to be run separately as one of the unit tests
+ # seems to be leaking mocks and breaking a few functional tests
+ nosetests -v tests/unit ||
+ die "unit tests failed under ${EPYTHON}"
+ nosetests -v tests/functional ||
+ die "functional tests failed under ${EPYTHON}"
+}
diff --git a/dev-python/botocore/files/botocore-1.20.64-bpo43882.patch b/dev-python/botocore/files/botocore-1.20.64-bpo43882.patch
new file mode 100644
index 00000000000..5f2e652f5ba
--- /dev/null
+++ b/dev-python/botocore/files/botocore-1.20.64-bpo43882.patch
@@ -0,0 +1,35 @@
+From 9a25a6e9ace15d5f6136a2e9dd77324bae119f46 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 4 May 2021 13:15:54 +0200
+Subject: [PATCH] Reject endpoint URLs containing LF, CR or HT to workaround
+ bpo43882 fix
+
+---
+ botocore/utils.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/botocore/utils.py b/botocore/utils.py
+index 378972248..b154469bc 100644
+--- a/botocore/utils.py
++++ b/botocore/utils.py
+@@ -977,6 +977,8 @@ class ArgumentGenerator(object):
+
+
+ def is_valid_ipv6_endpoint_url(endpoint_url):
++ if '\n' in endpoint_url or '\r' in endpoint_url or '\t' in endpoint_url:
++ return False
+ netloc = urlparse(endpoint_url).netloc
+ return IPV6_ADDRZ_RE.match(netloc) is not None
+
+@@ -990,6 +992,8 @@ def is_valid_endpoint_url(endpoint_url):
+ :return: True if the endpoint url is valid. False otherwise.
+
+ """
++ if '\n' in endpoint_url or '\r' in endpoint_url or '\t' in endpoint_url:
++ return False
+ parts = urlsplit(endpoint_url)
+ hostname = parts.hostname
+ if hostname is None:
+--
+2.31.1
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/botocore/files/, dev-python/botocore/
@ 2022-06-30 4:27 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2022-06-30 4:27 UTC (permalink / raw
To: gentoo-commits
commit: ad539b83f7d67a81f461535c6d8a27781584c27f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 03:56:06 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 04:27:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad539b83
dev-python/botocore: Sync the live ebuild
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/botocore/botocore-9999.ebuild | 4 --
.../botocore/files/botocore-1.26.0-py311.patch | 54 ----------------------
2 files changed, 58 deletions(-)
diff --git a/dev-python/botocore/botocore-9999.ebuild b/dev-python/botocore/botocore-9999.ebuild
index 2fb86c59b25e..830c713f6036 100644
--- a/dev-python/botocore/botocore-9999.ebuild
+++ b/dev-python/botocore/botocore-9999.ebuild
@@ -37,10 +37,6 @@ BDEPEND="
)
"
-PATCHES=(
- "${FILESDIR}/botocore-1.26.0-py311.patch"
-)
-
distutils_enable_sphinx docs/source \
'dev-python/guzzle_sphinx_theme'
distutils_enable_tests pytest
diff --git a/dev-python/botocore/files/botocore-1.26.0-py311.patch b/dev-python/botocore/files/botocore-1.26.0-py311.patch
deleted file mode 100644
index 8caa8765c008..000000000000
--- a/dev-python/botocore/files/botocore-1.26.0-py311.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 46a3d92e29a03f547d85861bb6e21281b6a42e60 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 14 May 2022 19:38:23 +0200
-Subject: [PATCH] Replace deprecated inspect.formatargspec() with
- inspect.signature()
-
-Originally submitted by Hugo van Kemenade as #2507. Modified by me
-to remove the first positional parameter like the old code did.
----
- botocore/docs/method.py | 21 +++++++++++++--------
- 1 file changed, 13 insertions(+), 8 deletions(-)
-
-diff --git a/botocore/docs/method.py b/botocore/docs/method.py
-index 0f7c60f6c..44c97d6e4 100644
---- a/botocore/docs/method.py
-+++ b/botocore/docs/method.py
-@@ -11,6 +11,7 @@
- # ANY KIND, either express or implied. See the License for the specific
- # language governing permissions and limitations under the License.
- import inspect
-+import types
-
- from botocore.docs.example import (
- RequestExampleDocumenter,
-@@ -101,14 +102,18 @@ def document_custom_signature(
- :param exclude: The names of the parameters to exclude from
- documentation.
- """
-- argspec = inspect.getfullargspec(method)
-- signature_params = inspect.formatargspec(
-- args=argspec.args[1:],
-- varargs=argspec.varargs,
-- varkw=argspec.varkw,
-- defaults=argspec.defaults,
-- )
-- signature_params = signature_params.lstrip('(')
-+ signature = inspect.signature(method)
-+ # "raw" class methods are FunctionType and they include "self" param
-+ # object methods are MethodType and they skip the "self" param
-+ if isinstance(method, types.FunctionType):
-+ self_param = next(iter(signature.parameters))
-+ self_kind = signature.parameters[self_param].kind
-+ # safety check that we got the right parameter
-+ assert self_kind == inspect.Parameter.POSITIONAL_OR_KEYWORD
-+ new_params = signature.parameters.copy()
-+ del new_params[self_param]
-+ signature = signature.replace(parameters=new_params.values())
-+ signature_params = str(signature).lstrip('(')
- signature_params = signature_params.rstrip(')')
- section.style.start_sphinx_py_method(name, signature_params)
-
---
-2.35.1
-
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-30 4:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-30 4:27 [gentoo-commits] repo/gentoo:master commit in: dev-python/botocore/files/, dev-python/botocore/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2021-05-04 12:41 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox