]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102660: Handle m_copy Specially for the sys and builtins Modules (gh-102661)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 14 Mar 2023 20:01:35 +0000 (14:01 -0600)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 20:01:35 +0000 (14:01 -0600)
commitcdb21ba74d933e262bc1696b6ce78b50cb5a4443
treebfdf1ff0a564d9b7bc3f7288f115ccd3bc9c3d12
parent80abd62647b2a36947a11a6a8e395061be6f0c61
gh-102660: Handle m_copy Specially for the sys and builtins Modules (gh-102661)

It doesn't make sense to use multi-phase init for these modules. Using a per-interpreter "m_copy" (instead of PyModuleDef.m_base.m_copy) makes this work okay. (This came up while working on gh-101660.)

Note that we might instead end up disallowing re-load for sys/builtins since they are so special.

https://github.com/python/cpython/issues/102660
Include/internal/pycore_interp.h
Python/bltinmodule.c
Python/import.c
Python/pystate.c
Python/sysmodule.c