From 02e22dc8353cc97607ea47fd5fb78a8ede913df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 5 Dec 2025 07:20:04 +0100 Subject: dev-python/greenlet: Remove old MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/greenlet/Manifest | 1 - .../files/greenlet-3.2.3-py312-assert.patch | 71 ---------------------- .../files/greenlet-3.2.3-skip-leak-tests.patch | 51 ---------------- dev-python/greenlet/greenlet-3.2.3.ebuild | 54 ---------------- 4 files changed, 177 deletions(-) delete mode 100644 dev-python/greenlet/files/greenlet-3.2.3-py312-assert.patch delete mode 100644 dev-python/greenlet/files/greenlet-3.2.3-skip-leak-tests.patch delete mode 100644 dev-python/greenlet/greenlet-3.2.3.ebuild diff --git a/dev-python/greenlet/Manifest b/dev-python/greenlet/Manifest index 37cc4f11d7ec..b7609cb8aed0 100644 --- a/dev-python/greenlet/Manifest +++ b/dev-python/greenlet/Manifest @@ -1,2 +1 @@ -DIST greenlet-3.2.3.tar.gz 185752 BLAKE2B 4e5ea7c83622a954d9cab3da524c88970cc8a22759c3cdfdca1a718c5e630d895d844679292b48a4ebda93bcbbad1da0665c78bbf132cf1215456d742190a3ac SHA512 3153123855b4900387454fa1d4223b321980e3462e1e139b9f90b4eb2d0772102e06375055c6eb612530d7037169ff6e28166f95efe09073ea331db76284d39d DIST greenlet-3.2.4.tar.gz 188260 BLAKE2B b4ac8d493fe2fa471d61a11d7f5aa8cdec5e94d00f902c44204838d1e049cd289e52ac959dda3967a8b2b1b0d157f42225db0ff1665cd799070e230f834d53c2 SHA512 59a2df6248ba8830d0d92cf26cde97fef87fd6d3b5ebd2661d1a8762e622b98b502ab8531f613830c6645b0249c084f326c38c34824da37b717ff6cfbb105e4c diff --git a/dev-python/greenlet/files/greenlet-3.2.3-py312-assert.patch b/dev-python/greenlet/files/greenlet-3.2.3-py312-assert.patch deleted file mode 100644 index 21737aaf0362..000000000000 --- a/dev-python/greenlet/files/greenlet-3.2.3-py312-assert.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 739cc559ac42f41f6ccbc7d556d730fd424f3be8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Wed, 30 Jul 2025 12:17:47 +0200 -Subject: [PATCH] Fix py312+ crash test skips to correctly check for assertions -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix the skips for `test_trace_events_multiple_greenlets_switching*` -to correctly detect assertions being enabled independently of -`--with-pydebug`. Gentoo builds Python `--without-pydebug` but -`--with-assertions`, in order to benefit from assertion-implied safety -checks without the full cost of PyDEBUG. For the purpose of detecting -it, check for `-DNDEBUG` in optimization flags, as implied by disabling -assertions. Leave the existing code as a fallback for when build flags -are unavailable, e.g. in Windows packages. - -Signed-off-by: Michał Górny ---- - src/greenlet/tests/test_tracing.py | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/src/greenlet/tests/test_tracing.py b/src/greenlet/tests/test_tracing.py -index c044d4b6..235fbcd6 100644 ---- a/src/greenlet/tests/test_tracing.py -+++ b/src/greenlet/tests/test_tracing.py -@@ -1,5 +1,6 @@ - from __future__ import print_function - import sys -+import sysconfig - import greenlet - import unittest - -@@ -7,9 +8,16 @@ - from . import PY312 - - # https://discuss.python.org/t/cpython-3-12-greenlet-and-tracing-profiling-how-to-not-crash-and-get-correct-results/33144/2 --DEBUG_BUILD_PY312 = ( -- PY312 and hasattr(sys, 'gettotalrefcount'), -- "Broken on debug builds of Python 3.12" -+# When build variables are available, OPT is the best way of detecting -+# the build with assertions enabled. Otherwise, fallback to detecting PyDEBUG -+# build. -+ASSERTION_BUILD_PY312 = ( -+ PY312 and ( -+ "-DNDEBUG" not in sysconfig.get_config_var("OPT").split() -+ if sysconfig.get_config_var("OPT") is not None -+ else hasattr(sys, 'gettotalrefcount') -+ ), -+ "Broken on assertion-enabled builds of Python 3.12" - ) - - class SomeError(Exception): -@@ -198,7 +206,7 @@ def run(self): - - self._check_trace_events_from_greenlet_sets_profiler(X(), tracer) - -- @unittest.skipIf(*DEBUG_BUILD_PY312) -+ @unittest.skipIf(*ASSERTION_BUILD_PY312) - def test_trace_events_multiple_greenlets_switching(self): - tracer = PythonTracer() - -@@ -236,7 +244,7 @@ def g2_run(): - ('c_call', '__exit__'), - ]) - -- @unittest.skipIf(*DEBUG_BUILD_PY312) -+ @unittest.skipIf(*ASSERTION_BUILD_PY312) - def test_trace_events_multiple_greenlets_switching_siblings(self): - # Like the first version, but get both greenlets running first - # as "siblings" and then establish the tracing. diff --git a/dev-python/greenlet/files/greenlet-3.2.3-skip-leak-tests.patch b/dev-python/greenlet/files/greenlet-3.2.3-skip-leak-tests.patch deleted file mode 100644 index 3e7ea3a55f27..000000000000 --- a/dev-python/greenlet/files/greenlet-3.2.3-skip-leak-tests.patch +++ /dev/null @@ -1,51 +0,0 @@ -From cfb846272ab94a79c2f936da13dc3f5213f48912 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Thu, 31 Jul 2025 18:16:00 +0200 -Subject: [PATCH] Skip `TestLeaks` when `GREENLET_SKIP_LEAKCHECKS` is used - -When `GREENLET_SKIP_LEAKCHECKS` is used, we do not want to check for -leaks, and therefore it makes no sense to run tests explicitly checking -for leaks. Since the conditional is also true for MANYLINUX builds, -remove the redundant condition. ---- - src/greenlet/tests/test_leaks.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/greenlet/tests/test_leaks.py b/src/greenlet/tests/test_leaks.py -index 99da4eb..fe60fa2 100644 ---- a/src/greenlet/tests/test_leaks.py -+++ b/src/greenlet/tests/test_leaks.py -@@ -10,6 +10,7 @@ - import time - import weakref - import threading -+import unittest - - - import greenlet -@@ -17,7 +18,7 @@ - from . import PY314 - from .leakcheck import fails_leakcheck - from .leakcheck import ignores_leakcheck --from .leakcheck import RUNNING_ON_MANYLINUX -+from .leakcheck import SKIP_LEAKCHECKS - - # pylint:disable=protected-access - -@@ -39,6 +40,7 @@ def reset(cls): - cls.EXTANT_INSTANCES.clear() - - -+@unittest.skipIf(SKIP_LEAKCHECKS, "Leak checks disabled") - class TestLeaks(TestCase): - - def test_arg_refs(self): -@@ -313,8 +315,6 @@ def _only_test_some_versions(self): - assert sys.version_info[0] >= 3 - if sys.version_info[:2] < (3, 8): - self.skipTest('Only observed on 3.11') -- if RUNNING_ON_MANYLINUX: -- self.skipTest("Slow and not worth repeating here") - - @ignores_leakcheck - # Because we're just trying to track raw memory, not objects, and running diff --git a/dev-python/greenlet/greenlet-3.2.3.ebuild b/dev-python/greenlet/greenlet-3.2.3.ebuild deleted file mode 100644 index f10686082fb4..000000000000 --- a/dev-python/greenlet/greenlet-3.2.3.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -DISTUTILS_USE_PEP517=setuptools -# Note: greenlet is built-in in pypy -PYTHON_COMPAT=( python3_{11..14} ) - -inherit distutils-r1 pypi - -DESCRIPTION="Lightweight in-process concurrent programming" -HOMEPAGE=" - https://greenlet.readthedocs.io/en/latest/ - https://github.com/python-greenlet/greenlet/ - https://pypi.org/project/greenlet/ -" - -LICENSE="MIT PSF-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 -hppa ~m68k ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND=" - test? ( - dev-python/objgraph[${PYTHON_USEDEP}] - dev-python/psutil[${PYTHON_USEDEP}] - ) -" - -distutils_enable_sphinx docs \ - dev-python/furo -distutils_enable_tests unittest - -src_prepare() { - local PATCHES=( - # https://github.com/python-greenlet/greenlet/pull/457 - "${FILESDIR}/${P}-py312-assert.patch" - # https://github.com/python-greenlet/greenlet/pull/461 - "${FILESDIR}/${P}-skip-leak-tests.patch" - ) - - distutils-r1_src_prepare - - # patch cflag manipulations out - sed -i -e 's:global_compile_args[.]append.*:pass:' setup.py || die -} - -python_test() { - local -x GREENLET_SKIP_LEAKCHECKS=1 - eunittest greenlet.tests -} -- cgit v1.2.3