[issue19851] reload problem with submodule

2013-12-09 Thread Olivier Grisel
Olivier Grisel added the comment: I tested the patch on the current HEAD and it fixes a regression introduced between 3.3 and 3.4b1 that prevented to build scipy from source with pip install scipy. -- nosy: +Olivier.Grisel ___ Python tracker

[issue19851] reload problem with submodule

2013-12-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d67eb1df5a9 by Eric Snow in branch 'default': Issue 19851: Fix a regression in reloading submodules. http://hg.python.org/cpython/rev/1d67eb1df5a9 -- nosy: +python-dev ___ Python tracker

[issue19851] reload problem with submodule

2013-12-09 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851

[issue19851] reload problem with submodule

2013-12-07 Thread Eric Snow
Eric Snow added the comment: This is actually a problem with importlib.reload() (which imp.reload() simply wraps). The attached patch provides a test that reproduces the error. I'll work on a fix ASAP. Interestingly, the kind of failure depends on frozen vs. source importlib:

[issue19851] reload problem with submodule

2013-12-07 Thread Eric Snow
Eric Snow added the comment: Actually, they're both getting the same error: AttributeError: 'NoneType' object has no attribute 'name' I forgot to clear the submodule from sys.modules first. -- ___ Python tracker rep...@bugs.python.org

[issue19851] reload problem with submodule

2013-12-07 Thread Eric Snow
Eric Snow added the comment: The problem was that importlib.reload() was not passing the parent's __path__ to importlib._bootstrap._find_spec(). This was a consequence of us restoring the pre-3.3 reload semantics. Patch attached. (Note to self: add Misc/NEWS entry) -- stage: needs

[issue19851] reload problem with submodule

2013-12-07 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: Removed file: http://bugs.python.org/file33033/issue19851-test.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___

[issue19851] reload problem with submodule

2013-12-07 Thread Nick Coghlan
Nick Coghlan added the comment: Patch looks reasonable to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___ ___ Python-bugs-list