avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
336 stars 335 forks source link

Avocado lint check is not working on python3.12 #5957

Open richtja opened 3 weeks ago

richtja commented 3 weeks ago

Describe the bug When you run ./selftests/lint.sh on python3.12 with dev installation the test will error with astroid.exceptions.AstroidError.

Steps to reproduce in python3.12 environment:

$ pip install -r requirements-dev.txt
$ python3 -m pip install setuptools
$ python3 setup.py develop --user
$ ./selftests/lint.sh

Expected behavior The test would pass.

Current behavior

Traceback (most recent call last):
  File "/home/janrichter/.pyenv/versions/avocado_3.12/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
             ^^^^^^^^^^^^
  File "/home/janrichter/.pyenv/versions/3.12.0/envs/avocado_3.12/lib/python3.12/site-packages/pylint/__init__.py", line 36, in run_pylint
    PylintRun(argv or sys.argv[1:])
  File "/home/janrichter/.pyenv/versions/3.12.0/envs/avocado_3.12/lib/python3.12/site-packages/pylint/lint/run.py", line 215, in __init__
    linter.check(args)
  File "/home/janrichter/.pyenv/versions/3.12.0/envs/avocado_3.12/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 693, in check
    check_parallel(
  File "/home/janrichter/.pyenv/versions/3.12.0/envs/avocado_3.12/lib/python3.12/site-packages/pylint/lint/parallel.py", line 158, in check_parallel
    for (
  File "/home/janrichter/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/process.py", line 608, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/home/janrichter/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/janrichter/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/janrichter/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/janrichter/.pyenv/versions/3.12.0/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
astroid.exceptions.AstroidError

System information (please complete the following information):


 - Avocado version: `mater`
 - Avocado installation method: github 
PaulYuuu commented 2 weeks ago

pylint==2.17.2 does not support python3.12 I think, and astroid is in the dep-list of pylint.

richtja commented 2 weeks ago

pylint==2.17.2 does not support python3.12 I think, and astroid is in the dep-list of pylint.

Hi @PaulYuuu, yes, you are right. I have created #5959 to update the pylint to a newer version, which should fix this issue.