gh-119213: Fix getargs.c to store state in InterpreterState...
...as opposed to storing it in PyRuntime. Storing it in PyRuntime is fundametally wrong, as its state contains references to Python objects. Those objects (tuples and strings) can (and will) be picked by various subinterpreter clean up code, leaving PyRuntime with broken pointers.
https://github.com/python/cpython/pull/119194 is a backport to 3.12
- Issue: gh-119213
How does this work when the _PyArg_Parser instances are themselves declared as static variables (and are global to the process)? For example:
https://github.com/python/cpython/blob/6f7dd0a4260254390d75838c84ccc7285a2264f0/Modules/clinic/_struct.c.h#L49-L53
@colesbury, I'm looking into what's going on. Basically, the statically declared tuple is only for builtin modules. I have a solution that's different from Yury's but want to be sure it's correct before closing this one.
superseded by gh-119331