pylint does not work with Python 3.7

Bug #1785080 reported by Benjamin Drung on 2018-08-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
astroid (Debian)
Fix Released
astroid (Ubuntu)
pylint (Debian)
Fix Released
pylint (Ubuntu)

Bug Description

In cosmic, Python 3.7 was added, but pylint does not work with it. Test case:

$ echo "print('test')" >
$ # python3.7 -m pylint
No config file found, using default configuration
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/astroid/", line 89, in wrapped
    res = next(generator)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/astroid/", line 104, in wrapped
    raise StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.7/", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/pylint/", line 7, in <module>
  File "/usr/lib/python3/dist-packages/pylint/", line 16, in run_pylint
  File "/usr/lib/python3/dist-packages/pylint/", line 1347, in __init__
  File "/usr/lib/python3/dist-packages/pylint/", line 768, in check
  File "/usr/lib/python3/dist-packages/pylint/", line 901, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/usr/lib/python3/dist-packages/pylint/", line 980, in check_astroid_module
  File "/usr/lib/python3/dist-packages/pylint/", line 1011, in walk
  File "/usr/lib/python3/dist-packages/pylint/checkers/", line 1571, in visit_module
    self._check_docstring('module', node)
  File "/usr/lib/python3/dist-packages/pylint/checkers/", line 1633, in _check_docstring
    func = utils.safe_infer(node.body[0].value.func)
  File "/usr/lib/python3/dist-packages/pylint/checkers/", line 826, in safe_infer
RuntimeError: generator raised StopIteration

tags: added: cosmic rls-cc-incoming
tags: removed: rls-cc-incoming
tags: added: id-5b6c6dabdb4b64402e84f627
Michael Hudson-Doyle (mwhudson) wrote :

The situation here is a little muddled because upstream has afaik decided to stop supporting Python 2. astroid needs an update, and the version of that that supports Python 3.7 definitely does not support Python 2 at all, so that will need to be split into two source packages. I can't quite tell if pylint (which needs an update separate to astroid) has followed the same path. If it has that will need a similar split too.

Changed in astroid (Debian):
status: Unknown → Confirmed
Mattia Rizzolo (mapreri) on 2018-09-26
Changed in astroid (Ubuntu Cosmic):
status: New → Fix Released
Changed in pylint (Ubuntu Cosmic):
status: New → Fix Released
Changed in pylint (Debian):
status: Unknown → Fix Released
Changed in astroid (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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