cpython/Lib/test/test_import
Shantanu 0a9ae5ed48
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.
```
2025-03-06 23:41:28 -08:00
..
data gh-123880: Allow recursive import of single-phase-init modules (GH-123950) 2024-09-20 10:27:34 +02:00
__init__.py gh-130932: Fix incorrect exception handling in _PyModule_IsPossiblyShadowing (#130934) 2025-03-06 23:41:28 -08:00
__main__.py