From 09b4a4e2c1d2e3c6dbf1d963095deeab86e0525d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 20 Nov 2023 21:02:28 +0100 Subject: [PATCH] Fixed runtests.py crash on PyPy. The gc.set_threshold() call was made conditional to non-PyPy implementations. The method is not available in PyPy3, and GC is much less aggressive there, so the adjustment probably is not necessary. --- tests/runtests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/runtests.py b/tests/runtests.py index e03966410be3..48beb1a3d717 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -52,7 +52,8 @@ # references, which are a minority, so the garbage collection threshold can be # larger than the default threshold of 700 allocations + deallocations without # much increase in memory usage. -gc.set_threshold(100_000) +if not hasattr(sys, "pypy_version_info"): + gc.set_threshold(100_000) RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))