Package: pylint
Version: 4.0.6-1
Severity: important

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).


-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 7.1.12+deb14-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pylint depends on:
ii  python3 [python3-supported-max]  3.14.7-3
ii  python3-astroid                  4.3.1-1
ii  python3-dill                     0.4.1-1
ii  python3-isort                    9.0.1-1
ii  python3-logilab-common           2.1.0-2
ii  python3-mccabe                   0.7.0-1
ii  python3-platformdirs             4.10.0-1
ii  python3-tomlkit                  0.13.3-3

Versions of packages pylint recommends:
ii  python3-tk  3.14.7-3

pylint suggests no packages.

-- no debconf information

Reply via email to