Issue 1548687: C modules reloaded on certain failed imports (original) (raw)
Running z.py in the attached archive should produce an attribute error on printing, as we have set sys.stdout to None. On 2.3.5 and 2.4.3, output is printed and any imported C modules in x/y.py are reloaded, builtin or 3rd party.
On 2.5, we get a traceback on import: "SystemError: Parent module 'x' not loaded".
Changing the name on the import from 'x.y' to 'y' works-around the error, and we get the expected AttributeError in 2.3, 2.4. 2.5 gives us the same SystemError.