]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-119561) (gh...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 27 May 2024 19:11:29 +0000 (21:11 +0200)
committerGitHub <noreply@github.com>
Mon, 27 May 2024 19:11:29 +0000 (19:11 +0000)
commitbd9983cab89cc42eecdbb4556cca0b6d7a7c529c
tree3a93e60e20dce025da387b100bae243fb825eb2d
parent0a4a3184f56a1e4e8cb4d3466cee20388bf7f00d
[3.13] gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-119561) (gh-119632)

The assertion was added in gh-118532 but was based on the invalid assumption that PyState_FindModule() would only be called with an already-initialized module def.  I've added a test to make sure we don't make that assumption again.

(cherry picked from commit 0c5ebe13e9937c446e9947c44f2570737ecca135)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Lib/test/test_import/__init__.py
Misc/NEWS.d/next/Core and Builtins/2024-05-25-12-52-25.gh-issue-119560.wSlm8q.rst [new file with mode: 0644]
Modules/_testsinglephase.c
Python/import.c