]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-119561)
authorEric Snow <ericsnowcurrently@gmail.com>
Sat, 25 May 2024 19:30:48 +0000 (15:30 -0400)
committerGitHub <noreply@github.com>
Sat, 25 May 2024 19:30:48 +0000 (19:30 +0000)
commit0c5ebe13e9937c446e9947c44f2570737ecca135
tree6498ee1ee5fdf54b6adccfb9af9c42a53d82c4c6
parent4b7eb321bc43e41371df86fce47bd999ee51a793
gh-119560: Drop an Invalid Assert in PyState_FindModule() (gh-119561)

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.
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