public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cheroot/files/, dev-python/cheroot/
@ 2020-02-10 17:46 Zac Medico
  0 siblings, 0 replies; 3+ messages in thread
From: Zac Medico @ 2020-02-10 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     d1ae67ce11a819a53f816ae21693522ec5c3296d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 10 17:22:51 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 17:42:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1ae67ce

dev-python/cheroot: Remove old versions

Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 dev-python/cheroot/Manifest                        |  2 -
 dev-python/cheroot/cheroot-6.0.0-r1.ebuild         | 32 -------------
 dev-python/cheroot/cheroot-6.0.0.ebuild            | 32 -------------
 dev-python/cheroot/cheroot-6.5.4.ebuild            | 53 ----------------------
 dev-python/cheroot/cheroot-8.2.1.ebuild            | 13 ++++--
 .../cheroot/files/6.5.4-fix-requirements.patch     | 10 ----
 6 files changed, 9 insertions(+), 133 deletions(-)

diff --git a/dev-python/cheroot/Manifest b/dev-python/cheroot/Manifest
index 71d038c979a..e3db8babde1 100644
--- a/dev-python/cheroot/Manifest
+++ b/dev-python/cheroot/Manifest
@@ -1,3 +1 @@
-DIST cheroot-6.0.0.tar.gz 62763 BLAKE2B 0946c01c6a6233dc60ca3dd896c3d1dbc0feb97d5099d88598db340a8812b2be4cb076383c0e39d30cd2c6fd3402e048b716a02e82bec8ce08d5b8fca4b1be0f SHA512 0109fbf3b73ed3f12261eaa3c6d86b6c6b80a1ba3564548ba3288aa6c61a1c08db60886e677991bf7997e6a5b1ec7767a3e06098ec1748453e72c40fda7b82a7
-DIST cheroot-6.5.4.tar.gz 81067 BLAKE2B 5304373bb8c7cefa341260d4fdb8a99b9e22041260342a716a6b95ba324b4f31d20fb44d8dc10840fb35d3b04de1283deb9aca11bc78772655bf7ad81cf16f3c SHA512 62a48ced225bf9167259b82f5e88a953bdc422982a6c0b0121b28e895cc8347cc033f573b57a048c59167586e0b21e94ad233ce2b65a1b72feb01db82b5ed411
 DIST cheroot-8.2.1.tar.gz 89470 BLAKE2B 57515ecf6e047ea67599631a98c15307ea5f9929b398a8143bc157bfe71129b11a1f4bc841f586f98167ac4c6c9680d476bd167323e5828163b4bff9bf24c360 SHA512 3f6b55c6b2403569eedb1fe7b473d3a65ad5d06cb99a38370316db38b6138b1a6921c6b7d8ba64424c5b8c20c9c58ada33da7cb8ebb6f313610f63c1f364f862

diff --git a/dev-python/cheroot/cheroot-6.0.0-r1.ebuild b/dev-python/cheroot/cheroot-6.0.0-r1.ebuild
deleted file mode 100644
index 1022ae4c924..00000000000
--- a/dev-python/cheroot/cheroot-6.0.0-r1.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Cheroot is the 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 ~ia64 ~ppc ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=dev-python/six-1.11.0[${PYTHON_USEDEP}]
-	>=dev-python/more-itertools-2.6[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
-	<dev-python/setuptools-41.4.0[${PYTHON_USEDEP}]
-	>=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
-	test? (
-		dev-python/portend[${PYTHON_USEDEP}]
-		dev-python/pytest[${PYTHON_USEDEP}]
-		dev-python/pytest-cov[${PYTHON_USEDEP}]
-	)"
-
-python_test() {
-	py.test -v || die "tests failed under ${EPTYHON}"
-}

diff --git a/dev-python/cheroot/cheroot-6.0.0.ebuild b/dev-python/cheroot/cheroot-6.0.0.ebuild
deleted file mode 100644
index 586c3328f4d..00000000000
--- a/dev-python/cheroot/cheroot-6.0.0.ebuild
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_6 pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Cheroot is the 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 ~ia64 ~ppc ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=dev-python/six-1.11.0[${PYTHON_USEDEP}]
-	>=dev-python/more-itertools-2.6[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
-	<dev-python/setuptools-41.4.0[${PYTHON_USEDEP}]
-	>=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
-	test? (
-		dev-python/portend[${PYTHON_USEDEP}]
-		dev-python/pytest[${PYTHON_USEDEP}]
-		dev-python/pytest-cov[${PYTHON_USEDEP}]
-	)"
-
-python_test() {
-	py.test -v || die "tests failed under ${EPTYHON}"
-}

diff --git a/dev-python/cheroot/cheroot-6.5.4.ebuild b/dev-python/cheroot/cheroot-6.5.4.ebuild
deleted file mode 100644
index 6a80492c572..00000000000
--- a/dev-python/cheroot/cheroot-6.5.4.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{6,7} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Cheroot is the 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 ~arm64"
-# Unit tests are temporarily disabled for this version, see below for
-# what needs to be done.
-# IUSE="test"
-RESTRICT="test"
-
-RDEPEND=">=dev-python/six-1.11.0[${PYTHON_USEDEP}]
-	>=dev-python/more-itertools-2.6[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
-	<dev-python/setuptools-41.4.0[${PYTHON_USEDEP}]
-	>=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
-	>=dev-python/setuptools_scm_git_archive-1.0[${PYTHON_USEDEP}]"
-
-	# Add the following for unit tests, some packages listed will need
-	# to be added and keyworded appropriately.
-#	test? (
-#	dev-python/ddt[${PYTHON_USEDEP}]
-#		dev-python/pytest[${PYTHON_USEDEP}]
-#		dev-python/pytest-mock[${PYTHON_USEDEP}]
-#		dev-python/pytest-sugar[${PYTHON_USEDEP}]
-#		dev-python/pytest-testmon[${PYTHON_USEDEP}]
-#		dev-python/pytest-watch[${PYTHON_USEDEP}]
-#		dev-python/pytest-xdist[${PYTHON_USEDEP}]
-#		dev-python/coverage[${PYTHON_USEDEP}]
-#		dev-python/codecov[${PYTHON_USEDEP}]
-#		dev-python/pytest-cov[${PYTHON_USEDEP}]
-#		dev-python/trustme[${PYTHON_USEDEP}]
-#		dev-python/pyopenssl[${PYTHON_USEDEP}]
-#		dev-python/requests-unixsocket[${PYTHON_USEDEP}]
-#	)"
-
-PATCHES=(
-	# https://github.com/CherryPy/cheroot/issues/181
-	"${FILESDIR}"/6.5.4-fix-requirements.patch
-)
-
-# python_test() {
-#	py.test -v || die "tests failed under ${EPYTHON}"
-# }

diff --git a/dev-python/cheroot/cheroot-8.2.1.ebuild b/dev-python/cheroot/cheroot-8.2.1.ebuild
index decfdd37481..2254cb7b014 100644
--- a/dev-python/cheroot/cheroot-8.2.1.ebuild
+++ b/dev-python/cheroot/cheroot-8.2.1.ebuild
@@ -12,7 +12,7 @@ SRC_URI="mirror://pypi/C/${PN/c/C}/${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~ppc64"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
 # Unit tests are temporarily disabled for this version, see below for
 # what needs to be done.
 #IUSE="test"
@@ -21,9 +21,7 @@ RESTRICT="test"
 RDEPEND=">=dev-python/six-1.11.0[${PYTHON_USEDEP}]
 	>=dev-python/more-itertools-2.6[${PYTHON_USEDEP}]"
 DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	>=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
-	>=dev-python/setuptools_scm_git_archive-1.0[${PYTHON_USEDEP}]"
+	dev-python/setuptools[${PYTHON_USEDEP}]"
 
 	# Add the following for unit tests, some packages listed will need
 	# to be added and keyworded appropriately.
@@ -45,3 +43,10 @@ DEPEND="${RDEPEND}
 #python_test() {
 #	py.test -v || die "tests failed under ${EPYTHON}"
 #}
+
+python_prepare_all() {
+	distutils-r1_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
+}

diff --git a/dev-python/cheroot/files/6.5.4-fix-requirements.patch b/dev-python/cheroot/files/6.5.4-fix-requirements.patch
deleted file mode 100644
index a5a493704cf..00000000000
--- a/dev-python/cheroot/files/6.5.4-fix-requirements.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/setup.cfg	2019-03-09 17:14:40.127863655 -0600
-+++ b/setup.cfg	2019-03-09 17:15:22.135345396 -0600
-@@ -57,7 +57,6 @@
- 	setuptools_scm>=1.15.0
- 	setuptools_scm_git_archive>=1.0
- install_requires = 
--	backports.functools_lru_cache
- 	six>=1.11.0
- 	more_itertools>=2.6
- 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/cheroot/files/, dev-python/cheroot/
@ 2022-01-07 20:18 Arthur Zamarin
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Zamarin @ 2022-01-07 20:18 UTC (permalink / raw
  To: gentoo-commits

commit:     72d451be36db5dadc6701312ca8ca6d7fc7e6072
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  7 20:16:52 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jan  7 20:16:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72d451be

dev-python/cheroot: add 8.6.0

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/cheroot/Manifest                        |  1 +
 dev-python/cheroot/cheroot-8.6.0.ebuild            | 76 ++++++++++++++++++++++
 .../files/cheroot-8.6.0-remove-pypytools-dep.patch | 74 +++++++++++++++++++++
 3 files changed, 151 insertions(+)

diff --git a/dev-python/cheroot/Manifest b/dev-python/cheroot/Manifest
index 438df70f0b68..362aa364dfd0 100644
--- a/dev-python/cheroot/Manifest
+++ b/dev-python/cheroot/Manifest
@@ -1 +1,2 @@
 DIST cheroot-8.5.2.tar.gz 113183 BLAKE2B a3b60a9df3f34913cfb8c99fbdc8580ea436710c7979e296c18a6981f54bb959d6a300f4cf9d4e608fe2987f58d5fc6d2b8f57bca800e461d31c77ac61fd6b01 SHA512 245c4157f5e11741d94375099878ef5b31945412a2b02961502e762b9770fd968f4f977fe2d74744aa6596c668079d7f07b6f129fa11438783a95d3a5ee088fa
+DIST cheroot-8.6.0.tar.gz 134779 BLAKE2B 97d1a9bf0a8d72d3204972934aa3ac4c97246b413edebd9f38caa802a5343acc426f137addfdc0faec58f6af2d62bc22023e93b14e1b0b07f6be9ffb12e78306 SHA512 26e48c935fe32d4ce3cf6ae20b5b272416ca53bd8496527c2958ec2ebe87529c831f283ae900e13271b610e39531b682df0376935ecc3bcfcca11c299cd2a893

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()


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/cheroot/files/, dev-python/cheroot/
@ 2022-12-25 17:33 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2022-12-25 17:33 UTC (permalink / raw
  To: gentoo-commits

commit:     f39514b66d013dc48d2e60ba154000589dbd67f2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 17:29:35 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 17:32:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f39514b6

dev-python/cheroot: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/cheroot/Manifest                        |  1 -
 dev-python/cheroot/cheroot-8.6.0-r1.ebuild         | 78 ----------------------
 .../files/cheroot-8.6.0-remove-pypytools-dep.patch | 74 --------------------
 3 files changed, 153 deletions(-)

diff --git a/dev-python/cheroot/Manifest b/dev-python/cheroot/Manifest
index f76d75408ab0..e520c631ec3d 100644
--- a/dev-python/cheroot/Manifest
+++ b/dev-python/cheroot/Manifest
@@ -1,2 +1 @@
-DIST cheroot-8.6.0.tar.gz 134779 BLAKE2B 97d1a9bf0a8d72d3204972934aa3ac4c97246b413edebd9f38caa802a5343acc426f137addfdc0faec58f6af2d62bc22023e93b14e1b0b07f6be9ffb12e78306 SHA512 26e48c935fe32d4ce3cf6ae20b5b272416ca53bd8496527c2958ec2ebe87529c831f283ae900e13271b610e39531b682df0376935ecc3bcfcca11c299cd2a893
 DIST cheroot-9.0.0.tar.gz 152562 BLAKE2B 5f5dd172cfc8fdd1318b22fc27060444a34343b6b83bbda4bd40c16d7cb0568c356f5fd14b0a7cdc74895d6707077ec54fcae54fb29b0d16a7c06e2cd36b1ee7 SHA512 86ea0dd2cb4cde25f86b489b1d0bb27e3e7c1ba5449759ccecaae689cdcb349b968fd0c8fb8bc8273deff5e32a078bf40f4342f0c5a1f53bb8d2b968f44a453b

diff --git a/dev-python/cheroot/cheroot-8.6.0-r1.ebuild b/dev-python/cheroot/cheroot-8.6.0-r1.ebuild
deleted file mode 100644
index d3a9411fde90..000000000000
--- a/dev-python/cheroot/cheroot-8.6.0-r1.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..11} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="High-performance, pure-Python HTTP server used by CherryPy"
-HOMEPAGE="
-	https://cherrypy.dev/
-	https://pypi.org/project/cheroot/
-	https://github.com/cherrypy/cheroot/
-"
-SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~sparc x86"
-IUSE="test-rust"
-
-RDEPEND="
-	>=dev-python/six-1.11.0[${PYTHON_USEDEP}]
-	>=dev-python/more-itertools-2.6[${PYTHON_USEDEP}]
-	dev-python/jaraco-functools[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	dev-python/setuptools_scm[${PYTHON_USEDEP}]
-	test? (
-		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}]
-		test-rust? (
-			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 '/--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
-
-	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
deleted file mode 100644
index f1f4fac26557..000000000000
--- a/dev-python/cheroot/files/cheroot-8.6.0-remove-pypytools-dep.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-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()


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-25 17:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 17:46 [gentoo-commits] repo/gentoo:master commit in: dev-python/cheroot/files/, dev-python/cheroot/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2022-01-07 20:18 Arthur Zamarin
2022-12-25 17:33 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox