Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/botocore/files/, dev-python/botocore/
Date: Tue, 04 May 2021 12:41:37
Message-Id: 1620132072.8882c7fea126b4bbd0d71913d54ec0bf4d1122e1.mgorny@gentoo
1 commit: 8882c7fea126b4bbd0d71913d54ec0bf4d1122e1
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 4 10:20:02 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 12:41:12 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8882c7fe
7
8 dev-python/botocore: Bump to 1.20.64
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/botocore/Manifest | 1 +
13 dev-python/botocore/botocore-1.20.64.ebuild | 60 ++++++++++++++++++++++
14 .../botocore/files/botocore-1.20.64-bpo43882.patch | 35 +++++++++++++
15 3 files changed, 96 insertions(+)
16
17 diff --git a/dev-python/botocore/Manifest b/dev-python/botocore/Manifest
18 index 142357e159b..248c5903d73 100644
19 --- a/dev-python/botocore/Manifest
20 +++ b/dev-python/botocore/Manifest
21 @@ -14,3 +14,4 @@ DIST botocore-1.20.59.tar.gz 7649640 BLAKE2B 7757d85d5ecfdc65d7da607824fa9abf566
22 DIST botocore-1.20.60.tar.gz 7666269 BLAKE2B 1e32a46be67cb23bc26592036296adf1410b7d43888bbb27a156f996fe4db0f7e11a048b584671bbd9fb9f9dc3f426c43ffc7b4515227e373b97c1fa3a6ccdf4 SHA512 55bb5514a150b4fe152d2bdc501ea238cce83a81f9593e8984dd94cbeb80389f1feb9ea840ce64198aa2976d1130962f652620da540330fa9627f4fcd1299eca
23 DIST botocore-1.20.61.tar.gz 7668184 BLAKE2B 2b48af271b0a7c90f18de0e1742fbf5a7fa9ae024acbcce45c8c18bd5d81b70e83b1be1833aee9ff01e6715c4bc1494483d3f903edde9f76fe3acc5b5f950a64 SHA512 8b79a524c17a70b44587485a27dc5334db8d0f4072beccdbed84599e4405231eaeaeec0a4b0ec01ad302d19c190759b99e80a93b55d2c4f7513045452813373c
24 DIST botocore-1.20.62.tar.gz 7674812 BLAKE2B 6fec1213c13bc12937f45c2584ce52532ea75d6973e9741d18933dc399e8f0ec569d6aacdf4a9f83f997ff9898cb39c327410965d992836bbfbd9aa06ea81311 SHA512 ae25e2266955964de7be499fe17b64dd5008b1c1abec84167593b04a1bd4f7baa506f91013b292cd42aae01990ec3523d75e3529398185fdaedc358bb5048e83
25 +DIST botocore-1.20.64.tar.gz 7685481 BLAKE2B d939b262f04a67918fe61ba0789a4ac9a73bd571096fde881ad537bd7b193798960096ea6d966b49634f33454845c8227786c7bb16c0008e8b5dd84591c2e018 SHA512 a2e82988e59f05ae7050b3e8f86b379dde83f516736c9ca133c0fa678cb7c6ba5448e2165cb0ab3f4262e8e3681ede37048508092ba62313e6ce3f89700c8827
26
27 diff --git a/dev-python/botocore/botocore-1.20.64.ebuild b/dev-python/botocore/botocore-1.20.64.ebuild
28 new file mode 100644
29 index 00000000000..f051cb0e68a
30 --- /dev/null
31 +++ b/dev-python/botocore/botocore-1.20.64.ebuild
32 @@ -0,0 +1,60 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +PYTHON_COMPAT=( python3_{7..9} )
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="Low-level, data-driven core of boto 3"
42 +HOMEPAGE="https://github.com/boto/botocore"
43 +LICENSE="Apache-2.0"
44 +SLOT="0"
45 +
46 +if [[ "${PV}" == "9999" ]]; then
47 + EGIT_REPO_URI="https://github.com/boto/botocore"
48 + inherit git-r3
49 +else
50 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
51 + KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
52 +fi
53 +
54 +RDEPEND="
55 + dev-python/six[${PYTHON_USEDEP}]
56 + dev-python/jmespath[${PYTHON_USEDEP}]
57 + dev-python/python-dateutil[${PYTHON_USEDEP}]
58 + >=dev-python/urllib3-1.25.4[${PYTHON_USEDEP}]
59 +"
60 +BDEPEND="
61 + test? (
62 + dev-python/mock[${PYTHON_USEDEP}]
63 + dev-python/jsonschema[${PYTHON_USEDEP}]
64 + )
65 +"
66 +
67 +PATCHES=(
68 + "${FILESDIR}/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch"
69 + "${FILESDIR}/botocore-1.20.64-bpo43882.patch"
70 +)
71 +
72 +distutils_enable_sphinx docs/source \
73 + 'dev-python/guzzle_sphinx_theme'
74 +distutils_enable_tests nose
75 +
76 +src_prepare() {
77 + # unpin deps
78 + sed -i -e "s:>=.*':':" setup.py || die
79 + # very unstable
80 + sed -i -e 's:test_stress_test_token_bucket:_&:' \
81 + tests/functional/retries/test_bucket.py || die
82 + distutils-r1_src_prepare
83 +}
84 +
85 +python_test() {
86 + # note: suites need to be run separately as one of the unit tests
87 + # seems to be leaking mocks and breaking a few functional tests
88 + nosetests -v tests/unit ||
89 + die "unit tests failed under ${EPYTHON}"
90 + nosetests -v tests/functional ||
91 + die "functional tests failed under ${EPYTHON}"
92 +}
93
94 diff --git a/dev-python/botocore/files/botocore-1.20.64-bpo43882.patch b/dev-python/botocore/files/botocore-1.20.64-bpo43882.patch
95 new file mode 100644
96 index 00000000000..5f2e652f5ba
97 --- /dev/null
98 +++ b/dev-python/botocore/files/botocore-1.20.64-bpo43882.patch
99 @@ -0,0 +1,35 @@
100 +From 9a25a6e9ace15d5f6136a2e9dd77324bae119f46 Mon Sep 17 00:00:00 2001
101 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
102 +Date: Tue, 4 May 2021 13:15:54 +0200
103 +Subject: [PATCH] Reject endpoint URLs containing LF, CR or HT to workaround
104 + bpo43882 fix
105 +
106 +---
107 + botocore/utils.py | 4 ++++
108 + 1 file changed, 4 insertions(+)
109 +
110 +diff --git a/botocore/utils.py b/botocore/utils.py
111 +index 378972248..b154469bc 100644
112 +--- a/botocore/utils.py
113 ++++ b/botocore/utils.py
114 +@@ -977,6 +977,8 @@ class ArgumentGenerator(object):
115 +
116 +
117 + def is_valid_ipv6_endpoint_url(endpoint_url):
118 ++ if '\n' in endpoint_url or '\r' in endpoint_url or '\t' in endpoint_url:
119 ++ return False
120 + netloc = urlparse(endpoint_url).netloc
121 + return IPV6_ADDRZ_RE.match(netloc) is not None
122 +
123 +@@ -990,6 +992,8 @@ def is_valid_endpoint_url(endpoint_url):
124 + :return: True if the endpoint url is valid. False otherwise.
125 +
126 + """
127 ++ if '\n' in endpoint_url or '\r' in endpoint_url or '\t' in endpoint_url:
128 ++ return False
129 + parts = urlsplit(endpoint_url)
130 + hostname = parts.hostname
131 + if hostname is None:
132 +--
133 +2.31.1
134 +