'tox -epylint' fails when run locally

Bug #1673824 reported by Tom Barron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Sean McGinnis

Bug Description

When run locally on a current development system, where python 3.5 is the default, 'tox -epylint' fails with the following backtrace:

Traceback (most recent call last):
  File "/home/tbarron/Workspaces/manila/tools/lintstack.head.py", line 230, in <module>
    main()
  File "/home/tbarron/Workspaces/manila/tools/lintstack.head.py", line 220, in main
    generate_error_keys()
  File "/home/tbarron/Workspaces/manila/tools/lintstack.head.py", line 152, in generate_error_keys
    msg = run_pylint()
  File "/home/tbarron/Workspaces/manila/tools/lintstack.head.py", line 143, in run_pylint
    lint.Run(args, reporter=reporter, exit=False)
  File "/home/tbarron/Workspaces/manila/.tox/pylint/lib/python3.5/site-packages/pylint/lint.py", line 890, in __init__
    linter.disable('W0704')
  File "/home/tbarron/Workspaces/manila/.tox/pylint/lib/python3.5/site-packages/pylint/utils.py", line 192, in disable
    msg = self.check_message_id(msgid)
  File "/home/tbarron/Workspaces/manila/.tox/pylint/lib/python3.5/site-packages/pylint/utils.py", line 256, in check_message_id
    raise UnknownMessage('No such message id %s' % msgid)
pylint.utils.UnknownMessage: No such message id W0704
ERROR: InvocationError: '/usr/bin/bash tools/lintstack.sh'
_________________________________________ summary __________________________________________
ERROR: pylint: commands failed

Tom Barron (tpb)
Changed in manila:
assignee: nobody → Tom Barron (tpb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/447049

Changed in manila:
status: New → In Progress
Revision history for this message
Tom Barron (tpb) wrote :

I tried upgrading to pylint 0.27.0. This works with python 3.4 but with 3.5 you get:

AttributeError : 'Call' object has no attribute "starargs"

This issue is fixed at pylint 1.5.0 but from there to the latest version in pypi (1.6.5) we hit:

AttributeError: module 'astroid' has no attribute 'GeneratorExp'

Explicitly adding a requirement for the latest version of astroid on pypi (1.4.9) doesn't help.

The above patch isn't a full fix, which would make our pylint job work with 3.5, but I think that will require waiting for new packages. Would love to be proved wrong. Above patch just pegs the python version to 2.7, which is what runs currently in gate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/447049
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=7dfd141915d7dcec82b7592dc21650493dfc664f
Submitter: Jenkins
Branch: master

commit 7dfd141915d7dcec82b7592dc21650493dfc664f
Author: Tom Barron <email address hidden>
Date: Fri Mar 17 12:02:21 2017 -0400

    set basepython for pylint tox env

    to python2.7 so that running locally will succeed
    and the results will match those for the gate
    pylint job.

    Partial-Bug: #1673824

    Change-Id: I6c45a32ba8e77c35403357b0100379bb536a36b3

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/572991

Changed in manila:
assignee: Tom Barron (tpb) → Sean McGinnis (sean-mcginnis)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/572991
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=4c943fbcb25f4d4f8e2e9d8b77f0e389bed13c8b
Submitter: Zuul
Branch: master

commit 4c943fbcb25f4d4f8e2e9d8b77f0e389bed13c8b
Author: Sean McGinnis <email address hidden>
Date: Wed Jun 6 13:54:18 2018 -0500

    Default pylint to run using python3

    Updates the pylint and lint jobs to run under python3 by
    changing the target python and updating the version of
    pylint used.

    Change-Id: Ie0ac158674fb22054b80864d33d9d7ecc82e3b36
    Closes-bug: #1673824

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 7.0.0.0b2

This issue was fixed in the openstack/manila 7.0.0.0b2 development milestone.

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.