Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upnamespace packages cannot be found by various tools. #83
Comments
This comment has been minimized.
This comment has been minimized.
|
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): I recently encountered this situation as well, where Can you confirm you were using pip when you encountered these issues? Can you try installing the packages with easy_install instead and see if it meets your expectations? |
This comment has been minimized.
This comment has been minimized.
|
Original comment by youngrok (Bitbucket: youngrok, GitHub: youngrok): Both pip and easy_install have problems, but the problems are different. As you say, when using pip, all of the ways mentioned above do not work. easy_install works better, but has another problem. For example, I installed |
This comment has been minimized.
This comment has been minimized.
|
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): @youngrok that's exactly what I would expect based on what I read from the code. The underlying challenge is that with a namespace package, there's no direct deterministic resolution for the namespace package. In the case of Djangox, that package may actually exist in multiple locations, so when you request a resource from that package, setuptools returns the first one. When installed with PIP, everything happens to be installed into a single directory, but based on PEP 420 and other name spacing techniques, it's still not possible for setuptools to determine a location reliably. I'd like to continue to explore this problem, but there's no obvious solution, so I will have to defer for now. |
This comment has been minimized.
This comment has been minimized.
|
Original comment by jnrbsn (Bitbucket: jnrbsn, GitHub: jnrbsn): I'm also experiencing this problem. When using IntelliJ IDEA, it underlines the import statement in red and can't find the declaration. I created an empty |
ghost
added
minor
bug
labels
Mar 29, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
As for various tools not being able to resolve namespace packages, well, this is up to the tools, isn't it? |
This comment has been minimized.
This comment has been minimized.
|
@silkentrance I don't think #1312 actually fixes any existing bugs, all it does is provide a new API for people to create namespace packages.
|
This comment has been minimized.
This comment has been minimized.
|
@pganssle Ok, now I understand the issue, thanks for clearing this up. |
ghost commentedSep 17, 2013
Originally reported by: youngrok (Bitbucket: youngrok, GitHub: youngrok)
All of these,
pkgutil.iter_modules,help(modules),pydoc modules, don't show namespace packages. IPython and eclipse pydev code completion doesn't work for namespace packages, either.Of course importing namespace packages has no problem. It works. But supporting tools are also important. Current namespace package spec seems not so good.
It's because of absence of
__init__.py. I know there are various reasons to skip__init__.pywhile installing namespace packages, but if it's not skipped, all problems will be fixed.If we should respect PEP 420,
*-nspkg.pthfile should be fixed. Not just creating new module for namespace package, but registering all submodules of namespace packages is needed.I'm sorry if I've posted this issue on wrong place. I'm confusing I have to post this here or on PEP mailing list.