Description
I was able to reproduce this issue #33582
Currently, if a user is running Python version 3.14.0t they will get this error message and the test suite will halt.
0stderr:
1<frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'capnp.lib.capnp', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.
Instead of halting, we should ignore and suppress the warning message because, regardless of PYTHON_GIL being set, our tests should pass.
In this change, we are avoiding setting PYTHON_GIL=1 in case it is deprecated in the future, so that newer tests would avoid having thread safety bugs. It makes sense not to have our test suite depend on PYTHON_GIL=1
Before and after applying this patch
Before: Warning message when using Python version 3.14.0t and PYTHON_GIL unset on master branch
0./build/test/functional/test_runner.py interface_ipc.py
1Temporary test directory at /var/folders/sq/z88fhjzj0b19ftsd2_bjrmjm0000gn/T/test_runner_₿_🏃_20251009_094704
2Remaining jobs: [interface_ipc.py]
31/1 - interface_ipc.py failed, Duration: 7 s
4
5stdout:
62025-10-09T08:47:05.067786Z TestFramework (INFO): PRNG seed is: 8793929945784019901
72025-10-09T08:47:05.069073Z TestFramework (INFO): Initializing test directory /var/folders/sq/z88fhjzj0b19ftsd2_bjrmjm0000gn/T/test_runner_₿_🏃_20251009_094704/interface_ipc_0
82025-10-09T08:47:05.880408Z TestFramework (INFO): Running echo test
92025-10-09T08:47:05.883429Z TestFramework (INFO): Running mining test
102025-10-09T08:47:12.059233Z TestFramework (INFO): Stopping nodes
112025-10-09T08:47:12.173668Z TestFramework (INFO): Cleaning up /var/folders/sq/z88fhjzj0b19ftsd2_bjrmjm0000gn/T/test_runner_₿_🏃_20251009_094704/interface_ipc_0 on exit
122025-10-09T08:47:12.173842Z TestFramework (INFO): Tests successful
13[node 0] Cleaning up ipc directory '/var/folders/sq/z88fhjzj0b19ftsd2_bjrmjm0000gn/T/test-ipc-s5k_0gog'
14
15
16stderr:
17<frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'capnp.lib.capnp', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.
18
19
20
21TEST | STATUS | DURATION
22
23interface_ipc.py | ✖ Failed | 7 s
24
25ALL | ✖ Failed | 7 s (accumulated)
26Runtime: 7 s
After: Applying this patch, when PYTHON_GIL is 0 or 1 or not set
0PYTHON_GIL=1 ./build_dev_mode/test/functional/test_runner.py interface_ipc.py
1or
2PYTHON_GIL=0 ./build_dev_mode/test/functional/test_runner.py interface_ipc.py
3or
4./build_dev_mode/test/functional/test_runner.py interface_ipc.py
5
6Temporary test directory at /tmp/test_runner_₿_🏃_20251105_180523
7Remaining jobs: [interface_ipc.py]
81/1 - interface_ipc.py passed, Duration: 13 s
9
10TEST | STATUS | DURATION
11
12interface_ipc.py | ✓ Passed | 13 s
13
14ALL | ✓ Passed | 13 s (accumulated)
15Runtime: 13 s