Skip to content

tox4: infinite recursivity if any plugin is added to requires (regression) #2414

@ssbarnea

Description

@ssbarnea

Calling tox with tox 4 will produce an infinite loop, something that is not happening with tox 3.

[tox]
# adding any tox plugin below would trigger the recursive bug when calling tox
requires =
    tox-gh-actions
    # tox-extra

[testenv]
commands =
    tox --showconfig
deps = tox>=4.0.0b2

I do need to call tox from within an environment as I am testing some integration with it as my tool does parse the output of tox --showconfig. That worked fine for tox 3 but seems to fail with tox 4.

It seems that what is causing the loop is the requires =, as it puts tox into a loop of truing to provision itself:

  File "/Users/ssbarnea/c/a/zzz/.tox/.tox/.tox/.tox/.tox/.tox/.tox/.tox/lib/python3.10/site-packages/tox/tox_env/python/pip/req/file.py", line 14, in <module>
    import chardet
  File "/Users/ssbarnea/c/a/zzz/.tox/.tox/.tox/.tox/.tox/.tox/.tox/.tox/lib/python3.10/site-packages/chardet/__init__.py", line 19, in <module>
    from .universaldetector import UniversalDetector
  File "/Users/ssbarnea/c/a/zzz/.tox/.tox/.tox/.tox/.tox/.tox/.tox/.tox/lib/python3.10/site-packages/chardet/universaldetector.py", line 48, in <module>
    from .sbcsgroupprober import SBCSGroupProber
  File "/Users/ssbarnea/c/a/zzz/.tox/.tox/.tox/.tox/.tox/.tox/.tox/.tox/lib/python3.10/site-packages/chardet/sbcsgroupprober.py", line 37, in <module>
    from .langrussianmodel import (IBM855_RUSSIAN_MODEL, IBM866_RUSSIAN_MODEL,
KeyboardInterrupt

Metadata

Metadata

Assignees

Labels

bug:normalaffects many people or has quite an impact

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions