Skip to content

Commit f407d01

Browse files
committed
dev-python/requests: new package, add 2.28.1-r1
Signed-off-by: Andreas Billmeier <[email protected]>
1 parent c45be20 commit f407d01

File tree

5 files changed

+137
-2
lines changed

5 files changed

+137
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,12 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
573573

574574
## Licenses
575575
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
576-
There are 1733 Ebuilds in total, 1722 of them have in total 1726 (34 different) licenses assigned.
576+
There are 1734 Ebuilds in total, 1723 of them have in total 1727 (34 different) licenses assigned.
577577

578578
|License| Ebuilds using it|
579579
|-------|-----|
580580
|MIT|1011|
581-
|Apache-2.0|372|
581+
|Apache-2.0|373|
582582
|GPL-3|107|
583583
|BSD|91|
584584
|LGPL-3|23|

dev-python/requests/Manifest

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
AUX requests-2.28.1-fix-charsetnormalizer-assert.patch 1345 BLAKE2B ebec5128a84ffc3a8e7197d4fb11e9f0561495675d561749acf777d62681f93e17a3b71ecc9ad3e7671ff56724be7b0ea9a272fbf9747b7b1fb3432ca70c85a7 SHA512 7668b38c43b6e5dd40aaca6b0ffee383569992c66b80c2ab6b9f59fab5dd0fd7bcc8788b9e19a27473b2a7f7b4bd1412638e6316cbbe67130aae428ce905f21c
2+
DIST requests-2.28.1.tar.gz 109805 BLAKE2B 2106be5f9e1d9f1a22de5522b5d72084f91c2849e60e33b89b2411b76cae9b1f7faac34947f69c49480d001e9b77e4dce723ee939d51591882854d510db49b59 SHA512 c123ec07171c2c7c34e4173b97750adfa313b4312d91c0d58e4eb8750361604017e5b370c23ec886d2cbf704f9074ec5ad0fa9c2cd8e6f9521532adafff39d41
3+
EBUILD requests-2.28.1-r1.ebuild 2007 BLAKE2B 7181fc8be0a42c2ad8084a05cd54a3b92cae0bb459ad29c586bdee07200a33c0e09d84794db3aa28b62f3ce6463611e47d7b35307b34dd0feca8dc872601e780 SHA512 fafd90190e0c52d0a46a434c91eded7fa0ff769309170c1a176cfff1d261983724d0be1bc6f561abb10f03b8e2ba376024e6517dfbf6da1e893b65a03e404a92
4+
MISC metadata.xml 507 BLAKE2B d70be61e245e5380ac03ce4157a9943a14fe2b18ab0e3d9828301bede431f87b5dc9656933250bf1151d20a40f2e126494b009bab80f92d15030d4b52c937ad0 SHA512 3409044924fc2481d1eb100807bbd94aff37b8b5ba78cf261d156376ac780fe26cb6c558aeaf7b6d0e342b766d572c28dcd2403021d3158439154fe7799b4d9b
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
diff --git a/setup.py b/setup.py
2+
index 23977ed77a..b679181bda 100755
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -59,7 +59,7 @@ def run_tests(self):
6+
sys.exit()
7+
8+
requires = [
9+
- "charset_normalizer>=2,<3",
10+
+ "charset_normalizer>=2,<4",
11+
"idna>=2.5,<4",
12+
"urllib3>=1.21.1,<1.27",
13+
"certifi>=2017.4.17",
14+
diff --git a/setup.cfg b/setup.cfg
15+
index 33af66eb15..0c167eb8c9 100644
16+
--- a/setup.cfg
17+
+++ b/setup.cfg
18+
@@ -5,7 +5,7 @@ provides-extra =
19+
use_chardet_on_py3
20+
requires-dist =
21+
certifi>=2017.4.17
22+
- charset_normalizer>=2,<3
23+
+ charset_normalizer>=2,<4
24+
idna>=2.5,<4
25+
urllib3>=1.21.1,<1.27
26+
27+
diff --git a/requests/__init__.py b/requests/__init__.py
28+
index 7ac8e297b8..5812c85d8a 100644
29+
--- a/requests/__init__.py
30+
+++ b/requests/__init__.py
31+
@@ -80,8 +80,8 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver
32+
elif charset_normalizer_version:
33+
major, minor, patch = charset_normalizer_version.split(".")[:3]
34+
major, minor, patch = int(major), int(minor), int(patch)
35+
- # charset_normalizer >= 2.0.0 < 3.0.0
36+
- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)
37+
+ # charset_normalizer >= 2.0.0 < 4.0.0
38+
+ assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0)
39+
else:
40+
raise Exception("You need either charset_normalizer or chardet installed")
41+

dev-python/requests/metadata.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3+
<pkgmetadata>
4+
<maintainer type="project">
5+
<email>[email protected]</email>
6+
<name>Andreas Billmeier</name>
7+
</maintainer>
8+
<upstream>
9+
<remote-id type="pypi">requests</remote-id>
10+
<remote-id type="github">psf/requests</remote-id>
11+
<maintainer status="unknown">
12+
<email>[email protected]</email>
13+
<name>Kenneth Reitz</name>
14+
</maintainer>
15+
</upstream>
16+
</pkgmetadata>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Copyright 1999-2023 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
5+
EAPI=7
6+
7+
DISTUTILS_USE_PEP517=setuptools
8+
PYTHON_COMPAT=( python3_{9..11} pypy3 )
9+
PYTHON_REQ_USE="threads(+)"
10+
11+
inherit distutils-r1
12+
13+
DESCRIPTION="HTTP library for human beings"
14+
HOMEPAGE="
15+
https://requests.readthedocs.io/
16+
https://github.com/psf/requests/
17+
https://pypi.org/project/requests/
18+
"
19+
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
20+
21+
LICENSE="Apache-2.0"
22+
SLOT="0"
23+
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
24+
IUSE="socks5 test-rust"
25+
26+
RDEPEND="
27+
>=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
28+
dev-python/charset_normalizer[${PYTHON_USEDEP}]
29+
<dev-python/idna-4[${PYTHON_USEDEP}]
30+
<dev-python/urllib3-1.27[${PYTHON_USEDEP}]
31+
socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
32+
"
33+
34+
BDEPEND="
35+
test? (
36+
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
37+
dev-python/pytest-mock[${PYTHON_USEDEP}]
38+
>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
39+
test-rust? (
40+
dev-python/trustme[${PYTHON_USEDEP}]
41+
)
42+
)
43+
"
44+
45+
PATCHES=(
46+
"${FILESDIR}"/${PN}-2.28.0-drop-dependency-warnings.patch
47+
# https://github.com/psf/requests/pull/6261
48+
"${FILESDIR}"/${PN}-2.28.1-fix-charsetnormalizer-assert.patch
49+
)
50+
51+
distutils_enable_tests pytest
52+
53+
python_test() {
54+
local EPYTEST_DESELECT=(
55+
# Internet (doctests)
56+
requests/__init__.py::requests
57+
requests/api.py::requests.api.request
58+
requests/models.py::requests.models.PreparedRequest
59+
requests/sessions.py::requests.sessions.Session
60+
# require IPv4 interface in 10.* range
61+
tests/test_requests.py::TestTimeout::test_connect_timeout
62+
tests/test_requests.py::TestTimeout::test_total_timeout_connect
63+
# TODO: openssl?
64+
tests/test_requests.py::TestRequests::test_pyopenssl_redirect
65+
)
66+
67+
if ! has_version "dev-python/trustme[${PYTHON_USEDEP}]"; then
68+
EPYTEST_DESELECT+=(
69+
tests/test_requests.py::TestRequests::test_https_warnings
70+
)
71+
fi
72+
73+
epytest
74+
}

0 commit comments

Comments
 (0)