NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #908 most downloaded on PyPI
tox is a generic virtualenv management and test command line tool
Latest stable
4.67.15
Last release 5 days ago
17 Nov 2026
Ships fairly regularly
a new release about every 1 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
16 years old
344 releases · first in 2010
Drag across the ruler to compare, or tap a release to open it.
Create the work directory with owner-only access on POSIX also when no package is built; under a permissive umask it was created group-writable, leavi
Create the work directory with owner-only access on POSIX also when no package is built; under a permissive umask it was created group-writable, leaving the environments inside it reachable by other accounts (4449) by gaborbernat. (4444)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
An environment name that combines an interpreter prefix with an explicit version, such as pypy-3.10 , now works together with other factors. pypy-3.10
pypy-3.10, now works together with other factors. pypy-3.10-lint or tests-cpython-3.13 used to fail with conflicting factors, because the prefix and the version were read as two separate Python factors. With ignore_base_python_conflict, such an environment name now takes precedence over base_python as other Python factors already do, so pypy-3.10-lint runs on pypy3.10 instead of the configured base_python (#4404) by @syahra712 and @gaborbernat.set_env entry with an empty name, such as =value in tox.ini or an environment file, or "" = "value" in a TOML table, now fails as invalid instead of passing an unnamed variable to the commands, which broke them on Windows (#4423) by @arindam77 and @gaborbernat. (#4422)set_env entries back out as lines, for example to combine a {[section]set_env} reference with an --override, a value ending in a backslash no longer swallows the environment marker that follows it, which made a variable scoped to one platform apply everywhere (#4426) by @anwang132 and @gaborbernat. (#4425)--override that appends with +=, such as testenv:py.deps+=pytest-xdist, now appends to the value the environment inherits from [testenv] or env_run_base instead of replacing it. Appending to a set such as labels adds to it, and appending to a single value such as description fails with an error, as it already did within one section (#4434) by @hemtilva and @gaborbernat. (#4432)--use-feature in deps or a requirements file now accepts any feature name and leaves the check to pip, instead of rejecting every name other than 2020-resolver and fast-deps (#4436) by @Doomguy-BFG9000 and @gaborbernat. (#4435)1 minute instead of 60 seconds, and a hundredth of a second after a whole minute, hour or day, as in 1 minute 0.01 seconds, is no longer dropped (#4420) by @syahra712 and @gaborbernat.system_site_packages now recreates the environment. Before, tox reused the existing environment, which kept the old setting because virtualenv applies it only when it creates one. An environment created with the setting on by an earlier tox release is recreated once after upgrading (#4393) by @abhishekcpp007 and @gaborbernat."dev" == extra when selecting package dependencies (#4397) by @Jinyong-Li and @gaborbernat.RecursionError (#4439) by @Ramji-Purwar and @gaborbernat.tox config and {[testenv:NAME]commands} references now keep the - and ! exit-code prefixes of commands, so an inherited ignored or inverted command no longer turns into a plain one (#4421) by @anubhavlal07 and @gaborbernat.{factor:label} now resolves a labeled factor value that contains a dash, such as flit-core, instead of falling back to its default (#4406) by @gaborbernat.{factor:label} now resolves to the factor the label's group put in the environment name when two groups share a value. Before, with factors = [{ source = ["py312", "py313"] }, { target = ["py312", "py313"] }], the environment migrate-py313-py312 read py312 for both labels (#4402) by @Kernel-Hunter and @gaborbernat.log or tmp folder, should live as it treats a symlink: it replaces the junction without touching the files of its target, also when the target is missing. A junction at the environment directory itself makes tox fail with is a link where this environment should live unless -r is given, instead of raising FileExistsError (#4418) by @subotac and @gaborbernat.pkg_dir reference that it belongs to packaging environments and show how a run environment refers to it (#4428) by @vudigapranav and @gaborbernat. (#4424).dist-info/sboms directory, written at build time by python-sbom (#4403) by @gaborbernat.An environment name that combines an interpreter prefix with an explicit version, such as pypy-3.10, now works together with other factors. pypy-3.10-lint or tests-cpython-3.13 used to fail with conflicting factors, because the prefix and the version were read as two separate Python factors. With ignore_base_python_conflict, such an environment name now takes precedence over base_python as other Python factors already do, so pypy-3.10-lint runs on pypy3.10 instead of the configured base_python (4404) by syahra712 and gaborbernat.
A set_env entry with an empty name, such as =value in tox.ini or an environment file, or "" = "value" in a TOML table, now fails as invalid instead of passing an unnamed variable to the commands, which broke them on Windows (4423) by arindam77 and gaborbernat. (4422)
When tox writes set_env entries back out as lines, for example to combine a {[section]set_env} reference with an --override, a value ending in a backslash no longer swallows the environment marker that follows it, which made a variable scoped to one platform apply everywhere (4426) by anwang132 and gaborbernat. (4425)
An environment specific --override that appends with +=, such as testenv:py.deps+=pytest-xdist, now appends to the value the environment inherits from [testenv] or env_run_base instead of replacing it. Appending to a set such as labels adds to it, and appending to a single value such as description fails with an error, as it already did within one section (4434) by hemtilva and gaborbernat. (4432)
--use-feature in deps or a requirements file now accepts any feature name and leaves the check to pip, instead of rejecting every name other than 2020-resolver and fast-deps (4436) by Doomguy-BFG9000 and gaborbernat. (4435)
A duration just under a whole minute, hour or day, such as 59.999 seconds, is now shown as 1 minute instead of 60 seconds, and a hundredth of a second after a whole minute, hour or day, as in 1 minute 0.01 seconds, is no longer dropped (4420) by syahra712 and gaborbernat.
Changing system_site_packages now recreates the environment. Before, tox reused the existing environment, which kept the old setting because virtualenv applies it only when it creates one. An environment created with the setting on by an earlier tox release is recreated once after upgrading (4393) by abhishekcpp007 and gaborbernat.
Honor encoding declarations in the first two lines of requirements files before trying UTF-8 or the locale encoding. A declared encoding Python does not know fails the environment with an error naming the file instead of an internal error (4440) by Ramji-Purwar and gaborbernat.
Recognize reversed extra markers such as "dev" == extra when selecting package dependencies (4397) by Jinyong-Li and gaborbernat.
Report circular requirements and constraints file includes with a clear error instead of raising RecursionError (4439) by Ramji-Purwar and gaborbernat.
tox config and {[testenv:NAME]commands} references now keep the - and ! exit-code prefixes of commands, so an inherited ignored or inverted command no longer turns into a plain one (4421) by anubhavlal07 and gaborbernat.
{factor:label} now resolves a labeled factor value that contains a dash, such as flit-core, instead of falling back to its default (4406) by gaborbernat.
{factor:label} now resolves to the factor the label's group put in the environment name when two groups share a value. Before, with factors = [{ source = ["py312", "py313"] }, { target = ["py312", "py313"] }], the environment migrate-py313-py312 read py312 for both labels (4402) by Kernel-Hunter and gaborbernat.
tox now treats a Windows junction where a run environment's directory, or its log or tmp folder, should live as it treats a symlink: it replaces the junction without touching the files of its target, also when the target is missing. A junction at the environment directory itself makes tox fail with is a link where this environment should live unless -r is given, instead of raising FileExistsError (4418) by subotac and gaborbernat.
Explain in the pkg_dir reference that it belongs to packaging environments and show how a run environment refers to it (4428) by vudigapranav and gaborbernat. (4424)
Document that package staging creates the work directory with owner-only access, why a process running as another account then fails to import from an environment, and how to opt out by creating the work directory or changing its mode (4448) by gaborbernat. (4444)
Every wheel now carries a PEP 770 CycloneDX SBOM in its .dist-info/sboms directory, written at build time by python-sbom (4403) by gaborbernat.
Relative {glob:...} and TOML replace = "glob" patterns now match files when tox_root contains [ , * or ? . tox treats those characters in the project
{glob:...} and TOML replace = "glob" patterns now match files when tox_root contains [, * or ?. tox treats those characters in the project path literally while keeping wildcards in the configured pattern (#4389) by @qodelicious and @gaborbernat.work_dir or tox_root contains [, * or ?, tox now treats those characters literally in its own executable paths and in default or relative package_glob patterns. This lets it run environment commands and find packages built by package = external (#4390) by @qodelicious and @gaborbernat.Relative {glob:...} and TOML replace = "glob" patterns now match files when tox_root contains [, * or ?. tox treats those characters in the project path literally while keeping wildcards in the configured pattern (4389) by qodelicious and gaborbernat.
When work_dir or tox_root contains [, * or ?, tox now treats those characters literally in its own executable paths and in default or relative package_glob patterns. This lets it run environment commands and find packages built by package = external (4390) by qodelicious and gaborbernat.
A quoted set_env value that ends with a literal backslash and contains a semicolon no longer loses its quote protection, so WINPATH="C:\tools;C:\bin\\
set_env value that ends with a literal backslash and contains a semicolon no longer loses its quote protection, so WINPATH="C:\tools;C:\bin\\" keeps the whole value instead of failing with invalid marker. tox now counts the backslashes in front of a quote: an even number leaves the quote unescaped (#4388) by @haigou-web and @gaborbernat. (#4387)A quoted set_env value that ends with a literal backslash and contains a semicolon no longer loses its quote protection, so WINPATH="C:\tools;C:\bin\\" keeps the whole value instead of failing with invalid marker. tox now counts the backslashes in front of a quote: an even number leaves the quote unescaped (4388) by haigou-web and gaborbernat. (4387)
Package staging no longer fails on a .tox that only the project's own writers can change, such as one owned by the workspace owner while root runs tox
.tox that only the project's own writers can change, such as one owned by the workspace owner while root runs tox, or a 777 build directory on Bitbucket. A work directory that other accounts could change, such as a 777 .tox left by an older tox under umask 000 or restored from a CI cache, is made private and emptied once at the start of a run, so tox recreates its environments instead of failing. When staging still refuses a path, the error names its owner and mode (#4386) by @gaborbernat. (#4376)Package staging no longer fails on a .tox that only the project's own writers can change, such as one owned by the workspace owner while root runs tox, or a 777 build directory on Bitbucket. A work directory that other accounts could change, such as a 777 .tox left by an older tox under umask 000 or restored from a CI cache, is made private and emptied once at the start of a run, so tox recreates its environments instead of failing. When staging still refuses a path, the error names its owner and mode (4386) by gaborbernat. (4376)
A pair of numbers after a - is no longer read as a range, so py-django-4-2 keeps its name instead of splitting into py-django-4 , 3 and 2 . Braced ran
- is no longer read as a range, so py-django-4-2 keeps its name instead of splitting into py-django-4, 3 and 2. Braced ranges such as py-django-{4-5} still expand (#4380) by @ericdelorefice and @gaborbernat.deps, such as -r "sub dir/base.txt", now have their quotes removed as they do on other platforms and in pip; before, the quotes stayed in the path and the file could not be opened. On every platform, a quoted -r, -c or -f value in deps keeps its spaces as written instead of gaining literal backslashes (#4381) by @abo3losh1 and @gaborbernat.A pair of numbers after a - is no longer read as a range, so py-django-4-2 keeps its name instead of splitting into py-django-4, 3 and 2. Braced ranges such as py-django-{4-5} still expand (4380) by ericdelorefice and gaborbernat.
On Windows, quoted option values in requirements files and deps, such as -r "sub dir/base.txt", now have their quotes removed as they do on other platforms and in pip; before, the quotes stayed in the path and the file could not be opened. On every platform, a quoted -r, -c or -f value in deps keeps its spaces as written instead of gaining literal backslashes (4381) by abo3losh1 and gaborbernat.
🐍 PyPI release 📜 Full Changelog
A .tox created under umask 002 no longer fails the package staging check. When the current user owns a group-writable work directory left by an older
.tox created under umask 002 no longer fails the package staging check. When the current user owns a group-writable work directory left by an older tox, tox makes it owner-only and removes group write from the staging directories inside it. Provisioning runs the same repair before starting the provisioned tox, which may be a release without it, and creates a missing work directory owner-only. Previously, such checkouts failed until .tox was deleted, and a fresh .tox also failed when tox provisioned itself (#4377) by @gaborbernat. (#4376)A .tox created under umask 002 no longer fails the package staging check. When the current user owns a group-writable work directory left by an older tox, tox makes it owner-only and removes group write from the staging directories inside it. Provisioning runs the same repair before starting the provisioned tox, which may be a release without it, and creates a missing work directory owner-only. Previously, such checkouts failed until .tox was deleted, and a fresh .tox also failed when tox provisioned itself (4377) by gaborbernat. (4376)
PEP 723 metadata lines with content now require a space after # . Empty blocks count when detecting duplicates, and invalid requires-python values rep
#. Empty blocks count when detecting duplicates, and invalid requires-python values report a configuration error. Previously, malformed content lines could make tox read metadata that other script runners ignored (#4371) by @abhishekcpp007 and @gaborbernat.PEP 723 metadata lines with content now require a space after #. Empty blocks count when detecting duplicates, and invalid requires-python values report a configuration error. Previously, malformed content lines could make tox read metadata that other script runners ignored (4371) by abhishekcpp007 and gaborbernat.
Package builds now work under umasks such as 0002 because tox creates new staging directories and missing parents with owner-only access. Existing dir
0002 because tox creates new staging directories and missing parents with owner-only access. Existing directories keep their permissions (#4360) by @stephenfin and @gaborbernat.tox config no longer fails with an AssertionError when an environment uses a runner whose plugin is not installed. It skips that environment, as tox run and tox list already do (#4361) by @nk-batman21 and @gaborbernat.set_env markers now report the key. For INI values, the error explains how to write a literal semicolon as \; (#4364) by @faresrafat3 and @gaborbernat.--runner so --runner virtualenv does not fail with an empty choices list (#4365) (#4367) by @gaborbernat.base_python against environment names (#4369) by @mayankdhingra02 and @gaborbernat.--config-settings (-C) on requirement lines in requirements files, which pip supports, instead of failing with unrecognized arguments; it is still rejected when written in deps directly, like --hash (#4366) by @mmporong and @gaborbernat.Package builds now work under umasks such as 0002 because tox creates new staging directories and missing parents with owner-only access. Existing directories keep their permissions (4360) by stephenfin and gaborbernat.
tox config no longer fails with an AssertionError when an environment uses a runner whose plugin is not installed. It skips that environment, as tox run and tox list already do (4361) by nk-batman21 and gaborbernat.
Invalid set_env markers now report the key. For INI values, the error explains how to write a literal semicolon as \; (4364) by faresrafat3 and gaborbernat.
Restore built-in runner choices for --runner so --runner virtualenv does not fail with an empty choices list (4365) (4367) by gaborbernat.
Compare interpreter implementation names without regard to case when validating base_python against environment names (4369) by mayankdhingra02 and gaborbernat.
Accept --config-settings (-C) on requirement lines in requirements files, which pip supports, instead of failing with unrecognized arguments; it is still rejected when written in deps directly, like --hash (4366) by mmporong and gaborbernat.
A packaging environment whose base_python (or default_base_python ) is not installed no longer crashes with KeyError: 'skip_missing_interpreters' . It
base_python (or default_base_python) is not installed no longer crashes with KeyError: 'skip_missing_interpreters'. It now fails with the missing interpreter, or skips the run environment when skip_missing_interpreters is true, as tox did before 4.36.0 (#4213) by @gaborbernat. (#4212)demo[dev]; python_version < '3.10' keeps the version condition on dependencies from dev (#4216) by @ericdelorefice and @gaborbernat.pylock.toml or a tox user configuration file (TOX_USER_CONFIG_FILE) saved with a UTF-8 byte order mark, as some Windows editors do, is now read instead of failing with a TOML decode error or being ignored with failed to read config file (#4217) by @pcbeingused333.args_are_paths enabled, a positional argument naming an existing file whose rewritten path relative to change_dir starts with - (for example tests/--config=evil.cfg) is now prefixed with ./ so the command still receives a path instead of an option (#4317) by @rahuldevikar and @gaborbernat. (#4218)replace table with a nonempty marker now raises an error instead of adding its internal value and marker keys to deps or requires. Markers on set_env values remain supported (#4320) by @rahuldevikar and @gaborbernat. (#4220)commands setting with {env:...} reports its type instead of the substituted text (#4327) by @rahuldevikar and @gaborbernat. (#4221)--installpkg out of tox's provisioning environment while installing them in the requested test environments (#4304) by @Pratham2511 and @gaborbernat. (#4222)file: URI passed to --installpkg is now percent-decoded once instead of twice, so a path containing a literal % sequence, such as a directory named feature%2Flogin, selects the package the user named (#4300) by @pcbeingused333 and @gaborbernat. (#4223)TOX_INSTALL_PKG or user configuration install_pkg path is now resolved against the invocation directory, as --installpkg already was, so tox inspects and installs from the same path (#4333) by @rahuldevikar and @gaborbernat. (#4224)meta_dir because the build frontend empties that directory during metadata preparation (#4332) by @rahuldevikar and @gaborbernat. (#4225)base_python (for example {env:TOXPYTHON:python3.11} with TOXPYTHON empty) now fails during configuration with base_python for env <name> is empty. Blank entries in a base_python list are ignored (#4326) by @rahuldevikar and @gaborbernat. (#4226)env_tmp_dir = {env:SCRATCH_DIR} with SCRATCH_DIR unset, now fails with a configuration error instead of resolving to the current directory, which tox could then clear (#4330) by @rahuldevikar and @gaborbernat. (#4227)-f py legacy, with that flag. The command scanner took a later value matching a subcommand as the command, causing environments without that factor to run (#4319) by @rahuldevikar and @gaborbernat. (#4228)--installpkg now produce errors that name the artifact instead of internal error tracebacks (#4287) by @santhiprakash and @gaborbernat. (#4230)set_env file assignments with a handled input error instead of a subprocess traceback (#4279) by @Doomguy-BFG9000 and @gaborbernat. (#4231)dependencies as requirements before installing them. An invalid entry such as a pip option fails before tox passes the dependencies to pip (#4306) by @santhiprakash and @gaborbernat. (#4233)editable-legacy install path from the packaging environment's package_root instead of the core one, so a package_root set in [testenv:.pkg] no longer pairs the built package with the dependencies declared next to tox.ini (#4321) by @rahuldevikar and @gaborbernat. (#4234)tox list to create file.lock under the link target (#4311) by @rahuldevikar and @gaborbernat. (#4235)${VAR} in requirements and constraints files using the environment running pip, including pass_env and set_env, instead of the tox process. A variable absent from that environment stays literal, so tox cannot put its host value in a fetched URL. To retain expansion, add it to pass_env or define it with set_env (#4323) by @rahuldevikar and @gaborbernat. (#4236)tox -h no longer prints secret-looking --key=value values from TOX_OVERRIDE. Conversion warnings also mask those values in invalid TOX_ options (#4303) by @faresrafat3 and @gaborbernat. (#4238)tox.toml or pyproject.toml string with literal braces around text containing a colon, such as a JSON argument holding a URL or a time, is now kept as written, as in tox.ini, instead of being read as a {key:default} reference. Positional arguments such as set_env:x passed into such braces through {posargs} no longer expand into the value of that setting (#4269) by @Anandb71 and @gaborbernat. (#4239).tox-info.json contains a non-mapping value for a section that requires a mapping (#4258) by @haigou-web and @gaborbernat. (#4241)change_dir (#4256) by @Fire162 and @gaborbernat. (#4242)base_python_file rejects non-regular files, undecodable content, and version lines over 1024 characters with a handled error naming the file. It reads comments in bounded chunks, so a long comment can still precede the version (#4325) by @rahuldevikar and @gaborbernat. (#4243)base_python_file now accepts only a Python version specifier (such as 3.13 or pypy3.10) from the version file. A path or program name there no longer makes tox start that program during interpreter discovery, and the rejected line is not echoed in the error message (#4324) by @rahuldevikar and @gaborbernat. (#4244)deps or constraints entry that directly substitutes a host variable via {env:NAME} or a TOML replace = "env" table now passes ${OTHER} text in that value to pip unchanged. A TOML reference to the loaded entry keeps the same behavior. A ${NAME} reference written in the configuration or a substitution default still expands (#4329) by @rahuldevikar and @gaborbernat. (#4245)pylock now evaluates Python and platform markers using a complete environment from the target interpreter. Previously, missing values such as implementation_version came from the Python running tox, which could select a package locked for the wrong interpreter (#4331) by @rahuldevikar and @gaborbernat. (#4246)pylock.toml, reject whitespace or control characters in hash tokens, archive or VCS URLs, commit IDs, and subdirectories before writing pip requirements. A line break in one of these fields could add a pip option such as --index-url. The check also covers values pip expands from ${VAR} references. Changing a referenced value reinstalls the locked packages (#4315) by @rahuldevikar and @gaborbernat. (#4247)requires (such as tox @ file:///path/to/tox.whl) now triggers provisioning unless the installed distribution's direct_url.json records the requested source, including a supported archive hash, subdirectory, or VCS revision. pip discards fragment fields such as egg; these no longer trigger repeat provisioning. When the installer omits credentials from the origin record, a credentialed direct URL without a requested archive hash fails with an explanation instead of hanging during provisioning (#4314) by @rahuldevikar and @gaborbernat. (#4248)tarfile data filter, tox checks each member as it extracts the archive (#4316) by @rahuldevikar and @gaborbernat. (#4249)set_env file line, since its content may contain a secret (#4298) by @r3wretrhy and @gaborbernat. (#4250)tox config INI, JSON, and TOML output when a configuration key reads non-UTF-8 data (#4302) by @ducanhnguyen223, ducanhnguyen223 and @gaborbernat. (#4251).tox-info.json no longer supplies cached state. When tox writes state, it replaces the link and leaves its target untouched (#4322) by @rahuldevikar and @gaborbernat. (#4253)virtualenv_spec, tox removes a link at the cache path and creates the replacement without venv's clear option. A link placed there after cleanup and before directory creation stops the rebuild without emptying its target (#4313) by @rahuldevikar and @gaborbernat. (#4254)UnicodeEncodeError. The stream keeps its encoding (#4257) by @haigou-web and @gaborbernat. (#4255)tox-uv (#4337) by @gaborbernat. (#4336)set_env into deps or constraints now keeps ${NAME} text literal for pip. A ${NAME} written in the configuration still expands (#4342) by @gaborbernat. (#4338)virtualenv_spec bootstrap environment no longer writes through a junction swapped into its cache entry. A linked project work directory still works; the work directory must allow temporary subdirectories (#4341) by @gaborbernat. (#4339)test_parallel_general uses an absolute missing-interpreter path to avoid Windows registry probes in CI (#4346) by @gaborbernat. (#4344)set_env line with a substituted key keeps its value in one variable, even when the input contains a line break. A key that expands to = or a line separator raises an error (#4265) by @gaborbernat.{env:NAME} that references itself twice could stall tox during recursive expansion. tox now stops expansion at the first depth-limit hit, logs one warning, and leaves the remaining text unexpanded (#4272) by @gaborbernat.set_env keeps {env:...} values intact when the source environment inherits the setting, uses setenv or comes from a generative section. The TOML string form "{[env.name]set_env}" does the same. Line breaks, ; and file| text inside values no longer become set_env syntax (#4268) by @gaborbernat.pylock.toml, including malformed TOML or non-UTF-8 bytes, now reports invalid pylock file with the filename and the parser or decoder error instead of an internal traceback (#4215) by @PRINCE2-AI, Prince and @gaborbernat.-c configuration now looks for an inline plugin in the requested file's parent directory or inside the selected directory (#4267) by @gaborbernat.{tox_root}, {env_tmp_dir} or {env_python} within one argument, including when the path contains spaces, quotes or backslashes. The same applies to tox-provided values such as {host_python} and {tox_root_name}, entries of a list such as {base_python}, and file names matched by {glob:PATTERN}. Command values set with -x or TOX_OVERRIDE follow the same rule (#4290) by @gaborbernat.deps now preserve each pip option operand as one argument. A substituted --find-links path containing spaces can no longer add options to the command. The tox config display escapes spaces, quotes and backslashes in those operands (#4276) by @gaborbernat."--title={env:TITLE}" is one argument even when the value of TITLE holds quotes or whitespace, as it is for a TOML argument array. tox used to paste the value into the command text before splitting it, so a quote in the value ended the argument and the rest of the value arrived as further arguments of the command. install_command and list_dependencies_command get the same handling (#4283) by @gaborbernat.requires direct URLs in missing-requirement messages and echoed provisioning commands (#4334) by @gaborbernat.ExecuteRequest representations (#4264) by @gaborbernat..venv redirect. A concurrent path swap can no longer redirect removal or replacement into another directory (#4308) by @gaborbernat.PATH entries from the command's working directory. The allowlist_externals check and TOX_LIMITED_SHEBANG interpreter selection use the file that the child executes (#4275) by @gaborbernat.{[testenv:a]commands} now preserve argument boundaries when a positional argument contains an apostrophe or backslash. tox config displays the command with the same quoting tox uses to parse a reference (#4277) by @gaborbernat..venv redirect. A concurrent directory rename or junction added to an empty project directory cannot redirect a write or removal into another project. Redirect writes replace .venv with a temporary file, leaving the target of a swapped .venv symlink or hard link unchanged (#4335) by @gaborbernat..bat and .cmd commands for cmd.exe. Values containing shell operators or percent signs reach the batch file without starting another command or expanding environment variables. Batch scripts that inspect raw %1 may now see surrounding quotes for arguments that need them (#4288) by @gaborbernat.base_python entry to virtualenv as a separate --python argument. virtualenv split the old VIRTUALENV_PYTHON value on commas and os.pathsep, then tried the first candidate last; that could start an unintended program (#4292) by @gaborbernat.- using ./ on POSIX or .\ on Windows. The resulting pip argument no longer starts with - (#4266) by @gaborbernat.# in INI references to paths, so change_dir, env_dir and set_env = file|... use the checkout directory when its name contains #. On POSIX, requirement-file paths with a space before # remain readable (#4285) by @gaborbernat.--no-capture or setting up an environment with tox exec (#4301) by @Pratham2511 and @gaborbernat.deps or constraints entry, and a backslash ending a substituted requirement line. Also reject line breaks and trailing backslashes in globbed requirement paths and provisioning requirements. These values can no longer add pip options or consume the following entry (#4295) by @gaborbernat.env_list entry. This prevents a value inside one requires entry from adding a requirement, and a value inside one env_list entry from selecting another environment. A substitution that occupies a whole entry can still expand to several entries. The same check applies to text overrides supplied with -x or TOX_OVERRIDE (#4284) by @gaborbernat.{posargs} and INI command references. This prevents a line break in one argument from starting another command (#4294) by @gaborbernat.-c/--conf path from the typed line when loading toxfile.py and offering environments. While that path is incomplete, completion loads no inline plugin (#4278) by @gaborbernat.-m tox re-exec, Python no longer puts the start directory first on sys.path, where an unrelated file could replace tox or a dependency (#4270) by @gaborbernat.-c/--conf or --root before options defined by an inline plugin (#4281) by @gaborbernat.tox exec or commands = {posargs}, tox now leaves a bare program name such as python unchanged. It also leaves a bare executable first positional value unchanged, including when a command uses that value as data, because wrappers can run it as a program. A same-named file in the start directory no longer replaces the environment's program. An explicit path such as ./python still follows args_are_paths (#4289) by @gaborbernat.TOX_LIMITED_SHEBANG enabled, tox now keeps quote and backslash characters in an unquoted shebang interpreter path. They no longer change the executable tox starts. The existing double-quoted form for paths with spaces remains supported (#4274) by @gaborbernat.args_are_paths on POSIX, tox now rewrites positional paths from the resolved change_dir. A linked .tox can no longer redirect a positional path to a file beside the link target (#4273) by @gaborbernat.pylock and dependency_groups now use package_root when a run has no package environment. They previously used tox_root in that case (#4299) by @pcbeingused333 and @gaborbernat.env_list, label or package environment name from selecting a directory outside work_dir (#4271) by @gaborbernat.env_dir, env_tmp_dir, env_log_dir, work_dir, temp_dir, package_root, meta_dir, pkg_dir and package_glob values against tox_root. With tox -c path/to/tox.ini started elsewhere, it no longer clears or reuses those directories in the start directory or selects a package from there (#4291) by @gaborbernat.{glob:PATTERN} matches and TOX_FACTOR_<label> overrides literally in INI configuration: a {...} or [] in them is no longer substituted again, so tox run -- '{env:SECRET}' hands the command {env:SECRET} instead of the variable's value and tox run -- '{posargs} -x' stays one argument. The DEFAULTS of {posargs:DEFAULTS} and referenced keys still expand their own substitutions (#4286) by @gaborbernat.deps or constraints substitutions, including ${VAR} expansion. tox still accepts options written on the same line in either setting (#4297) by @gaborbernat.virtualenv_spec as a virtualenv requirement with optional version specifiers before invoking pip (#4261) by @gaborbernat.rmtree and O_DIRECTORY/O_NOFOLLOW are available, clean environment, log, and temporary directories relative to an open directory descriptor so a symlink swap cannot redirect deletions outside tox's work directory. Replace a link already at the cleanup path without emptying its target (#4296) by @gaborbernat.set_env environment files now split entries only at LF or CR line endings. Embedded Unicode separators no longer start a new variable (#4260) by @gaborbernat.A dependency group entry that refers to the project's own extra with an environment marker, such as demo[dev]; python_version < "3.10" , now keeps tha
demo[dev]; python_version < "3.10", now keeps that marker on the extra's requirements instead of installing them on every interpreter (#4211) by @ericdelorefice and @gaborbernat.A dependency group entry that refers to the project's own extra with an environment marker, such as demo[dev]; python_version < "3.10", now keeps that marker on the extra's requirements instead of installing them on every interpreter (4211) by ericdelorefice and gaborbernat.
An open-ended factor range whose explicit bound sits outside the supported CPython window no longer expands to nothing. An INI env_list such as py3{16
env_list such as py3{16-} used to fail with ValueError: py3{}, and a TOML range dict expanded to an empty axis, dropping that dimension from the matrix (#4176) by @HyperionBurn and @gaborbernat.replace = "glob" table now substitutes its pattern and default, matching the INI {glob:PATTERN:DEFAULT} form, so pattern = "{env_name}/*.whl" matches files instead of a literal {env_name} directory (#4180) by @ag3ntsc4rn and @gaborbernat. (#4178)--force-dep now matches dependency names after PEP 503 normalization, so --force-dep typing-extensions==4.9.0 replaces Typing_Extensions==4.12.2 in deps instead of passing both pins to pip, and replaces a Typing_Extensions requirement from the package metadata, where tox used to drop the forced pin (#4181) by @ag3ntsc4rn and @gaborbernat. (#4179){glob:PATTERN:DEFAULT} with a single-letter pattern and an absolute default, such as {glob:z:/fallback}, no longer expands to an empty string on POSIX: tox now looks for a Windows drive letter in the pattern only on Windows (#4183) by @JingHao-Leon and @gaborbernat. (#4182){ replace = "env" } table in set_env whose default ends in a backslash now resolves to the variable or the default, instead of the literal {env:...} text (#4185) by @JingHao-Leon and @gaborbernat. (#4184)--no-index in a requirements file or deps now wins over --index-url and --extra-index-url on the same or a later line, as in pip. Previously tox dropped it and installed from those indexes, and from PyPI too when given an --extra-index-url (#4187) by @syahra712 and @gaborbernat.pyproject.toml no longer breaks dependency_groups or reading the package's static dependencies from [project], and one in a base_python_file such as .python-version is no longer read as part of the Python version (#4188) by @pcbeingused333 and @gaborbernat.--parallel auto now counts the CPUs tox may run on instead of every CPU in the machine, so it respects the CPU affinity mask set by taskset or a container's cpuset (and PYTHON_CPU_COUNT on Python 3.13+) (#4190) by @mehdimirzafaruk and @gaborbernat.{ replace = "ref", env = ..., key = ... } now takes a path (change_dir, env_dir), set (extras, labels, dependency_groups) or environment list (depends) value from another environment, instead of failing validation of the referencing key (#4192) by @pcbeingused333 and @gaborbernat.--result-json is now always written as UTF-8 instead of the locale's preferred encoding. Captured output that a legacy Windows code page cannot represent, or that holds bytes which are not valid UTF-8, no longer crashes the run at the end with a truncated file; the invalid bytes are stored as \uXXXX escapes (#4194) by @mehdimirzafaruk and @gaborbernat.lint-[ab] and lint-[!a] in an ini depends now load, as the depends reference documents, instead of failing to load the configuration (#4195) by @nk-batman21 and @gaborbernat.tox run-parallel does (#4196) by @Rodrigo-Palma and @gaborbernat.constrain_package_deps constraints file, so pip no longer rejects it (#4203) by @ericdelorefice and @gaborbernat.PYTHONHASHSEED no longer makes every tox command fail with ValueError. tox treats it as unset, as Python does, and picks a random seed (#4205) by @devYRPauli and @gaborbernat.[vars] values that contain spaces, and how quotes stored in those values pair with the quotes around them (#4197) by @Blues-berry and @gaborbernat. (#4191)An open-ended factor range whose explicit bound sits outside the supported CPython window no longer expands to nothing. An INI env_list such as py3{16-} used to fail with ValueError: py3{}, and a TOML range dict expanded to an empty axis, dropping that dimension from the matrix (4176) by HyperionBurn and gaborbernat.
A TOML replace = "glob" table now substitutes its pattern and default, matching the INI {glob:PATTERN:DEFAULT} form, so pattern = "{env_name}/*.whl" matches files instead of a literal {env_name} directory (4180) by ag3ntsc4rn and gaborbernat. (4178)
--force-dep now matches dependency names after PEP 503 normalization, so --force-dep typing-extensions==4.9.0 replaces Typing_Extensions==4.12.2 in deps instead of passing both pins to pip, and replaces a Typing_Extensions requirement from the package metadata, where tox used to drop the forced pin (4181) by ag3ntsc4rn and gaborbernat. (4179)
{glob:PATTERN:DEFAULT} with a single-letter pattern and an absolute default, such as {glob:z:/fallback}, no longer expands to an empty string on POSIX: tox now looks for a Windows drive letter in the pattern only on Windows (4183) by JingHao-Leon and gaborbernat. (4182)
A TOML { replace = "env" } table in set_env whose default ends in a backslash now resolves to the variable or the default, instead of the literal {env:...} text (4185) by JingHao-Leon and gaborbernat. (4184)
--no-index in a requirements file or deps now wins over --index-url and --extra-index-url on the same or a later line, as in pip. Previously tox dropped it and installed from those indexes, and from PyPI too when given an --extra-index-url (4187) by syahra712 and gaborbernat.
A leading UTF-8 byte order mark in pyproject.toml no longer breaks dependency_groups or reading the package's static dependencies from [project], and one in a base_python_file such as .python-version is no longer read as part of the Python version (4188) by pcbeingused333 and gaborbernat.
--parallel auto now counts the CPUs tox may run on instead of every CPU in the machine, so it respects the CPU affinity mask set by taskset or a container's cpuset (and PYTHON_CPU_COUNT on Python 3.13+) (4190) by mehdimirzafaruk and gaborbernat.
A TOML { replace = "ref", env = ..., key = ... } now takes a path (change_dir, env_dir), set (extras, labels, dependency_groups) or environment list (depends) value from another environment, instead of failing validation of the referencing key (4192) by pcbeingused333 and gaborbernat.
--result-json is now always written as UTF-8 instead of the locale's preferred encoding. Captured output that a legacy Windows code page cannot represent, or that holds bytes which are not valid UTF-8, no longer crashes the run at the end with a truncated file; the invalid bytes are stored as \uXXXX escapes (4194) by mehdimirzafaruk and gaborbernat.
Glob character sets such as lint-[ab] and lint-[!a] in an ini depends now load, as the depends reference documents, instead of failing to load the configuration (4195) by nk-batman21 and gaborbernat.
Disable the parallel spinner by default in CI for the legacy command, as tox run-parallel does (4196) by Rodrigo-Palma and gaborbernat.
Leave extras, editables, local directories and source archives out of the constrain_package_deps constraints file, so pip no longer rejects it (4203) by ericdelorefice and gaborbernat.
An empty PYTHONHASHSEED no longer makes every tox command fail with ValueError. tox treats it as unset, as Python does, and picks a random seed (4205) by devYRPauli and gaborbernat.
Explain how to quote command arguments built from [vars] values that contain spaces, and how quotes stored in those values pair with the quotes around them (4197) by Blues-berry and gaborbernat. (4191)
Releases now run on the shared tox-dev/github-workflows pipeline, with a locked release toolchain and generated GitHub Release notes ( #4202 ) by @gab
Releases now run on the shared tox-dev/github-workflows pipeline, with a locked release toolchain and generated GitHub Release notes (4202) by gaborbernat.
Preserve ignore ( - ) and invert ( ! ) exit code prefixes on commands when referenced via TOML { replace = "ref", ... } .
-) and invert (!) exit code prefixes on commands when referenced via TOML { replace = "ref", ... }. (#4169)pylock.toml with no dependency_groups selected now uses the lock file's default-groups, as PEP 751 specifies. Previously packages marked 'default' in dependency_groups (as written by pdm export -f pylock) were skipped by @pcbeingused333. (#4173){factor:N} label in an env_base now resolves against that table's own factors, so with several env_base tables or an env_list product it no longer expands to an empty string. (#4174)Preserve ignore (-) and invert (!) exit code prefixes on commands when referenced via TOML { replace = "ref", ... }. (4169)
Installing from a pylock.toml with no dependency_groups selected now uses the lock file's default-groups, as PEP 751 specifies. Previously packages marked 'default' in dependency_groups (as written by pdm export -f pylock) were skipped - by pcbeingused333. (4173)
A positional {factor:N} label in an env_base now resolves against that table's own factors, so with several env_base tables or an env_list product it no longer expands to an empty string. (4174)
Allow opting in to tox substitutions within TOML positional arguments with substitute = true .
substitute = true. (#4165)--no-capture, so tox --no-capture no longer hangs at started backend while waiting for the backend's reply. (#4163)tox.ini, setup.cfg, tox.toml or a TOML pyproject.toml no longer stops the configuration from loading - editors on Windows may add one. (#4166)tox --no-provision <command> no longer treats the command as the JSON output path: a global option placed before a subcommand now keeps it, so tox --no-provision list lists the environments instead of writing a file named list. (#4168)Allow opting in to tox substitutions within TOML positional arguments with substitute = true. (4165)
Keep capturing the output of the packaging backend with --no-capture, so tox --no-capture no longer hangs at started backend while waiting for the backend's reply. (4163)
A leading UTF-8 byte order mark in tox.ini, setup.cfg, tox.toml or a TOML pyproject.toml no longer stops the configuration from loading - editors on Windows may add one. (4166)
tox --no-provision <command> no longer treats the command as the JSON output path: a global option placed before a subcommand now keeps it, so tox --no-provision list lists the environments instead of writing a file named list. (4168)
Link overridden argparse methods and logging.Handler.name in the plugin API reference. (4170)
set_env environment files accept export KEY=value lines, setting KEY by @RavSinghChandan .
set_env environment files accept export KEY=value lines, setting KEY by @RavSinghChandan. (#4161)PATH scan for every setting that needs it, so tox config and tox run on configurations listing interpreters that are not installed are faster. (#4162)set_env environment files accept export KEY=value lines, setting KEY - by RavSinghChandan. (4161)
Remember a failed interpreter lookup for a virtualenv environment instead of repeating the full PATH scan for every setting that needs it, so tox config and tox run on configurations listing interpreters that are not installed are faster. (4162)
Preserve literal single and double quotes in Windows command arguments.
tox -- "'x'" passes 'x' to the command as on Linux (#4160)Preserve literal single and double quotes in Windows command arguments. (4159)
Keep quotes in positional arguments on Windows, so tox -- "'x'" passes 'x' to the command as on Linux (4160)
Keep braces that are not a substitution in TOML configurations, as INI does, so {} in find -exec or a dict literal in python -c reaches the command in
{} in find -exec or a dict literal in python -c reaches the command intact (#4150)Keep braces that are not a substitution in TOML configurations, as INI does, so {} in find -exec or a dict literal in python -c reaches the command intact (4150)
Clarify how TOX_ environment variables set CLI option defaults and how TOX_OVERRIDE changes configuration values.
TOX_ environment variables set CLI option defaults and how TOX_OVERRIDE changes configuration values. (#4146)Clarify how TOX_ environment variables set CLI option defaults and how TOX_OVERRIDE changes configuration values. (4146)
Allow --skip-env with -e, -m, and -f so it filters the selected environments
<a name="release-4-65-3-fixed"></a>
--skip-env with -e, -m, and -f so it filters the selected environments (#4143)Allow --skip-env with -e, -m, and -f so it filters the selected environments (4143)
A dependency_groups run whose package root has no pyproject.toml now fails with the path it looked at, instead of installing none of the requested gro
dependency_groups run whose package root has no pyproject.toml now fails with the path it looked at, instead of installing none of the requested groups and reporting success by @feiiiiii5. (#4142)A dependency_groups run whose package root has no pyproject.toml now fails with the path it looked at, instead of installing none of the requested groups and reporting success - by feiiiiii5. (4142)
tox removes read-only files on Windows when it empties an environment's tmp or log directory, or the whole environment on recreate - by SulimanAbdulra
tox removes read-only files on Windows when it empties an environment's tmp or log directory, or the whole
environment on recreate - by SulimanAbdulrazzaq.
internal error.Full Changelog: 4.65.0...4.65.1
tox removes read-only files on Windows when it empties an environment's tmp or log directory, or the whole environment on recreate - by SulimanAbdulrazzaq.
A read-only file in the directory itself used to stop every later run with internal error.
A read-only file in a sub-directory used to stay behind without a warning. (4138)
Use Python 3.15 for development and automation. (4139)
Include the plugin documentation in source distributions so downstream packagers can run the plugin example tests. (4140)
Bump the default maximum CPython minor version to 3.15 in generative environment lists.
--result-json and tox config -o create the missing parent directory of the output file instead of crashing -set_env env file that is a directory or not UTF-8 fails the environment with a configuration error instead of acommands = [] clears env_log_dir at the start of the run instead of keeping logs@impl from the tox_append_version_info plugin doc examples, since it made tox skip the inline plugin - byFull Changelog: 4.64.10...4.65.0
<a name="release-4-65-0-added"></a>
<a name="release-4-65-0-fixed"></a>
--result-json and tox config -o create the missing parent directory of the output file instead of crashing by @SulimanAbdulrazzaq. (#4126)set_env env file that is a directory or not UTF-8 fails the environment with a configuration error instead of a traceback, and a leading UTF-8 byte order mark no longer ends up in the first key by @SulimanAbdulrazzaq. (#4127)commands = [] clears env_log_dir at the start of the run instead of keeping logs from the previous run by @glaziermag. (#4130)<a name="release-4-65-0-documentation"></a>
@impl from the tox_append_version_info plugin doc examples, since it made tox skip the inline plugin by @Rodrigo-Palma. (#4135)Bump the default maximum CPython minor version to 3.15 in generative environment lists. (4136)
--result-json and tox config -o create the missing parent directory of the output file instead of crashing - by SulimanAbdulrazzaq. (4126)
A set_env env file that is a directory or not UTF-8 fails the environment with a configuration error instead of a traceback, and a leading UTF-8 byte order mark no longer ends up in the first key - by SulimanAbdulrazzaq. (4127)
A reused environment with commands = [] clears env_log_dir at the start of the run instead of keeping logs from the previous run - by glaziermag. (4130)
Drop @impl from the tox_append_version_info plugin doc examples, since it made tox skip the inline plugin - by Rodrigo-Palma. (4135)
🔧 fix(type): pass ty 0.0.85 by @gaborbernat in #4123
Full Changelog: 4.64.9...4.64.10
<a name="release-4-64-10-fixed"></a>
-x overrides and values set by plugins by @hfycium. (#4118)! that exits with 0 now fails the environment with exit code 1; before, tox reported it as a success by @feiiiiii5. (#4119)! that cannot start, such as a missing executable, now fails the environment instead of passing by @feiiiiii5. (#4125)Report an invalid configuration value as a one-line error naming the environment and key instead of a traceback, including -x overrides and values set by plugins - by hfycium. (4118)
A command prefixed with ! that exits with 0 now fails the environment with exit code 1; before, tox reported it as a success - by feiiiiii5. (4119)
Recreating an environment or clearing its temporary and log directories removes symlinks to directories, leaving their targets intact - by gaborbernat. (4121)
A command prefixed with ! that cannot start, such as a missing executable, now fails the environment instead of passing - by feiiiiii5. (4125)
🐛 fix(config): substitute inside set_env override values by @Rodrigo-Palma in #4116
Full Changelog: 4.64.8...4.64.9
<a name="release-4-64-9-fixed"></a>
file| entries in set_env overrides passed through -x or TOX_OVERRIDE. Appended blocks replace inherited values while preserving explicit keys in the same or later overrides. Preserve these rules through section references, including native TOML arrays with extend = true. Resolve env-file selectors and values in the consuming environment. Prevent included values from overriding tox's own variables by @Rodrigo-Palma. (#4116)Resolve substitutions and file| entries in set_env overrides passed through -x or TOX_OVERRIDE. Appended blocks replace inherited values while preserving explicit keys in the same or later overrides. Preserve these rules through section references, including native TOML arrays with extend = true. Resolve env-file selectors and values in the consuming environment. Prevent included values from overriding tox's own variables - by Rodrigo-Palma. (4116)
🐛 fix(pip): combine --no-binary and --only-binary across requirement lines by @SulimanAbdulrazzaq in #4110
Full Changelog: 4.64.7...4.64.8
<a name="release-4-64-8-fixed"></a>
--no-binary and --only-binary across the lines of deps and of requirements files the way pip does, where the last line used to replace the earlier ones. With --only-binary :all: and a --no-binary exception, tox passes --only-binary to pip first, so pip keeps the exception. tox config shows the merged values tox passes to pip by @SulimanAbdulrazzaq. (#4110)tox config shows deps with every global option merged the way tox passes it to pip, a later -i replacing an earlier one and repeated flags shown once, and reports the error tox run would raise for invalid deps. constraints shows the configured files instead of the path of tox.ini, and a comment line in constraints no longer fails the run. deps that give pip nothing to install no longer conflict with pylock. set_env includes PIP_USER, TOX_ENV_DIR, TOX_ENV_NAME, TOX_WORK_DIR and VIRTUAL_ENV, the values tox sets for commands by @gaborbernat. (#4111)ref to another environment's deps, constraints or commands works in tox config and tox run. It used to fail with 'PythonDeps' object is not iterable or Command(args=[...]) is not list by @gaborbernat. (#4112)commands, commands_pre and commands_post, a reference such as pip install {[testenv:x]deps} that shares its line with other text joins the referenced lines into that one command as arguments, as in tox 3. tox used to run each referenced line after the first as a separate command. A reference alone on its line still expands to one command per referenced line. This changes echo {[testenv:x]commands}, which now runs one echo with every referenced command as its arguments by @gaborbernat. (#4113)requires with the text of provision_tox_env, so editors showed the wrong hover for it by @gaborbernat. (#4115)<a name="release-4-64-8-documentation"></a>
args_are_paths (True), pkg_dir ({env_dir}/dist), skip_missing_interpreters (False), min_version (unset) and requires (tox) by @Rodrigo-Palma. (#4114)fix(man): give each shell a working MANPATH line by @Rodrigo-Palma in #4109
Full Changelog: 4.64.6...4.64.7
<a name="release-4-64-7-fixed"></a>
tox man suggests ~/.profile instead of ~/.zshrc when the shell is not fish, bash, zsh, csh or tcsh, for example sh, ksh or an unset SHELL by @Rodrigo-Palma.
/home/zshuser/bin/bash gets ~/.bashrc.. <file> instead of source <file>, since dash has no source.MANPATH was unset, instead of hiding every other man page.setenv line for ~/.tcshrc or ~/.cshrc instead of an export line for ~/.profile. (#4109)tox man suggests ~/.profile instead of ~/.zshrc when the shell is not fish, bash, zsh, csh or tcsh, for example sh, ksh or an unset SHELL - by Rodrigo-Palma.
tox picks the shell from the executable name, so /home/zshuser/bin/bash gets ~/.bashrc.
Outside fish, csh and tcsh, the reload hint reads . <file> instead of source <file>, since dash has no source.
The fish line keeps the default man path when MANPATH was unset, instead of hiding every other man page.
csh and tcsh get a setenv line for ~/.tcshrc or ~/.cshrc instead of an export line for ~/.profile. (4109)
fix(config): tie spliced set_env markers to their value by @feiiiiii5 in #4107
Full Changelog: 4.64.5...4.64.6
<a name="release-4-64-6-fixed"></a>
tox -e and TOXENV accept every interpreter name that picks a base_python for an environment the configuration does not declare by @breken-ai.
cpython313, cpython-3.13, graalpy311, jython2.7, rustpython3 and ironpython3 select that interpreter instead of failing with "provided environments not found".d debug-build suffix works too, for example py313d.cython313 now fails as an unknown environment; it used to run on the Python that tox runs under. (#4106)set_env block pulled in with {[section]set_env} now applies a PEP-508 marker only to the value it came with, as the inline and TOML forms already do by @feiiiiii5. A false marker on an earlier line no longer hides a value that the inheriting environment, a later unconditional line or an environment file supplies. (#4107)set_env values resolve when tox reads them, so {env:KEY} sees the keys a block pulls in with {[section]set_env}, and a { replace = "env" } table sees the keys next to it by @gaborbernat, found by @breken-ai. Configurations that see a difference:
PYTHONHASHSEED = {env:PYTHONHASHSEED:0}, reads the host variable or its default, as the same line written in place does. It used to read the value tox sets.set_env wins over the same key pulled in from another section, and a later pulled-in section wins over an earlier one, at every nesting level. A nested section could override the section that included it before.tox config shows the keys of every pulled-in section that tox run sets.ref to itself, and values that refer to each other fail the environment with the cycle. They used to fail with a traceback or "could not find python interpreter", and values that referred to each other inside a pulled-in section read the host variables without a warning. (#4108)fix(github): restore issue template metadata by @gaborbernat in #4100
Full Changelog: 4.64.4...4.64.5
<a name="release-4-64-5-fixed"></a>
platform regular expression now fails the environment with a one-line error instead of a traceback, also for the provisioning environment by @00200200. (#4103)An invalid platform regular expression now fails the environment with a one-line error instead of a traceback, also for the provisioning environment - by 00200200. (4103)
fix(pip): pass --pre once in the default command by @Rodrigo-Palma in #4097
Full Changelog: 4.64.3...4.64.4
<a name="release-4-64-4-fixed"></a>
--pre once, before the packages, in the default install_command with pip_pre set to true. (#4097)TOX_LABELS=old;new selects environments labeled old or new, and TOX_LIST_KEYS_ONLY=env_name;deps selects both configuration keys. Support list-valued options without an explicit default or element type, including append actions. (#4098)Pass --pre once, before the packages, in the default install_command with pip_pre set to true. (4097)
Fix list conversion for command line defaults from environment variables and user configuration files. For example, TOX_LABELS=old;new selects environments labeled old or new, and TOX_LIST_KEYS_ONLY=env_name;deps selects both configuration keys. Support list-valued options without an explicit default or element type, including append actions. (4098)
Create change_dir before running the external package build command by @Rodrigo-Palma in #4095
Full Changelog: 4.64.2...4.64.3
<a name="release-4-64-3-fixed"></a>
set_env written as a list of tables in TOML now keeps every file entry and honors the order of the entries, so merging one environment's set_env into another no longer drops the environment file it referenced (#4093) by @Rodrigo-Palma.
{ file = "..." } entry is read; previously only the last one survived, because the entries were merged into a single table first and a table cannot hold the key twice.file entry wins over the value the file provides, matching the file| form in INI; previously a repeated variable was pulled back to its first position, letting the file override it.change_dir directory before running the build commands, as the documentation already promises. (#4095)🐛 fix(run): keep .venv redirect off for a .venv env by @gaborbernat in #4091
Full Changelog: 4.64.1...4.64.2
<a name="release-4-64-2-fixed"></a>
env_dir = "{tox_root}/.venv" no longer crashes with FileExistsError after another environment ran (#4090) by @gaborbernat.
venv_redirect unset, the new default, tox writes the redirect file unless a tox environment lives at .venv; with true, tox fails the run with an error naming that environment..venv redirect file now names a deliberate development environment by @gaborbernat.
venv_redirect_env, else an environment named dev, else the first that installs the project in development mode, and writes nothing without one, so a project that uses tox for tests alone gets no file.tox devenv points the redirect at the environment it creates, and later runs leave it in place.A tox environment with env_dir = "{tox_root}/.venv" no longer crashes with FileExistsError after another environment ran (4090) - by gaborbernat.
With venv_redirect unset, the new default, tox writes the redirect file unless a tox environment lives at .venv; with true, tox fails the run with an error naming that environment.
tox deletes a redirect file it wrote where an environment should live, and fails the environment with an error naming any other file there. (4091)
The PEP 832 .venv redirect file now names a deliberate development environment - by gaborbernat.
tox picks venv_redirect_env, else an environment named dev, else the first that installs the project in development mode, and writes nothing without one, so a project that uses tox for tests alone gets no file.
tox devenv points the redirect at the environment it creates, and later runs leave it in place.
tox tells virtualenv to write no redirect file of its own beside the environments it builds. (4092)
🐛 fix(config): apply overrides to sections the file lacks by @gaborbernat in #4089
Full Changelog: 4.64.0...4.64.1
<a name="release-4-64-1-fixed"></a>
-x/--override and TOX_OVERRIDE values that target a section the configuration file does not define, such as tox.skip_missing_interpreters on a tox.ini without a [tox] section, instead of dropping them by @gaborbernat. (#4089)Apply -x/--override and TOX_OVERRIDE values that target a section the configuration file does not define, such as tox.skip_missing_interpreters on a tox.ini without a [tox] section, instead of dropping them - by gaborbernat. (4089)
docs: fix the TOML string substitution example by @agammann in #4081
Full Changelog: 4.63.0...4.64.0
<a name="release-4-64-0-added"></a>
.venv redirect file at a tox environment after each run, so editors such as VS Code or PyCharm pick it as the project interpreter instead of asking you for a path under .tox by @gaborbernat.
dev, then one installing the project in development mode, then the first of env_list; set venv_redirect_env to choose another..venv directory alone, and a redirect file pointing outside its environments.venv_redirect to false to opt out.<a name="release-4-64-0-fixed"></a>
<a name="release-4-64-0-documentation"></a>
Point a PEP 832 .venv redirect file at a tox environment after each run, so editors such as VS Code or PyCharm pick it as the project interpreter instead of asking you for a path under .tox - by gaborbernat.
tox picks an environment named dev, then one installing the project in development mode, then the first of env_list; set venv_redirect_env to choose another.
tox leaves a .venv directory alone, and a redirect file pointing outside its environments.
tox removes the redirect while it recreates the target and writes it back once the run ends.
Set venv_redirect to false to opt out.
The feature is provisional while PEP 832 is a draft: a minor or patch release may change it in backward incompatible ways to follow the PEP. (4013)
The user configuration file is now read as UTF-8 instead of the platform's locale encoding, so a config holding non-ASCII values is no longer silently discarded on Windows - by MohammedAlkindi. (4086)
Fix the invalid table header in the TOML string substitution example. (4081)
🐛 fix(run): keep package env interrupt logs in parallel by @gaborbernat in #4079
Full Changelog: 4.62.1...4.63.0
<a name="release-4-63-0-added"></a>
tox.execute.api.FinishedExecuteStatus to report a fixed exit code for a command that already finished or never started by @gaborbernat. (#4080)<a name="release-4-63-0-fixed"></a>
pyproject.toml under a name that is not normalized, such as Foo_Bar, are now installed when requested as extras = foo-bar while tox installs a package's dependencies by @gaborbernat. (#4080)Plugins and test helpers can use tox.execute.api.FinishedExecuteStatus to report a fixed exit code for a command that already finished or never started - by gaborbernat. (4080)
Interrupting a parallel run with Ctrl-C no longer loses the log lines about stopping the package environment, which could appear or vanish depending on thread timing - by gaborbernat. (4079)
Optional dependencies declared in pyproject.toml under a name that is not normalized, such as Foo_Bar, are now installed when requested as extras = foo-bar while tox installs a package's dependencies - by gaborbernat. (4080)
test: skip POSIX-venv wheel-build tests on Windows by @iam-kira in #4078
Full Changelog: 4.62.0...4.62.1
<a name="release-4-62-1-fixed"></a>
set_env values override conditional entries, including environment files. (#4076)Clear obsolete markers when unconditional set_env values override conditional entries, including environment files. (4076)
🐛 fix(type): pass the latest ty and close Any gaps by @gaborbernat in #4075
Full Changelog: 4.61.5...4.62.0
<a name="release-4-62-0-added"></a>
ConfigSet.get_optional, which verifies the value against its declared type and returns None when it is not set by @gaborbernat. (#4075)<a name="release-4-62-0-fixed"></a>
TOX_FACTOR_<label> to an empty value now resolves {factor:<label>} to an empty string instead of being ignored by @gaborbernat. (#4073)Plugins can read a configuration value that may be unset through ConfigSet.get_optional, which verifies the value against its declared type and returns None when it is not set - by gaborbernat. (4075)
Setting TOX_FACTOR_<label> to an empty value now resolves {factor:<label>} to an empty string instead of being ignored - by gaborbernat. (4073)
chore(type): narrow execute_async cwd for pyrefly 1.3 by @yuefdev in #4069
Full Changelog: 4.61.4...4.61.5
<a name="release-4-61-5-fixed"></a>
set_env list in TOML no longer fails to load; like an empty table, it clears inherited variables by @yuefdev. (#4065)true or false as start or stop instead of reading them as 1 and 0 by @yuefdev. (#4066){factor:label:} fallback instead of using the declared factor group default. (#4072)<a name="release-4-61-5-documentation"></a>
Loader.build documented a future parameter it no longer takes and left factory undocumented, so the plugin API reference listed a parameter that does not exist by @hxperl. (#4070)An empty set_env list in TOML no longer fails to load; like an empty table, it clears inherited variables - by yuefdev. (4065)
A TOML factor range now rejects true or false as start or stop instead of reading them as 1 and 0 - by yuefdev. (4066)
Preserve an explicitly empty {factor:label:} fallback instead of using the declared factor group default. (4072)
Loader.build documented a future parameter it no longer takes and left factory undocumented, so the plugin API reference listed a parameter that does not exist - by hxperl. (4070)
🐛 fix(execute): keep spaces in quoted shebang interpreter paths by @r3wretrhy in #4064
Full Changelog: 4.61.3...4.61.4
<a name="release-4-61-4-fixed"></a>
shlex, so a quoted interpreter path that contains spaces is kept as one argument when TOX_LIMITED_SHEBANG rewrites the invocation by @r3wretrhy. (#4064)Shebang parsing now uses shlex, so a quoted interpreter path that contains spaces is kept as one argument when TOX_LIMITED_SHEBANG rewrites the invocation - by r3wretrhy. (4064)
📝 docs: name the actor across the factor and override prose by @gaborbernat in #4058
Full Changelog: 4.61.2...4.61.3
<a name="release-4-61-3-fixed"></a>
set_env environment file (file|.env) is now read as UTF-8 instead of the platform's locale encoding, so non-ASCII values no longer arrive mangled on Windows by @MohammedAlkindi. (#4059)env_list by @dylanpulver. (#4062)A set_env environment file (file|.env) is now read as UTF-8 instead of the platform's locale encoding, so non-ASCII values no longer arrive mangled on Windows - by MohammedAlkindi. (4059)
Preserve UNC and extended-length paths in Windows commands, including quoted paths - by MohammedAlkindi. (4060)
Normalize project and extra names in dependency-group self-references - by MohammedAlkindi. (4061)
Register factor labels and defaults for bare labeled dicts in env_list - by dylanpulver. (4062)
chore: add license-files, remove licence classifier (PEP 639) by @mwtoews in #4052
Full Changelog: 4.61.1...4.61.2
<a name="release-4-61-2-fixed"></a>
py313-django4-2 keeps its name rather than becoming py313-django4, 3 and 2 by @MohammedAlkindi. (#4053)<a name="release-4-61-2-documentation"></a>
interrupt_post_commands runs commands_post after an interrupt, and config_file_path, host_python, home and tox_root_name are constants a configuration can substitute by @gaborbernat. (#4056)tox now expands a generative digit range only where a factor starts, so an environment such as py313-django4-2 keeps its name rather than becoming py313-django4, 3 and 2 - by MohammedAlkindi. (4053)
Document how factors work in one place, covering what a factor is, the characters tox accepts in one, the platform and architecture factors that apply to conditions without appearing in a name, and how selecting by factor differs from selecting by name - by gaborbernat. (4055)
Give a reference entry to the configuration keys that had none. interrupt_post_commands runs commands_post after an interrupt, and config_file_path, host_python, home and tox_root_name are constants a configuration can substitute - by gaborbernat. (4056)
🐛 fix(schema): declare prefix in the labeled factor group's not clause by @gaborbernat in #4051
Full Changelog: 4.61.0...4.61.1
<a name="release-4-61-1-fixed"></a>
Publish a JSON Schema that compiles under SchemaStore's validator again, so editors pick up the configuration keys added since 4.56 - by gaborbernat. (4051)
Replace deprecated load_module in docs conf by @gaborbernat in #4043
Full Changelog: 4.60.1...4.61.0
<a name="release-4-61-0-added"></a>
default for {factor:label} to fall back on when no factor of that group is active in the environment name. Setting TOX_FACTOR_<label> resolves that label to a given value for a single run by @gaborbernat. (#4045)factors = [{ py_version = { prefix = "3.", start = 12, stop = 14 } }], which makes {factor:py_version} available for ranges by @gaborbernat. (#4046)<a name="release-4-61-0-fixed"></a>
--override/-x or TOX_OVERRIDE now resolve substitutions such as {posargs}, {env:VAR} and {env_name}, instead of reaching the environment as literal text by @gaborbernat. (#4047)<a name="release-4-61-0-documentation"></a>
A labeled factor group can now declare a default for {factor:label} to fall back on when no factor of that group is active in the environment name. Setting TOX_FACTOR_<label> resolves that label to a given value for a single run - by gaborbernat. (4045)
A factor range now takes a label when you nest it under one, as in factors = [{ py_version = { prefix = "3.", start = 12, stop = 14 } }], which makes {factor:py_version} available for ranges - by gaborbernat. (4046)
Values passed via --override/-x or TOX_OVERRIDE now resolve substitutions such as {posargs}, {env:VAR} and {env_name}, instead of reaching the environment as literal text - by gaborbernat. (4047)
Point the virtualenv discovery link in the explanation documentation at its current location. (4042)
Stop Windows pytest-timeout kills in CI by @gaborbernat in #4026
Full Changelog: 4.60.0...4.60.1
<a name="release-4-60-1-fixed"></a>
tox.ini or setup.cfg as a handled error during config discovery instead of raising an unhandled Error traceback by @VXNCXNX (#4027)[tox] core section (such as min_version, requires or env_list) as a handled error instead of an unhandled traceback, matching the existing TOML loader behavior by @VXNCXNX (#4028)--skip-env/TOX_SKIP_ENV regular expression as a handled error instead of raising an unhandled re.error traceback by @VXNCXNX (#4029); inside values read from a set_env environment file (file|.env). Environment file lines are plain KEY=VALUE pairs and were incorrectly parsed with the PEP-508 marker splitter, which truncated values such as DATABASE_URL=postgresql://host/db?opt=1;sslmode=require at the first semicolon by @VXNCXNX (#4030)install_command or list_dependencies_command in a TOML configuration as a handled error instead of an unhandled traceback by @dylanpulver (#4041)Report a malformed tox.ini or setup.cfg as a handled error during config discovery instead of raising an unhandled configparser.Error traceback - by VXNCXNX (4027)
Report an invalid value in the ini [tox] core section (such as min_version, requires or env_list) as a handled error instead of an unhandled traceback, matching the existing TOML loader behavior - by VXNCXNX (4028)
Report an invalid --skip-env/TOX_SKIP_ENV regular expression as a handled error instead of raising an unhandled re.error traceback - by VXNCXNX (4029)
Keep ; inside values read from a set_env environment file (file|.env). Environment file lines are plain KEY=VALUE pairs and were incorrectly parsed with the PEP-508 marker splitter, which truncated values such as DATABASE_URL=postgresql://host/db?opt=1;sslmode=require at the first semicolon - by VXNCXNX (4030)
Report a handled configuration error instead of leaking a traceback when the selected configuration file exists but cannot be read - by SirHegel. (4031)
Report an empty install_command or list_dependencies_command in a TOML configuration as a handled error instead of an unhandled traceback - by dylanpulver (4041)
📄 docs: publish llms.txt from the docs build by @gaborbernat in #4023
Full Changelog: 4.59.0...4.60.0
<a name="release-4-60-0-added"></a>
{home} and {tox_root_name} substitutions; set work_dir to e.g. "{home}/.local/state/tox/{tox_root_name}" to keep environments outside of the project tree by @WhyNotHugo. (#4020)<a name="release-4-60-0-fixed"></a>
env_list, allowing configuration syntax introduced by that version by @CAOShurong (#4021)<a name="release-4-60-0-documentation"></a>
Add {home} and {tox_root_name} substitutions; set work_dir to e.g. "{home}/.local/state/tox/{tox_root_name}" to keep environments outside of the project tree - by WhyNotHugo. (4020)
Provision the requested tox version before reading env_list, allowing configuration syntax introduced by that version - by CAOShurong (4021)
Fix nine source-code links in the onboarding guide that pointed at paths which no longer exist, and correct the class names of the TOML configuration sources and loaders they refer to - by Yusuf-Gadelrab. (4024)
📝 docs: mark the INI configuration format as deprecated by @gaborbernat in #4017
Full Changelog: 4.58.0...4.59.0
<a name="release-4-59-0-added"></a>
mypy --strict and pyrefly next to ty by @gaborjbernat.
ConfigSet.get returns a configuration value after checking it against its declared type, so plugins can drop cast around conf["key"] reads.tox_on_install hook and Installer type their arguments as InstallArguments; installer subclasses may narrow it through the new second type parameter.Parsed declares the CLI option surface, so options.<name> reads type-check.ConfigSet.add_config accepts default=None for optional values and infers the value type from callable defaults.JsonValue content; structured set_env entries match the SetEnvEntry shape. (#4014)<a name="release-4-59-0-documentation"></a>
tox.ini via tox quickstart. (#4017)The plugin and internal APIs now declare their types, and the code base passes mypy --strict and pyrefly next to ty - by gaborjbernat.
ConfigSet.get returns a configuration value after checking it against its declared type, so plugins can drop cast around conf["key"] reads.
The tox_on_install hook and Installer type their arguments as InstallArguments; installer subclasses may narrow it through the new second type parameter.
Parsed declares the CLI option surface, so options.<name> reads type-check.
ConfigSet.add_config accepts default=None for optional values and infers the value type from callable defaults.
The journal, the environment cache, and execute metadata hold JsonValue content; structured set_env entries match the SetEnvEntry shape. (4014)
Mark the INI configuration format as deprecated throughout the documentation - by gaborbernat.
The tutorial, the configuration reference, and the migration how-to state that INI keeps working for existing projects but is frozen and receives no new features.
Every INI example tab, the configuration discovery diagram, and the man page carry a deprecation marker.
The tutorial no longer suggests generating a tox.ini via tox quickstart. (4017)
👷 ci: run the test matrix against Python 3.15 by @gaborbernat in #4001
Full Changelog: 4.57.2...4.58.0
<a name="release-4-58-0-added"></a>
Test against Python 3.15 (beta) in CI and declare its classifier - by gaborbernat. (4001)
🐛 fix(session): fix package env failure cascade and state corruption by @gaborbernat in #3991
Full Changelog: 4.57.1...4.57.2
<a name="release-4-57-2-fixed"></a>
duplicate configuration definition;tox c and tox l work when pyproject.toml cannot be read. (#3987)depends reports the cycle as an error instead of a raw traceback;Skip raised by a plugin for a package environment marks the run environment package-skipped instead of crashing with UnboundLocalError. (#3991)package = editable on a build backend without PEP-660 support now falls back to editable-legacy with a warning instead of crashing, also when the project metadata is static;sdist-wheel environment build from the project sources again, instead of a stale temporary copy that made source edits invisible. (#3992)[testenv:...]-style section and referenced by package_env inherits from pkgenv/env_pkg_base as documented, instead of silently keeping run environment defaults;env_list while referenced as a package environment is reported as a configuration conflict up front, instead of failing late with cannot run packaging environment or silently disappearing from tox l. (#3993)pylock.toml installs now match the lock file:
PIP_INDEX_URL reinstalls, as it already did for deps. (#3994)deps uses --no-binary or --only-binary with more than one package name. (#3995).tox-info.json) now always triggers an environment recreation instead of crashing tox with an internal error for some corruption shapes. (#3996)requires-python and dependencies were silently ignored), and a script with invalid metadata reports a clear configuration error instead of an internal one. (#3997)tox c -o FILE writes the default (ini) format to the file like the json and toml formats, without color codes;tox devenv -e ALL reports that exactly one environment is required instead of crashing;--no-provision FILE records the pinned version for a tox==X requirement instead of an empty string. (#3998)--fail-fast in parallel mode lets already running environments finish and report their real outcomes, instead of interrupting them after a second and mislabeling them as skipped;[tool.tox] stub in pyproject.toml no longer hides a tox.toml next to it;CI=false (or empty) is respected as opting out of CI behavior;"skipped": true so they are distinguishable from passes. (#4000)Run sequentially for run-parallel -p 0 instead of at CPU count by @chuenchen309 in #3989
Full Changelog: 4.57.0...4.57.1
<a name="release-4-57-1-fixed"></a>
set_env value (e.g. an apostrophe in can't) from swallowing the ; platform marker, which silently set the variable unconditionally with the marker text left in the value by @chuenchen309. (#3988)tox run-parallel -p 0 turn parallelism off and run sequentially, as the -p help ("zero is turn off") and the legacy command already promise, instead of running at the CPU count by @chuenchen309. (#3989)Stop a lone quote in a set_env value (e.g. an apostrophe in can't) from swallowing the ; platform marker, which silently set the variable unconditionally with the marker text left in the value - by chuenchen309. (3988)
Make tox run-parallel -p 0 turn parallelism off and run sequentially, as the -p help ("zero is turn off") and the legacy command already promise, instead of running at the CPU count - by chuenchen309. (3989)
💰 Surface the org itself in the FUNDING config by @webknjaz in #3979
Full Changelog: 4.56.4...4.57.0
<a name="release-4-57-0-added"></a>
Py_DEBUG) interpreters the way free-threaded builds are already handled. The py313d and py313td factors select a debug build, a base_python pointing at one matches those factors and conflicts with factors that lack the suffix, and a debug build gets its own d-tagged wheel build environment by @chuenchen309. (#3986)<a name="release-4-57-0-fixed"></a>
t suffix when deriving the base python spec from a path, so a base_python pointing at a free-threaded interpreter matches py313t factors and conflicts with factors that lack the suffix by @chuenchen309. (#3986)Support debug (Py_DEBUG) interpreters the way free-threaded builds are already handled. The py313d and py313td factors select a debug build, a base_python pointing at one matches those factors and conflicts with factors that lack the suffix, and a debug build gets its own d-tagged wheel build environment - by chuenchen309. (3986)
Keep the free-threaded t suffix when deriving the base python spec from a path, so a base_python pointing at a free-threaded interpreter matches py313t factors and conflicts with factors that lack the suffix - by chuenchen309. (3986)
🐛 fix(discovery): find debug interpreters like python3.13-dbg by @gaborbernat in #3978
Full Changelog: 4.56.3...4.56.4
<a name="release-4-56-4-fixed"></a>
Py_DEBUG) interpreters set as base_python, such as Debian's python3.13-dbg - the spec was misread as a machine named dbg and no interpreter matched. Requires python-discovery>=1.4.4 by @gaborbernat. (#3977)Discover debug (Py_DEBUG) interpreters set as base_python, such as Debian's python3.13-dbg - the spec was misread as a machine named dbg and no interpreter matched. Requires python-discovery>=1.4.4 - by gaborbernat. (3977)
Don't double-close the child pty fd (fixes parallel Bad file descriptor) ( #3975 ) by @apoorvdarshan in #3976
Full Changelog: 4.56.2...4.56.3
<a name="release-4-56-3-fixed"></a>
Bad file descriptor/Input/output error failures by @apoorvdarshan. (#3975)Stop double-closing the child pty file descriptor when running under a tty, which could race a parallel run that had reused the freed descriptor number and cause intermittent Bad file descriptor/Input/output error failures - by apoorvdarshan. (3975)
🔧 chore(type): drop stale ty invalid-assignment ignores by @gaborbernat in #3970
Full Changelog: 4.56.1...4.56.2
<a name="release-4-56-2-fixed"></a>
--extra-index-url when a merged requirements line repeats an already-seen index;--no-binary/--only-binary as comma-joined strings instead of leaking the internal set into the pip command line;IndexError for a bare one-argument flag (-c, -r, -f, -e) in deps or constraints;optional-dependencies keys and self-referential (recursive) extra names so non-canonical spellings no longer silently drop dependencies;KeyError when dependency_groups is requested without a [dependency-groups] table;{ replace = "env" } reference from leaking its resolution chain into sibling list entries and tripping a spurious circular chain error;\; in set_env values;tox -e list) is no longer misread;TOX_DISCOVER=) as an empty list rather than [""];Config membership tests;tox p -p all is run with an empty selection;root is reassigned before a frontend exists;create_session_view when the package and its session copy share no common path (e.g. different Windows drives);treat scalar string then/else as a single item in if-replace extend by @HrachShah in #3969
Full Changelog: 4.56.0...4.56.1
<a name="release-4-56-1-fixed"></a>
{ replace = "if" ... extend = true } corrupting the resulting list when then or else is a scalar string (e.g. then = "-v"): a non-empty scalar string is now appended as a single element instead of being iterated character-by-character, while a false if with no else (yielding "") contributes nothing rather than an empty element, and list/set results are still spread into the parent. (#3969)Fix { replace = "if" ... extend = true } corrupting the resulting list when then or else is a scalar string (e.g. then = "-v"): a non-empty scalar string is now appended as a single element instead of being iterated character-by-character, while a false if with no else (yielding "") contributes nothing rather than an empty element, and list/set results are still spread into the parent. (3969)
Derive virtualenv_spec automatically: when an environment targets a Python version the installed virtualenv can no longer create (e.g. py38 with virtu
<a name="release-4-56-0-added"></a>
virtualenv_spec automatically: when an environment targets a Python version the installed virtualenv can no longer create (e.g. py38 with virtualenv 21.5+), tox now pins the newest virtualenv that still supports it and bootstraps it for that environment only. The downgrade happens only when every base_python candidate is unsupported, so environments targeting current interpreters are unaffected. This fixes py38 (and other end-of-life interpreters) being silently skipped after a virtualenv upgrade by @gaborbernat. (#3965) (#3965)<a name="release-4-56-0-fixed"></a>
skip_missing_interpreters changed from True to False — missing interpreters now fail the run by default, matching tox 3 behavior. The tox 4 rewrite unintentionally changed this default. To restore the previous (incorrect) behavior, set skip_missing_interpreters = true in your tox configuration or pass --skip-missing-interpreters on the command line. (#3965)<a name="release-4-56-0-documentation"></a>
development.rst, onboarding.rst and explanation.rst. (#3960)http://tox.readthedocs.org URL with https://tox.wiki in pyproject.toml (Homepage), .github/CONTRIBUTING.md, and .github/PULL_REQUEST_TEMPLATE.md. (#3963)Derive virtualenv_spec automatically: when an environment targets a Python version the installed virtualenv can no longer create (e.g. py38 with virtualenv 21.5+), tox now pins the newest virtualenv that still supports it and bootstraps it for that environment only. The downgrade happens only when every base_python candidate is unsupported, so environments targeting current interpreters are unaffected. This fixes py38 (and other end-of-life interpreters) being silently skipped after a virtualenv upgrade - by gaborbernat. (3965) (3965)
The default value of skip_missing_interpreters changed from True to False — missing interpreters now fail the run by default, matching tox 3 behavior. The tox 4 rewrite unintentionally changed this default. To restore the previous (incorrect) behavior, set skip_missing_interpreters = true in your tox configuration or pass --skip-missing-interpreters on the command line. (3965)
Fix nested list items being rendered with continued numbering instead of as sub-items in development.rst, onboarding.rst and explanation.rst. (3960)
Replace stale http://tox.readthedocs.org URL with https://tox.wiki in pyproject.toml (Homepage), .github/CONTRIBUTING.md, and .github/PULL_REQUEST_TEMPLATE.md. (3963)
TOX_OVERRIDE (and -x/--override) now propagates through configuration references. Previously, overriding a base value that was later referenced via {[
<a name="release-4-55-1-fixed"></a>
TOX_OVERRIDE (and -x/--override) now propagates through configuration references. Previously, overriding a base value that was later referenced via {[section]key} (ini) or {replace = "ref", of = [...]} (toml) was ignored because reference resolution read the raw file value, bypassing the override system by @tales-aparecida. (#3950) (#3950)TOX_OVERRIDE (and -x/--override) now propagates through configuration references. Previously, overriding a base value that was later referenced via {[section]key} (ini) or {replace = "ref", of = [...]} (toml) was ignored because reference resolution read the raw file value, bypassing the override system - by tales-aparecida. (3950) (3950)
Automatically pass the TERMINFO environment variable to tox subprocesses if the output is a TTY. This variable is used by Ghostty to communicate termi
<a name="release-4-55-0-added"></a>
<a name="release-4-55-0-fixed"></a>
constraints configuration option is set, constrain_package_deps and use_frozen_constraints are now ignored. Previously, both the user-provided constraints file and the auto-generated constraints file were passed to pip during install_package_deps, which could cause resolver conflicts when the same package appeared in both files by @gaborbernat. (#3945) (#3945)Automatically pass the TERMINFO environment variable to tox subprocesses if the output is a TTY. This variable is used by Ghostty to communicate terminal capabilities to programs. (3946)
When the constraints configuration option is set, constrain_package_deps and use_frozen_constraints are now ignored. Previously, both the user-provided constraints file and the auto-generated constraints file were passed to pip during install_package_deps, which could cause resolver conflicts when the same package appeared in both files - by gaborbernat. (3945) (3945)
Declare the runtime dependencies of the tox.pytest plugin (pytest, devpi-process and pytest-mock) under a new testing extra, so plugin authors can pul
<a name="release-4-54-0-added"></a>
tox.pytest plugin (pytest, devpi-process and pytest-mock) under a new testing extra, so plugin authors can pull them in via tox[testing] by @gaborbernat. (#3938, #3940)<a name="release-4-54-0-fixed"></a>
replace table form (env, ref, posargs, glob, if), including conditional replacements used inside commands. A guard test asserts the schema stays in sync with the loader implementation so future replace types cannot be added without a corresponding schema entry. (#3939)Declare the runtime dependencies of the tox.pytest plugin (pytest, devpi-process and pytest-mock) under a new testing extra, so plugin authors can pull them in via tox[testing] - by gaborbernat. (3938, 3940)
Extend the generated TOML schema to cover every replace table form (env, ref, posargs, glob, if), including conditional replacements used inside commands. A guard test asserts the schema stays in sync with the loader implementation so future replace types cannot be added without a corresponding schema entry. (3939)
Hardening pass on user-facing logging and config parsing:
<a name="release-4-53-1-fixed"></a>
--key=value flag values in command logs (terminal warnings, .tox/<env>/log/*.log, and Outcome __repr__) using the same keyword regex previously applied to environment variable values.script paths and reject any that escape tox_root; cap the script read at 5 MiB so a symlink to /dev/zero cannot exhaust memory.eval() of a constructed Literal[...] string in the CLI parser with a direct Literal[tuple(action.choices)] subscript.timeout=30 to urlopen when fetching a remote requirements file so a slow or unresponsive mirror cannot hang tox indefinitely. (#3924)deps. (#3929)ArgumentParser.parse_args and parse_known_args overrides following typeshed PR #15613, which widened the args parameter from Sequence[str] to Iterable[str]. The narrower type in tox's overrides violated the Liskov substitution principle and caused invalid-method-override errors with ty 0.0.33. Also correct the option_spec annotation in docs/tox_conf.py to ClassVar[dict[str, Callable[[str], Any]]] matching the docutils stubs type. (#3932)One column per quarter.