]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 20 Dec 2024 08:46:54 +0000 (09:46 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Dec 2024 08:46:54 +0000 (08:46 +0000)
commitf320f747da2ad7b1eb039b2d7b475e0ac057fa49
treeccfcaaac75d0d6176f957d4ce1133d3850805400
parent3a8bdaf6985412d43e3fe8ce90030bb5bbd8d20b
[3.13] gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047) (#128114)

gh-128030: Avoid error from PyModule_GetFilenameObject for non-module (GH-128047)

I missed the extra `PyModule_Check` in GH-127660 because I was looking at
3.12 as the base implementation for import from. This meant that I
missed the `PyModuleCheck` introduced in GH-112661.
(cherry picked from commit 45e6dd63b88a782f2ec96ab1da54eb5a074d8f4c)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Lib/test/test_import/__init__.py
Misc/NEWS.d/next/Core_and_Builtins/2024-12-17-22-28-15.gh-issue-128030.H1ptOD.rst [new file with mode: 0644]
Python/ceval.c