Hello hackers, As buildfarm animal skink shows, upgrade to Python 3.14 breaks plpython tests under Valgrind [1]: 61/400 plpython - postgresql:plpython/regress ERROR 49.88s exit status 1
pgsql.build/testrun/plpython/regress/log/postmaster.log Fatal Python error: pycore_init_builtins: failed to add exceptions to builtins Python runtime state: preinitialized object address : 0x139da4a0 object refcount : 1 object type : 0x1388d020 object type name: RecursionError object repr : lost sys.stderr Current thread 0x0000000008c62ec0 [memcheck-amd64-] (most recent call first): <no Python frame> I've reproduced this locally and confirmed that it's not reproduced with PLPYTHON="python3.13" ./configure ... It's also not reproduced on master, probably just because of a bit lesser stack usage. I've bisected the anomaly and found what makes master pass the tests: aeb07c55f. AI suggests the offending change in Python 3.14 is [2]: Use Py_EnterRecursiveCall() to guard against runaway recursion in C code [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2026-07-27%2013%3A09%3A55 [2] https://docs.python.org/3/whatsnew/3.14.html Best regards, Alexander
