Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests/
Date: Mon, 03 Jan 2022 17:50:05
Message-Id: 1641232148.4d0e2aad5aacbc1900078ba4d7e1a04506f5a828.arthurzam@gentoo
1 commit: 4d0e2aad5aacbc1900078ba4d7e1a04506f5a828
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 3 17:43:32 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 3 17:49:08 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d0e2aad
7
8 dev-python/requests: add 2.27.0
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/requests/Manifest | 1 +
13 dev-python/requests/requests-2.27.0.ebuild | 63 ++++++++++++++++++++++++++++++
14 2 files changed, 64 insertions(+)
15
16 diff --git a/dev-python/requests/Manifest b/dev-python/requests/Manifest
17 index ccbcf2aecad2..86239771fdbe 100644
18 --- a/dev-python/requests/Manifest
19 +++ b/dev-python/requests/Manifest
20 @@ -1 +1,2 @@
21 DIST requests-2.26.0.tar.gz 104433 BLAKE2B 49872a0602ab0e6b3838c4ff84d6611c5265dd584a1902b51d5903a2fc566b97f7a70973a9244adf190e9249bc6d1fa448a2164a31d125ab6b3dac172ae62e1c SHA512 c3397d77f0d2f1afb05661c4b98adad6c1ddaf360906254150b33ab0d9479fd306905bd6d61b8cf8becd9a40bdcf9b03542e8267c644ef19f03f44bfca0bc461
22 +DIST requests-2.27.0.tar.gz 108487 BLAKE2B a24e9071d39b8677309c5a847910cfb8bf91b22b522bebc8166e9fb3a36ce9783bb23ad725d43aa19da5cf3a1b11bfc21766a2995ba9810b6c973b03a7acdd1b SHA512 9d43c637bebb1b98fc25f895308673153686ef0b97e5d568526fb63c348dc939fab620fd7c550fef0a2977e98a466c8dae0710cef5b969b28b9a4f3a1f9940f5
23
24 diff --git a/dev-python/requests/requests-2.27.0.ebuild b/dev-python/requests/requests-2.27.0.ebuild
25 new file mode 100644
26 index 000000000000..eac11c53b979
27 --- /dev/null
28 +++ b/dev-python/requests/requests-2.27.0.ebuild
29 @@ -0,0 +1,63 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
37 +PYTHON_REQ_USE="threads(+)"
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="HTTP library for human beings"
42 +HOMEPAGE="https://requests.readthedocs.io/"
43 +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
44 +
45 +LICENSE="Apache-2.0"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
48 +IUSE="socks5"
49 +
50 +RDEPEND="
51 + >=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
52 + dev-python/charset_normalizer[${PYTHON_USEDEP}]
53 + <dev-python/idna-4[${PYTHON_USEDEP}]
54 + <dev-python/urllib3-1.27[${PYTHON_USEDEP}]
55 + socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
56 +"
57 +
58 +BDEPEND="
59 + test? (
60 + dev-python/pytest-httpbin[${PYTHON_USEDEP}]
61 + dev-python/pytest-mock[${PYTHON_USEDEP}]
62 + >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
63 + !alpha? ( !hppa? ( !ia64? (
64 + dev-python/trustme[${PYTHON_USEDEP}]
65 + ) ) )
66 + )
67 +"
68 +
69 +distutils_enable_tests pytest
70 +
71 +python_test() {
72 + local EPYTEST_DESELECT=(
73 + # Internet (doctests)
74 + requests/__init__.py::requests
75 + requests/api.py::requests.api.request
76 + requests/models.py::requests.models.PreparedRequest
77 + requests/sessions.py::requests.sessions.Session
78 + # require IPv4 interface in 10.* range
79 + tests/test_requests.py::TestTimeout::test_connect_timeout
80 + tests/test_requests.py::TestTimeout::test_total_timeout_connect
81 + # TODO: openssl?
82 + tests/test_requests.py::TestRequests::test_pyopenssl_redirect
83 + )
84 +
85 + if ! has_version "dev-python/trustme[${PYTHON_USEDEP}]"; then
86 + EPYTEST_DESELECT+=(
87 + tests/test_requests.py::TestRequests::test_https_warnings
88 + )
89 + fi
90 +
91 + epytest
92 +}