-
Notifications
You must be signed in to change notification settings - Fork 119
Support for namespace packages (PEP 420) #19
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
Comments
Hi @gdetrez and thank you for the bugreport.
I suppose we could include all the "bad" modules in the graph as well, but with the current code they would be empty. The best alternative would be to fix pydeps' copy of modulefinder ( |
Hi @thebjorn. Sorry for the radio silence. I see that if I use the While researching the same issue for mypy, I found python/mypy#5691 which implement PEP 420 support (it's behind a Otherwise, if you don't mind the extra dependency, maybe it'd be worth taking a look at
|
Just tried |
That is a huge bug and |
@ssbarnea I'm wondering if you're using this feature to create namespace package, or if it's simply to avoid having an |
modulegraph seems to be built on the same foundational technology and does some work to support namespace packages (https://github.com/ronaldoussoren/modulegraph/blob/master/modulegraph/modulegraph.py#L63) |
Thanks, will keep it in mind. Decided to go with When I need something more extensive & customisable I will have a look at |
PEP 420 introduced implicit namespace packages, which are packages without
__init__.py
. Those packages, and the modules under them, don't seem to appear in the dependency graph generated by pydeps.Here's an example. Given the following directory structure:
And
main.py
:pydeps main.py
generates the following graph:I would have expected
pkg1.foo
to be included in the dependency graph. (On the other hand, I'm not sure there's a point in havingpkg1
there since it's going to be empty.)The text was updated successfully, but these errors were encountered: