◐ Shell
clean mode source ↗

bpo-38858: Fix ref leak in pycore_interp_init() by vstinner · Pull Request #17512 · python/cpython

I tested manually that this change fix https://bugs.python.org/issue38997:

$ ./python -m test -R 3:3 -j0  test__xxsubinterpreters test_atexit test_capi test_threading
(...)
All 4 tests OK.

Total duration: 1 min 2 sec
Tests result: SUCCESS

This bug is not a regression: it exists at least since Python 2.7. It's just that previously, the bug was hidden because subinterpreters were not well isolated from the main interpreter.

@ericsnowcurrently: Welcome to the hell of correctness enforced by subinterpreters :-)