-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ImportError
when using PEP 420 namespaces
#1667
Comments
Thanks for the report! We do have a couple of issues related to PEP 420, I'll have to take a look to see exactly why this is not working as intended. As you mentioned, linting with |
In the meantime, I'm going to assign this for the next release so we could fix all these PEP 420 problems before releasing 1.8. |
I'm surprised this hasn't been fixed yet. Pylint simply does not work with implicit namespaces at all. Case in point: pybuilder/pybuilder#818 (comment) |
ImportError
when using PEP 420 namespaces
Also switch to ExecuteCommand fixes pybuilder#818
Also switch to ExecuteCommand fixes pybuilder#818
I have tried to reproduce this on There are many issues with |
I created a label for namespace-package so we can track and close them. There's probably a lot of near-duplicates. |
Fixed in pylint-dev/astroid#1576 -- I'll try to get to a regression test tomorrow. |
Steps to reproduce
Current behavior
ImportError: Unable to find module for /tmp/swh-core/swh/core/api.py in /tmp,
(or equivalent)
Expected behavior
Should be able to walk the module and pylint it.
Note that both "import swh.core" and manually pylinting the specific module that pylint claims is not loadable (
pylint3 swh.core.api
) work just fine.I've given more details about this issue on the code-quality at https://mail.python.org/pipermail/code-quality/2017-September/000937.html (no answer yet at the time of filing this).
I've seen there are a number of PEP 420 related issues, but as far as I can tell they are either supposed to be already fixed in the version of pylint I'm using, or the fail in different ways (e.g., with a proper "cannot load module" message instead of a runaway ImportError exception like in my case).
pylint --version output
pylint3 1.7.2,
astroid 1.5.3
Python 3.5.4 (default, Aug 12 2017, 14:08:14)
[GCC 7.1.0]
The text was updated successfully, but these errors were encountered: