pylint #99139 Compability with different python flavours [validation pending]
|I would really appreciate if pylint could be run from jython or other python flavours, for this several adjustments are necessary, the first two I encountered are:|
After trying to run pylint from jython I got an errormessage of the following form:
Traceback (most recent call last): File "", line 1, in File "jython2.7a2/Lib/site-packages/pylint/lint.py", line 31, in from pylint.checkers import utils File "jython2.7a2/Lib/site-packages/pylint/checkers/__init__.py", line 44, in from logilab.astng.utils import ASTWalker File "jython2.7a2/Lib/site-packages/logilab/astng/__init__.py", line 58, in from logilab.astng.nodes import * File "jython2.7a2/Lib/site-packages/logilab/astng/nodes.py", line 50, in from logilab.astng.scoped_nodes import Module, GenExpr, Lambda, DictComp, \ File "jython2.7a2/Lib/site-packages/logilab/astng/scoped_nodes.py", line 45, in from logilab.astng.manager import ASTNGManager File "jython2.7a2/Lib/site-packages/logilab/astng/manager.py", line 31, in from logilab.common.modutils import NoSourceFile, is_python_source, \ File "jython2.7a2/Lib/site-packages/logilab/common/modutils.py", line 61, in STD_LIB_DIR = join(get_config_var("LIBDIR"), "python%s" % get_python_version()) File "jython2.7a2/Lib/posixpath.py", line 62, in join elif path == '' or path.endswith('/'): AttributeError: 'NoneType' object has no attribute 'endswith'I could overcome this by changing the behaviour of jython, however I have been led to believe that the error comes from somewhere else inside pylint or its libraries:
Furthermore you use __builtins__ in your code, however this is an implementation detail, as stated here: http://bugs.jython.org/issue1938 you should use __builtin__ instead (notice the missing 's'.
File "/jython2.7a2/Lib/site-packages/pylint/checkers/utils.py", line 97, in builtins = __builtins__.copy() NameError: name '__builtins__' is not definedI would really appreciate it, if I could use pylint with jython.
|closed by||#0fc805bbfbe3 Fix checkers.utils for other implementations (use of __builtins__). Closes #99139. Closes #89838. Theses fixes need fixes on logilab-astng and logilab-common|