Issue
Using {env_site_packages_dir} (or similar substitutions that trigger environment creation) inside set_env in TOML format causes RecursionError: maximum recursion depth exceeded.
The same configuration works fine in INI format because the INI loader defers substitution resolution for set_env values, while the TOML loader eagerly resolves all substitutions via Unroll before constructing SetEnv.
Recursion cycle
set_env (contains {env_site_packages_dir})
→ Unroll resolves {env_site_packages_dir}
→ env_site_packages_dir needs _py_info → create_python_env()
→ reads system_site_packages config
→ default reads environment_variables
→ reads set_env → LOOP
Minimal example
tox.toml:
[env_run_base]
set_env._COVERAGE_SRC = "{env_site_packages_dir}{/}mypackage"
Running any tox command produces:
RecursionError: maximum recursion depth exceeded
Discovered via pypa/virtualenv#3050 when migrating from tox.ini to tox.toml.
Issue
Using
{env_site_packages_dir}(or similar substitutions that trigger environment creation) insideset_envin TOML format causesRecursionError: maximum recursion depth exceeded.The same configuration works fine in INI format because the INI loader defers substitution resolution for
set_envvalues, while the TOML loader eagerly resolves all substitutions viaUnrollbefore constructingSetEnv.Recursion cycle
Minimal example
tox.toml:Running any tox command produces:
Discovered via pypa/virtualenv#3050 when migrating from
tox.initotox.toml.