From fdfe76f56c5a3efcc008ff190b8a1c8cd07ca401 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Wed, 23 Sep 2026 19:43:01 +0200 Subject: [PATCH] testing: ignore Cython's PyPy collection_type warning PyPy 3.11.16 (PyPy 8.0.0) makes Cython-compiled numpy.random emit 'cython.collection_type only works on PyPy with the C flag CYTHON_USE_TYPE_SPECS=1' as a RuntimeWarning on import. hypothesis imports numpy.random whenever numpy is loaded, so under filterwarnings=error every @given test fails on the pypy3-xdist job. Same numpy 2.4.6 and hypothesis 6.168.1 import cleanly on PyPy 3.11.15. Co-Authored-By: Claude Opus 5.5 via Claude Code --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0f65d643d40..e7dcef6e007 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -488,6 +488,9 @@ filterwarnings = [ # (python/cpython#136796 stopped clearing the warning). Often seen on macOS # because Mach task_threads counts extra runtime threads. 'ignore:.*use of forkpty\(\) may lead to deadlocks in the child:DeprecationWarning', + # Cython-compiled numpy.random warns on import under PyPy 3.11.16 (PyPy 8.0); + # hypothesis imports it whenever numpy is loaded, failing any @given test. + 'ignore:cython.collection_type only works on PyPy:RuntimeWarning', ] pytester_example_dir = "testing/example_scripts" markers = [