diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2025-03-07 09:28:47 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-07 09:28:47 (GMT) |
| commit | d5eb490846d3deb76a8650e6f36e89aa074e11b5 (patch) | |
| tree | 0fe3ef4385fa4dba44163d1464db71bfb5c1e3a5 /Python | |
| parent | 0c088e44428d74d701fe1fc80a4cb4fe124c43f0 (diff) | |
| download | cpython-d5eb490846d3deb76a8650e6f36e89aa074e11b5.zip cpython-d5eb490846d3deb76a8650e6f36e89aa074e11b5.tar.gz cpython-d5eb490846d3deb76a8650e6f36e89aa074e11b5.tar.bz2 | |
[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>
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions
