pylint 1.7.1 needs a recent astroid

Bug #1696069 reported by Thomas Morin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Global Requirements
Fix Released
Undecided
Unassigned

Bug Description

When following pylint version requirement change from 1.4.x to 1.7.1, the CI job running pylint for for networking-bagpipe project has the following error:

2017-06-05 12:50:10.651917 | Problem importing module classes.py: cannot import name InconsistentMroError
2017-06-05 12:50:10.653986 | Traceback (most recent call last):
2017-06-05 12:50:10.654069 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/bin/pylint", line 11, in <module>
2017-06-05 12:50:10.654104 | sys.exit(run_pylint())
2017-06-05 12:50:10.654148 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/__init__.py", line 13, in run_pylint
2017-06-05 12:50:10.654160 | Run(sys.argv[1:])
2017-06-05 12:50:10.654197 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/lint.py", line 1220, in __init__
2017-06-05 12:50:10.654210 | linter.load_default_plugins()
2017-06-05 12:50:10.654251 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/lint.py", line 453, in load_default_plugins
2017-06-05 12:50:10.654264 | checkers.initialize(self)
2017-06-05 12:50:10.654309 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/checkers/__init__.py", line 114, in initialize
2017-06-05 12:50:10.654325 | register_plugins(linter, __path__[0])
2017-06-05 12:50:10.654364 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/utils.py", line 992, in register_plugins
2017-06-05 12:50:10.654397 | module = modutils.load_module_from_file(join(directory, filename))
2017-06-05 12:50:10.654438 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/astroid/modutils.py", line 217, in load_module_from_file
2017-06-05 12:50:10.654456 | return load_module_from_modpath(modpath, path, use_sys)
2017-06-05 12:50:10.654495 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/astroid/modutils.py", line 180, in load_module_from_modpath
2017-06-05 12:50:10.654514 | module = imp.load_module(curname, mp_file, mp_filename, mp_desc)
2017-06-05 12:50:10.654552 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/checkers/stdlib.py", line 20, in <module>
2017-06-05 12:50:10.654565 | from pylint.checkers import utils
2017-06-05 12:50:10.654602 | File "/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/local/lib/python2.7/site-packages/pylint/checkers/utils.py", line 41, in <module>
2017-06-05 12:50:10.654616 | astroid.DictComp, astroid.GeneratorExp)
2017-06-05 12:50:10.654633 | AttributeError: 'module' object has no attribute 'GeneratorExp'
2017-06-05 12:50:10.667214 | ERROR: InvocationError: '/home/jenkins/workspace/gate-networking-bagpipe-pep8-ubuntu-xenial/.tox/pep8/bin/pylint -E --rcfile=.pylintrc --output-format=colorized networking_bagpipe'

http://logs.openstack.org/58/470958/1/check/gate-networking-bagpipe-pep8-ubuntu-xenial/f793147/console.html#_2017-06-05_12_50_10_654633

It seems that pylint 1.7.1 requires a recent-enough astroid (with the GeneratorExp attribute), which
the current requirement files prevent from getting:

global-requirements.txt:7:astroid<1.4.0 # LGPLv2.1 # breaks pylint 1.4.4
upper-constraints.txt:131:astroid===1.3.8

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

The GeneratorExp attribute was introduced in 8abf328539e0e5f1dbafe70b773bfebd28afca77 and the first release with this commit is 1.5.0.

So I believe that global requirements should have the most recent astroid 1.5.x, which as of today is 1.5.3.

Revision history for this message
Matthew Thode (prometheanfire) wrote :

pylint was reduced to 1.4.5, solving the issue.

longer term we are moving toward not syncing linters. This would mean projects would have to make sure their linter was compatible with GR/UC.

Changed in openstack-requirements:
status: New → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.1.0

This issue was fixed in the openstack/requirements 1.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.