Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name clash between input file and system file leads to incorrect dependency tree. #25

Open
rchen152 opened this issue Sep 21, 2018 · 1 comment

Comments

@rchen152
Copy link
Contributor

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
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants