◐ Shell
clean mode source ↗

bpo-30598: _PySys_EndInit() now duplicates warnoptions by vstinner · Pull Request #1998 · python/cpython

This makes sense to me - PEP 432 has the config setting eventually moving into the main interpreter config struct, and then each interpreter instance should have its own copy drawn from that original.

For me, the current global variable is only here to pass the initial value. Once sys is created, I don't expect that the global variable and sys.warnoptions are linked anymore. If you modify the global variable after sys creation, it should do nothing. Well, in practice, it will affect the newly created subinterpreters.

And now replace "global variable" with "config" ;-)