#1147092 pylint 4.0.6-1 fails with recent versions of python3-astroid (currently 4.3.1-1)

#1147092#5
Date:
2026-09-07 13:06:26 UTC
From:
To:
After updating to the latest version of python3-astroid in Debian unstable
(4.3.1-1), pylint no longer works.

Even a trivial program such as the below fails:
---
#! /usr/bin/env python3

import os

def main():
    return

if __name__ == "__main__":
    main()
---

With the following:
--- Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pylint/lint/pylinter.py", line 824, in _lint_file check_astroid_module(module) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^ File "/usr/lib/python3/dist-packages/pylint/lint/pylinter.py", line 1056, in check_astroid_module retval = self._check_astroid_module( ast_node, walker, rawcheckers, tokencheckers ) File "/usr/lib/python3/dist-packages/pylint/lint/pylinter.py", line 1108, in _check_astroid_module walker.walk(node) ~~~~~~~~~~~^^^^^^ File "/usr/lib/python3/dist-packages/pylint/utils/ast_walker.py", line 90, in walk self.walk(child) ~~~~~~~~~^^^^^^^ File "/usr/lib/python3/dist-packages/pylint/utils/ast_walker.py", line 87, in walk callback(astroid) ~~~~~~~~^^^^^^^^^ File "/usr/lib/python3/dist-packages/pylint/checkers/variables.py", line 2139, in visit_import module = next(_infer_name_module(node, parts[0])) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pylint/checkers/variables.py", line 220, in _infer_name_module return node.infer(context, asname=False) # type: ignore[no-any-return] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ TypeError: NodeNG.infer() got an unexpected keyword argument 'asname' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pylint/lint/pylinter.py", line 787, in _lint_files self._lint_file(fileitem, module, check_astroid_module) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/pylint/lint/pylinter.py", line 826, in _lint_file raise astroid.AstroidError from e astroid.exceptions.AstroidError --- This seems to be upstream issue https://github.com/pylint- dev/pylint/issues/11164 (which seems to have been fixed upstream).