Hi Contributors,
I am trying to patch something to the pylint code-base and I am running
some tests to make sure there are no breakage. When I was running
test_func.py in /test, I got this -
Traceback (most recent call last):
File "./test_func.py", line 27, in <module>
from pylint.testutils import (make_tests, LintTestUsingModule,
LintTestUsingFile,
File "/Users/ahirnish/pylint_patch/pylint/pylint/testutils.py", line 35,
in <module>
import astroid
File "/Users/ahirnish/pylint_patch/astroid/astroid/__init__.py", line 47,
in <module>
import enum
ImportError: No module named enum
I am using Python 2.7 and when I searched for this error on Google, results
said that 'enum' was introduced from Python3.4 but it was backported to
previous releases too, including 2.7. Owing to the error, I did 'pip
install enum' and now I am seeing this -
Traceback (most recent call last):
File "./test_func.py", line 27, in <module>
from pylint.testutils import (make_tests, LintTestUsingModule,
LintTestUsingFile,
File "/Users/ahirnish/pylint_patch/pylint/pylint/testutils.py", line 35,
in <module>
import astroid
File "/Users/ahirnish/pylint_patch/astroid/astroid/__init__.py", line 51,
in <module>
Load = _Context.Load
AttributeError: 'Enum' object has no attribute 'Load'
This prompted me to ask if Python 3.x is required to run the tests in the
pylint code-base? Or is there something very obvious I am missing here?
Thanks in advance for clarification.
--
Regards,
Ahirnish