dev-python/requests: new package, add 2.28.1-r1

Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
Andreas Billmeier 2023-02-26 10:43:46 +01:00 committed by Andreas Billmeier
parent c45be20a37
commit f407d01f46
Signed by: onkelbeh
GPG Key ID: E6DB12C8C550F3C0
5 changed files with 137 additions and 2 deletions

View File

@ -573,12 +573,12 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
## Licenses
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.
There are 1733 Ebuilds in total, 1722 of them have in total 1726 (34 different) licenses assigned.
There are 1734 Ebuilds in total, 1723 of them have in total 1727 (34 different) licenses assigned.
|License| Ebuilds using it|
|-------|-----|
|MIT|1011|
|Apache-2.0|372|
|Apache-2.0|373|
|GPL-3|107|
|BSD|91|
|LGPL-3|23|

View File

@ -0,0 +1,4 @@
AUX requests-2.28.1-fix-charsetnormalizer-assert.patch 1345 BLAKE2B ebec5128a84ffc3a8e7197d4fb11e9f0561495675d561749acf777d62681f93e17a3b71ecc9ad3e7671ff56724be7b0ea9a272fbf9747b7b1fb3432ca70c85a7 SHA512 7668b38c43b6e5dd40aaca6b0ffee383569992c66b80c2ab6b9f59fab5dd0fd7bcc8788b9e19a27473b2a7f7b4bd1412638e6316cbbe67130aae428ce905f21c
DIST requests-2.28.1.tar.gz 109805 BLAKE2B 2106be5f9e1d9f1a22de5522b5d72084f91c2849e60e33b89b2411b76cae9b1f7faac34947f69c49480d001e9b77e4dce723ee939d51591882854d510db49b59 SHA512 c123ec07171c2c7c34e4173b97750adfa313b4312d91c0d58e4eb8750361604017e5b370c23ec886d2cbf704f9074ec5ad0fa9c2cd8e6f9521532adafff39d41
EBUILD requests-2.28.1-r1.ebuild 2007 BLAKE2B 7181fc8be0a42c2ad8084a05cd54a3b92cae0bb459ad29c586bdee07200a33c0e09d84794db3aa28b62f3ce6463611e47d7b35307b34dd0feca8dc872601e780 SHA512 fafd90190e0c52d0a46a434c91eded7fa0ff769309170c1a176cfff1d261983724d0be1bc6f561abb10f03b8e2ba376024e6517dfbf6da1e893b65a03e404a92
MISC metadata.xml 507 BLAKE2B d70be61e245e5380ac03ce4157a9943a14fe2b18ab0e3d9828301bede431f87b5dc9656933250bf1151d20a40f2e126494b009bab80f92d15030d4b52c937ad0 SHA512 3409044924fc2481d1eb100807bbd94aff37b8b5ba78cf261d156376ac780fe26cb6c558aeaf7b6d0e342b766d572c28dcd2403021d3158439154fe7799b4d9b

View File

@ -0,0 +1,41 @@
diff --git a/setup.py b/setup.py
index 23977ed77a..b679181bda 100755
--- a/setup.py
+++ b/setup.py
@@ -59,7 +59,7 @@ def run_tests(self):
sys.exit()
requires = [
- "charset_normalizer>=2,<3",
+ "charset_normalizer>=2,<4",
"idna>=2.5,<4",
"urllib3>=1.21.1,<1.27",
"certifi>=2017.4.17",
diff --git a/setup.cfg b/setup.cfg
index 33af66eb15..0c167eb8c9 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,7 @@ provides-extra =
use_chardet_on_py3
requires-dist =
certifi>=2017.4.17
- charset_normalizer>=2,<3
+ charset_normalizer>=2,<4
idna>=2.5,<4
urllib3>=1.21.1,<1.27
diff --git a/requests/__init__.py b/requests/__init__.py
index 7ac8e297b8..5812c85d8a 100644
--- a/requests/__init__.py
+++ b/requests/__init__.py
@@ -80,8 +80,8 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver
elif charset_normalizer_version:
major, minor, patch = charset_normalizer_version.split(".")[:3]
major, minor, patch = int(major), int(minor), int(patch)
- # charset_normalizer >= 2.0.0 < 3.0.0
- assert (2, 0, 0) <= (major, minor, patch) < (3, 0, 0)
+ # charset_normalizer >= 2.0.0 < 4.0.0
+ assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0)
else:
raise Exception("You need either charset_normalizer or chardet installed")

View File

@ -0,0 +1,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>b@edevau.net</email>
<name>Andreas Billmeier</name>
</maintainer>
<upstream>
<remote-id type="pypi">requests</remote-id>
<remote-id type="github">psf/requests</remote-id>
<maintainer status="unknown">
<email>me@kennethreitz.org</email>
<name>Kenneth Reitz</name>
</maintainer>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,74 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
EAPI=7
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="HTTP library for human beings"
HOMEPAGE="
https://requests.readthedocs.io/
https://github.com/psf/requests/
https://pypi.org/project/requests/
"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="socks5 test-rust"
RDEPEND="
>=dev-python/certifi-2017.4.17[${PYTHON_USEDEP}]
dev-python/charset_normalizer[${PYTHON_USEDEP}]
<dev-python/idna-4[${PYTHON_USEDEP}]
<dev-python/urllib3-1.27[${PYTHON_USEDEP}]
socks5? ( >=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}] )
"
BDEPEND="
test? (
dev-python/pytest-httpbin[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
test-rust? (
dev-python/trustme[${PYTHON_USEDEP}]
)
)
"
PATCHES=(
"${FILESDIR}"/${PN}-2.28.0-drop-dependency-warnings.patch
# https://github.com/psf/requests/pull/6261
"${FILESDIR}"/${PN}-2.28.1-fix-charsetnormalizer-assert.patch
)
distutils_enable_tests pytest
python_test() {
local EPYTEST_DESELECT=(
# Internet (doctests)
requests/__init__.py::requests
requests/api.py::requests.api.request
requests/models.py::requests.models.PreparedRequest
requests/sessions.py::requests.sessions.Session
# require IPv4 interface in 10.* range
tests/test_requests.py::TestTimeout::test_connect_timeout
tests/test_requests.py::TestTimeout::test_total_timeout_connect
# TODO: openssl?
tests/test_requests.py::TestRequests::test_pyopenssl_redirect
)
if ! has_version "dev-python/trustme[${PYTHON_USEDEP}]"; then
EPYTEST_DESELECT+=(
tests/test_requests.py::TestRequests::test_https_warnings
)
fi
epytest
}