summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-04-04 23:03:40 (GMT)
committerGitHub <noreply@github.com>2023-04-04 23:03:40 (GMT)
commitf513d5c80672c76acbdaf7d5b601f4bbe9fae56a (patch)
tree2e62703bea7ceb964c1de11eaa14a1383b23aed8 /Mac
parentbceb9e00ad2998e5193ad5b477e92a114dd31024 (diff)
downloadcpython-f513d5c80672c76acbdaf7d5b601f4bbe9fae56a.zip
cpython-f513d5c80672c76acbdaf7d5b601f4bbe9fae56a.tar.gz
cpython-f513d5c80672c76acbdaf7d5b601f4bbe9fae56a.tar.bz2
gh-102660: Fix is_core_module() (gh-103257)
In gh-102744 we added is_core_module() (in Python/import.c), which relies on get_core_module_dict() (also added in that PR). The problem is that_PyImport_FixupBuiltin(), which ultimately calls is_core_module(), is called on the builtins module before interp->builtins_copyis set. Consequently, the builtins module isn't considered a "core" module while it is getting "fixed up" and its module def m_copy erroneously gets set. Under isolated interpreters this causes problems since sys and builtins are allowed even though they are still single-phase init modules. (This was discovered while working on gh-101660.) The solution is to stop relying on get_core_module_dict() in is_core_module().
Diffstat (limited to 'Mac')
0 files changed, 0 insertions, 0 deletions