Name clash between input file and system file leads to incorrect dependency tree.
rchen152 opened this issue · 1 comments
rchen152 commented
Example:
$ cat abc.py
import abc
$ importlab --tree abc.py
Reading 1 files
Source tree:
cycle {
abc.py
}
If I rename the file to anything else, importlab generates the correct source tree:
Source tree:
+ foo.py
:: abc.py
:: _weakrefset.py
I'm running importlab-0.3.0 under Python 3.6
martindemello commented
this is further complicated by the fact that import abc
in a sibling file should change its behaviour depending on whether we have an __init__.py
file (in a non-package environment we should import the system abc)