tox `requires` raises `KeyError: 'ignore_env_name_mismatch'`
masenf opened this issue · 2 comments
masenf commented
try to run tox
in the examples/
subdir on v0.2.0+
masen@asmbp21 examples % tox -vv
ROOT: 60 D setup logging to DEBUG on pid 7193 [tox/report.py:221]
ROOT: 81 W will run in automatically provisioned tox, host /opt/homebrew/opt/python@3.11/bin/python3.11 is missing [requires (has)]: tox-ignore-env-name-mismatch~=0.2.0 [tox/provision.py:124]
Traceback (most recent call last):
File "/opt/homebrew/bin/tox", line 8, in <module>
sys.exit(run())
^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/run.py", line 19, in run
result = main(sys.argv[1:] if args is None else args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/run.py", line 41, in main
result = provision(state)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/provision.py", line 125, in provision
return run_provision(provision_tox_env, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/provision.py", line 143, in run_provision
tox_env: PythonRun = cast(PythonRun, state.envs[name])
~~~~~~~~~~^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/session/env_select.py", line 336, in __getitem__
return self._defined_envs[item].env
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/session/env_select.py", line 192, in _defined_envs
run_env = self._build_run_env(name)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/session/env_select.py", line 251, in _build_run_env
runner = REGISTER.runner(cast(str, env_conf["runner"]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tox/tox_env/register.py", line 72, in runner
return self._run_envs[name]
~~~~~~~~~~~~~~^^^^^^
KeyError: 'ignore_env_name_mismatch'
This could be considered an upstream bug, since the runner
key is used to activate an alternate runner provided by a plugin, but the tox file cannot provision the plugin if runner
contains invalid keys (that have yet to be registered)
masenf commented
tracking upstream issue tox-dev/tox#2862