tox py3-pylint fails with Python 3.7

Bug #1828229 reported by Paride Legovini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Unassigned

Bug Description

When running tox the py3-pylint test fails when using Python 3.7 (the default interpreter in Disco). The full output of tox is attached, however the error is:

py3-pylint runtests: commands[0] | /tmp/curtin/.tox/py3-pylint/bin/python -m pylint --errors-only curtin tests/vmtests
No config file found, using default configuration
Traceback (most recent call last):
  File "/tmp/curtin/.tox/py3-pylint/lib/python3.7/site-packages/astroid/decorators.py", line 89, in wrapped
    res = next(generator)
StopIteration

which brings to:

https://github.com/PyCQA/pylint/issues/2241
https://github.com/PyCQA/pylint/issues/2762

The tl;dr is: a newer pylint is needed. Currently tox.ini specifies a dependency on pylint 1.8.1, bumping this dependency to version 2.3.1 (the latest version) solves the issue, but py3-pylint still fails because of several E1101 errors, e.g.

************* Module curtin.distro
curtin/distro.py:37:4: E1101: Instance of 'Distros' has no 'debian' member (no-member)
curtin/distro.py:37:21: E1101: Instance of 'Distros' has no 'debian' member (no-member)
curtin/distro.py:37:37: E1101: Instance of 'Distros' has no 'ubuntu' member (no-member)
[...]

which are in my opinion false positives.

Revision history for this message
Paride Legovini (paride) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

Thanks, let's update the tox and pylint! =)

The "Fix" for the members, is an update to .pylintrc to hide them from that check, like so:

$ cat .pylintrc
[MASTER]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=4

[TYPECHECK]

# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=Distros.*

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 3bd9b2cb to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=3bd9b2cb

Changed in curtin:
status: New → Fix Committed
Revision history for this message
Dan Watkins (oddbloke) wrote : Fixed in curtin version 19.1.

This bug is believed to be fixed in curtin in version 19.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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