diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-01-07 22:48:01 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-01-07 22:48:01 +0000 |
commit | c3bc61051d7f12b4c682efa7a5460bbc8815649e (patch) | |
tree | b6d19e96ba3c397fb8278eeb9b68170db92630ba /dev-python/cheroot | |
parent | 3517852e3b8a68d1e997770fc0650c5053bafc6c (diff) |
gentoo resync : 07.01.2022
Diffstat (limited to 'dev-python/cheroot')
-rw-r--r-- | dev-python/cheroot/Manifest | 3 | ||||
-rw-r--r-- | dev-python/cheroot/cheroot-8.6.0.ebuild | 76 | ||||
-rw-r--r-- | dev-python/cheroot/files/cheroot-8.6.0-remove-pypytools-dep.patch | 74 |
3 files changed, 153 insertions, 0 deletions
diff --git a/dev-python/cheroot/Manifest b/dev-python/cheroot/Manifest index ede6ab15074e..c1e84d44f5f6 100644 --- a/dev-python/cheroot/Manifest +++ b/dev-python/cheroot/Manifest @@ -1,3 +1,6 @@ +AUX cheroot-8.6.0-remove-pypytools-dep.patch 2757 BLAKE2B 97628fd6590dbe41e34bf0b93bc1062c424097aeea26a86891e2d2fc049fb7ee7a990fc9b9d3dba9406bdd344e3c25cdd08907aaac11e64d78c73b3ccd9b3fa5 SHA512 ddc88d93c795ea25c56d0b2a1bfee1b0f9c900ec2594d69aa91c639575c86c1fb89accc95992587db76d5c4e438a34f2eceac480c60a5470aee5ecd996140e44 DIST cheroot-8.5.2.tar.gz 113183 BLAKE2B a3b60a9df3f34913cfb8c99fbdc8580ea436710c7979e296c18a6981f54bb959d6a300f4cf9d4e608fe2987f58d5fc6d2b8f57bca800e461d31c77ac61fd6b01 SHA512 245c4157f5e11741d94375099878ef5b31945412a2b02961502e762b9770fd968f4f977fe2d74744aa6596c668079d7f07b6f129fa11438783a95d3a5ee088fa +DIST cheroot-8.6.0.tar.gz 134779 BLAKE2B 97d1a9bf0a8d72d3204972934aa3ac4c97246b413edebd9f38caa802a5343acc426f137addfdc0faec58f6af2d62bc22023e93b14e1b0b07f6be9ffb12e78306 SHA512 26e48c935fe32d4ce3cf6ae20b5b272416ca53bd8496527c2958ec2ebe87529c831f283ae900e13271b610e39531b682df0376935ecc3bcfcca11c299cd2a893 EBUILD cheroot-8.5.2.ebuild 1766 BLAKE2B 4505d71f0eb92f9352ef79bb2616caa299aa77533309ea3e4d4314eae613b3f3c21110b2eb5486974f958fb500c5c06c7c2f66c1ebc3e035a39f98cdfd5e73c4 SHA512 d5fbefb34a262e4fecc00c3d09371e0d51b61cb71f5f48ca5e0ec6afbda4b93dfdac6a218fc86c62c87e845177a3cc296ae89fe64a41dedbfcb0df87041205f0 +EBUILD cheroot-8.6.0.ebuild 1903 BLAKE2B 94e615d297253e4e1c3d14db1582973df7d064b1550f9bc7af1c0d6bb09c1fc93c2f34f8a9be43c2bf516bbdbd104132144f682e8be11e8656bbe8d917ac56e4 SHA512 e51b4d0bbb1dcf94c19e0a365276c4b3099ff294df23488879825b5adb4433e0f09d24e31b8934b042fe84c1ad3b53911bda4e066b79feadd48ae64615b028a2 MISC metadata.xml 496 BLAKE2B cd878a31050fec99c8440433368e7e017670a9f7e8c0a921f532f1de73860bff076bab0d841fdc9fe94a7f8182aff6671fd9188925cf72f3059ea81f7f7cf613 SHA512 cdab3fb8b4a1d7eb1cb2a7d8d72537139bbd452c9f7915024028c3526c7b903ee70c3e2e4c912611a8ae02569ba961df86d08cbddf329c7db27d64220b52aaaf diff --git a/dev-python/cheroot/cheroot-8.6.0.ebuild b/dev-python/cheroot/cheroot-8.6.0.ebuild new file mode 100644 index 000000000000..7cf72b10dda7 --- /dev/null +++ b/dev-python/cheroot/cheroot-8.6.0.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 + +DESCRIPTION="High-performance, pure-Python HTTP server used by CherryPy" +HOMEPAGE="https://cherrypy.org/ + https://pypi.org/project/cheroot/ + https://github.com/cherrypy/cheroot/" +SRC_URI="mirror://pypi/C/${PN/c/C}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~x86" + +RDEPEND=" + >=dev-python/six-1.11.0[${PYTHON_USEDEP}] + >=dev-python/more-itertools-2.6[${PYTHON_USEDEP}] + dev-python/jaraco-functools[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + ${RDEPEND} + dev-python/jaraco-context[${PYTHON_USEDEP}] + dev-python/jaraco-text[${PYTHON_USEDEP}] + dev-python/portend[${PYTHON_USEDEP}] + dev-python/pytest-forked[${PYTHON_USEDEP}] + >=dev-python/pytest-mock-1.11.0[${PYTHON_USEDEP}] + dev-python/requests-toolbelt[${PYTHON_USEDEP}] + dev-python/requests-unixsocket[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + !ia64? ( + dev-python/pyopenssl[${PYTHON_USEDEP}] + dev-python/trustme[${PYTHON_USEDEP}] + ) + ) +" + +PATCHES=( + # Bad dep (upstream gone, only PyPi package, has py2 code, etc) + "${FILESDIR}/${PN}-8.6.0-remove-pypytools-dep.patch" +) + +distutils_enable_tests pytest + +python_prepare_all() { + sed -e "s/use_scm_version=True/version='${PV}'/" -i setup.py || die + sed -e '/setuptools_scm/d' -i setup.cfg || die + sed -e '/--cov/d' \ + -e '/--testmon/d' \ + -e '/--numproc/d' \ + -i pytest.ini || die + + # broken + sed -e '/False.*localhost/d' \ + -i cheroot/test/test_ssl.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + local EPYTEST_IGNORE=() + if ! has_version "dev-python/pyopenssl[${PYTHON_USEDEP}]" || + ! has_version "dev-python/trustme[${PYTHON_USEDEP}]" + then + EPYTEST_IGNORE+=( + lib/cheroot/test/test_ssl.py + ) + fi + + cd "${BUILD_DIR}" || die + epytest +} diff --git a/dev-python/cheroot/files/cheroot-8.6.0-remove-pypytools-dep.patch b/dev-python/cheroot/files/cheroot-8.6.0-remove-pypytools-dep.patch new file mode 100644 index 000000000000..f1f4fac26557 --- /dev/null +++ b/dev-python/cheroot/files/cheroot-8.6.0-remove-pypytools-dep.patch @@ -0,0 +1,74 @@ +diff --git a/cheroot/test/test_server.py b/cheroot/test/test_server.py +index 8305c78c..39e4e066 100644 +--- a/cheroot/test/test_server.py ++++ b/cheroot/test/test_server.py +@@ -16,7 +16,6 @@ import requests + import requests_unixsocket + import six + +-from pypytools.gc.custom import DefaultGc + from six.moves import queue, urllib + + from .._compat import bton, ntob +@@ -330,8 +329,7 @@ def test_peercreds_unix_sock_with_lookup(peercreds_enabled_server): + ), + indirect=('resource_limit',), + ) +-@pytest.mark.usefixtures('many_open_sockets') +-def test_high_number_of_file_descriptors(native_server_client, resource_limit): ++def _test_high_number_of_file_descriptors(native_server_client, resource_limit): + """Test the server does not crash with a high file-descriptor value. + + This test shouldn't cause a server crash when trying to access +@@ -363,18 +361,6 @@ def test_high_number_of_file_descriptors(native_server_client, resource_limit): + assert any(fn >= resource_limit for fn in native_process_conn.filenos) + + +-if not IS_WINDOWS: +- test_high_number_of_file_descriptors = pytest.mark.forked( +- test_high_number_of_file_descriptors, +- ) +- +- +-@pytest.fixture +-def _garbage_bin(): +- """Disable garbage collection when this fixture is in use.""" +- with DefaultGc().nogc(): +- yield +- + + @pytest.fixture + def resource_limit(request): +@@ -400,32 +386,3 @@ def resource_limit(request): + finally: + # Reset the resource limit back to the original soft limit + resource.setrlimit(resource.RLIMIT_NOFILE, (soft_limit, hard_limit)) +- +- +-@pytest.fixture +-def many_open_sockets(request, resource_limit): +- """Allocate a lot of file descriptors by opening dummy sockets.""" +- # NOTE: `@pytest.mark.usefixtures` doesn't work on fixtures which +- # NOTE: forces us to invoke this one dynamically to avoid having an +- # NOTE: unused argument. +- request.getfixturevalue('_garbage_bin') +- +- # Hoard a lot of file descriptors by opening and storing a lot of sockets +- test_sockets = [] +- # Open a lot of file descriptors, so the next one the server +- # opens is a high number +- try: +- for _ in range(resource_limit): +- sock = socket.socket() +- test_sockets.append(sock) +- # If we reach a high enough number, we don't need to open more +- if sock.fileno() >= resource_limit: +- break +- # Check we opened enough descriptors to reach a high number +- the_highest_fileno = test_sockets[-1].fileno() +- assert the_highest_fileno >= resource_limit +- yield the_highest_fileno +- finally: +- # Close our open resources +- for test_socket in test_sockets: +- test_socket.close() |