diff options
author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2025-03-07 07:41:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-07 07:41:28 (GMT) |
commit | 0a9ae5ed48e6ea078f67ba03635c1c26209b5def (patch) | |
tree | 21bcadf86bbdd74e5c1d67b227bc3fe2a56954eb /Python/codegen.c | |
parent | 8190571a75fc46278042e7fffbe8aeb1f71ab21d (diff) | |
download | cpython-0a9ae5ed48e6ea078f67ba03635c1c26209b5def.zip cpython-0a9ae5ed48e6ea078f67ba03635c1c26209b5def.tar.gz cpython-0a9ae5ed48e6ea078f67ba03635c1c26209b5def.tar.bz2 |
gh-130932: Fix incorrect exception handling in _PyModule_IsPossiblyShadowing (#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.
```
Diffstat (limited to 'Python/codegen.c')
0 files changed, 0 insertions, 0 deletions