You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original comment byAdam Groszer (BitBucket: agroszer, GitHub: @agroszer?):
I guess I figured the z3c part.
It is bad namespace declaration, z3c packages use a variation of
#!python
try:
# Declare this a namespace package if pkg_resources is available.
import pkg_resources
pkg_resources.declare_namespace('z3c')
except ImportError:
pass
zope packages use
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
astroid has a workaround that checks for pkgutil.extend_path but not for pkg_resources.declare_namespace (in modutils.py def _module_file).
That's why z3c packages are import-error despite being on PYTHONPATH
Originally reported by: Adam Groszer (BitBucket: agroszer, GitHub: @agroszer?)
When running
$ bin/pylint playground.form
The result is:
But when you run
bin/test
the test passes, IOW z3c packages can be imported.I created a repo to repro this:
https://github.com/agroszer/playground
The text was updated successfully, but these errors were encountered: