]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117953: Always Run Extension Init Func in Main Interpreter First (gh-118157)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 7 May 2024 04:21:51 +0000 (22:21 -0600)
committerGitHub <noreply@github.com>
Tue, 7 May 2024 04:21:51 +0000 (04:21 +0000)
commitb2cd54a4fb2ecdb7b1d30bda8af3314d3a32031e
tree829360e381eef6107cb2aa836bd7c4d79e77f514
parent1a23716d4ba6c6dadd76a3662db580f451f660e3
gh-117953: Always Run Extension Init Func in Main Interpreter First (gh-118157)

This change makes sure all extension/builtin modules have their init function run first by the main interpreter before proceeding with import in the original interpreter (main or otherwise).  This means when the import of a single-phase init module fails in an isolated subinterpreter, it won't tie any global state/callbacks to the subinterpreter.
Lib/test/test_import/__init__.py
Lib/test/test_interpreters/__init__.py
Misc/NEWS.d/next/Core and Builtins/2024-05-06-10-57-54.gh-issue-117953.DqCzIs.rst [new file with mode: 0644]
Python/import.c