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
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
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
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:
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
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
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
___
Nick Coghlan added the comment:
Patch looks reasonable to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19851
___
___
Python-bugs-list