[3.13] gh-130932: Fix incorrect exception handling in _PyModule_IsPossiblyShadowing (GH-130934) (#130939)
gh-130932: Fix incorrect exception handling in _PyModule_IsPossiblyShadowing (GH-130934) I chose to not raise an exception here because I think it would be confusing for module attribute access to start raising something other than AttributeError if e.g. the cwd goes away Without the change in moduleobject.c ``` ./python.exe -m unittest test.test_import.ImportTests.test_script_shadowing_stdlib_cwd_failure ... Assertion failed: (PyErr_Occurred()), function _PyObject_SetAttributeErrorContext, file object.c, line 1253. ``` (cherry picked from commit 0a9ae5ed48e6ea078f67ba03635c1c26209b5def) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
M
Miss Islington (bot) committed
d5eb490846d3deb76a8650e6f36e89aa074e11b5
Parent: 0c088e4
Committed by GitHub <noreply@github.com>
on 3/7/2025, 9:28:47 AM