You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our official pylint version (2.4.4 per ci.reqiurements.txt) chokes on tests/scripts/translate_ciphers.py when run under Python 3.9–3.11. Python ≤3.8 is fine.
$ venv-run venv-3.9 pylint tests/scripts/translate_ciphers.py
Traceback (most recent call last):
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/bin/pylint", line 8, in <module>
sys.exit(run_pylint())
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/__init__.py", line 23, in run_pylint
PylintRun(sys.argv[1:])
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/lint.py", line 1731, in __init__
linter.check(args)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/lint.py", line 1004, in check
self._do_check(files_or_modules)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/lint.py", line 1165, in _do_check
self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/lint.py", line 1252, in check_astroid_module
walker.walk(ast_node)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 77, in walk
self.walk(child)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 77, in walk
self.walk(child)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 77, in walk
self.walk(child)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/utils/ast_walker.py", line 74, in walk
callback(astroid)
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.9/lib/python3.9/site-packages/pylint/checkers/typecheck.py", line 1598, in visit_subscript
inferred = safe_infer(node.slice.value)
AttributeError: 'Name' object has no attribute 'value'
Python 3.12 is even worse: pylint 2.4.4 doesn't work at all.
$ venv-run venv-3.12 pip install pylint==2.4.4
…
$ venv-run venv-3.12 pylint --version
Traceback (most recent call last):
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/bin/pylint", line 5, in <module>
from pylint import run_pylint
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/pylint/__init__.py", line 13, in <module>
from pylint.checkers.similar import Run as SimilarRun
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/pylint/checkers/__init__.py", line 42, in <module>
from pylint.checkers.base_checker import BaseChecker, BaseTokenChecker
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/pylint/checkers/base_checker.py", line 17, in <module>
from pylint.config import OptionsProviderMixIn
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/pylint/config.py", line 49, in <module>
from pylint import utils
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/pylint/utils/__init__.py", line 44, in <module>
from pylint.utils.ast_walker import ASTWalker
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 8, in <module>
from astroid import nodes
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/astroid/__init__.py", line 43, in <module>
import wrapt
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/wrapt/__init__.py", line 10, in <module>
from .decorators import (adapter_factory, AdapterFactory, decorator,
File "/home/gilpes01/z/dev/mbedtls/main/venv-3.12/lib/python3.12/site-packages/wrapt/decorators.py", line 34, in <module>
from inspect import ismethod, isclass, formatargspec
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.12/inspect.py). Did you mean: 'formatargvalues'?
Pylint 2.6.2, which is the last version that supports Python 3.5), works on tests/scripts/translate_ciphers.py, but under Python 3.11 it crashes with a different exception on several files:
gilles-peskine-arm
changed the title
pylint 2.4.4 crashes on tests/scripts/translate_ciphers.py with modern Python
Old pylint versions crash on some of our scripts with modern Python
May 2, 2024
Our official pylint version (2.4.4 per
ci.reqiurements.txt
) chokes ontests/scripts/translate_ciphers.py
when run under Python 3.9–3.11. Python ≤3.8 is fine.Python 3.12 is even worse: pylint 2.4.4 doesn't work at all.
Pylint 2.6.2, which is the last version that supports Python 3.5), works on
tests/scripts/translate_ciphers.py
, but under Python 3.11 it crashes with a different exception on several files:The text was updated successfully, but these errors were encountered: