tox-dev / tox-travis

Seamless integration of tox into Travis CI
https://tox-travis.readthedocs.io
MIT License
202 stars 34 forks source link

Not working with Python 3.10 in Linux #158

Closed airvzxf closed 2 years ago

airvzxf commented 2 years ago

Trying to run a GitHub action which use all the versions of Ubuntu (18.04, 20.04 and 22.04), the tox-travis is not working if I am using the Python version 3.10. It is working for Python versions: 3.7, 3.8 and 3.9.

I researched, and the problem could fix with the follow post: StackOverflow ➟ Python - can't import Set from sets ("no module named sets").

Logs:

[7135] /home/runner/work/Pext/Pext$ /home/runner/work/Pext/Pext/.tox/py310/bin/pep257 pext/ pext_dev/__main__.py
Traceback (most recent call last):
  File "/home/runner/work/Pext/Pext/.tox/py310/bin/pep257", line 5, in <module>
    from pep257 import main
  File "/home/runner/work/Pext/Pext/.tox/py310/lib/python3.10/site-packages/pep257.py", line 24, in <module>
    from collections import defaultdict, namedtuple, Set
ImportError: cannot import name 'Set' from 'collections' (/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/collections/__init__.py)
ERROR: InvocationError for command /home/runner/work/Pext/Pext/.tox/py310/bin/pep257 pext/ pext_dev/__main__.py (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py310: commands failed
Error: Process completed with exit code 1.
hugovk commented 2 years ago

Looks like the problem is really in Pext using pep257, which hasn't been updated in 7 years and so doesn't support Python 3.10.

Pext should use something else instead of pep257.