[issue17636] Modify IMPORT_FROM to fallback on sys.modules

Phillip J. Eby report at bugs.python.org
Sun May 5 00:49:25 CEST 2013


Phillip J. Eby added the comment:

It looks like maybe basic2 should be importing basic, not basic2.
Otherwise, you might as well just import basic2 directly and be done
with it.  ;-)  Likewise, I think indirect should be importing from
indirect2, not from itself?  i.e., I'd expect that test to fail even
with the change.  In addition, even if that is fixed, it's still not
testing a cycle involving util; it's really just testing the same
thing as "basic" is supposed to be testing.

It also looks as though like the rebinding test doesn't actually test
any rebinding, since nobody ever imports the thing that's rebound.
It's failing for the same reason as the subpackage test.  The
subpackage test looks like a valid test, though - i.e., it's the
"basic" case correctly implemented as a parent-child cycle.  It's
actually the only one of the tests that tests what it says it does.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17636>
_______________________________________


More information about the Python-bugs-list mailing list