Repository navigation
Releases
Releases Β· tox-dev/tox
v4.67.19
Immutable
release. Only release title and notes can be modified.
Changes
- Plain
toxnow readsTOX_PARALLELand the user configparallelkey the waytox pdoes:auto,allor a number runs the environments in parallel, and any other value, including an empty one, is a usage error. Before,autoandallwere ignored with a warning and a negative value crashed with a traceback. If you exportTOX_PARALLELonly fortox p, unset it for plaintoxto keep it sequential;tox -irefuses to run in parallel (#4543) by @ericdelorefice and @gaborbernat.
v4.67.18
Immutable
release. Only release title and notes can be modified.
Features
- Read a dotted patch version after an interpreter name, such as
py3.12.1orcpython-3.12.1, from an environment name, and refuse an undeclared-eenvironment whose Python version tox cannot read, such aspy3121,3.12.1or3, instead of running it on the fallback interpreter (#4532) by @ericdelorefice and @gaborbernat.
Changes
- Make the legacy
tox --showconfig -aandtox --help-ini -ashow every defined environment, and fix the--showconfighelp, which claimed that was the default; without-athey showenv_list(#4540) by @gaborbernat and @xixi-box. (#4538) - Limit
tox -pandtox --parallelwithout a value to the CPU count, as-p autodoes, instead of running every selected environment at once (#4480) by @cansentay. - Report factors passed to
-fthat appear in no environment name, with a close match, instead of selecting nothing without saying why. As with-m, one unknown factor fails the command even when another-fgroup selects environments (#4537) by @Harp404 and @gaborbernat.
Bug fixes
- On Python 3.11.0β3.11.3, extract a source distribution the way the
datatar filter does: ignore archived owners, strip unsafe permissions, normalize paths and refuse special files and hard links to non-regular files (#4487) by @xixi-box and @gaborbernat. (#4484) - Keep a joined
--conf=<path>,-c<path>or--root=<path>during shell completion instead of loading the current directory's project (#4486) by @xixi-box and @gaborbernat. (#4485) - Load a TOML file passed with
-cunder another name, such as a copy oftox.toml, instead of reading it as INI (#4530) by @Harp404 and @gaborbernat. (#4529) - Name only the environments that form the cycle in the circular
dependserror, not the ones that lead into it (#4479) by @JROtto5 and @gaborbernat. - Reject a
--hashseedabove4294967295, and ignore one fromTOX_HASH_SEEDor the user config, instead of letting the interpreter abort (#4517) by @qianeric-backup and @gaborbernat. - Reject a negative
commands_retrywith an error, instead of skipping every command and reporting the environment as passed (#4536) by @Harp404 and @gaborbernat. - Reject an out-of-range
--exit-and-dump-after(negative, or past the thread timeout limit) with a usage error, and ignore one fromTOX_EXIT_AND_DUMP_AFTERor the user config, instead of crashing infaulthandler(#4533) by @qianeric-backup and @gaborbernat. - Report the output path and filesystem error when
tox config -ocannot write the requested file (#4483) by @qianeric-backup.
Security
- A
:in a host variable no longer starts the default of the{[section]key}reference it supplies (#4492) by @gaborbernat. (GHSA-x6h3-7262-cprp) - Create a recreated environment in its own directory, not in the target of the symlink it replaced (#4488) by @gaborbernat. (GHSA-fr8f-x54h-mj7x)
- Create the work directory owner-only on POSIX also when tox creates it before environment setup (#4526) by @gaborbernat. (GHSA-w693-j59x-jf7r)
- Expand
${NAME}in adepsentry or requirements file line in one pass, so a${OTHER}inside a variable's value stays literal (#4497) by @gaborbernat. (GHSA-rvc4-v86f-44w7) - Fail on a
-r,-corconstraintsURL with a scheme other thanhttp,httpsorfile, instead of printing a secret in the error (#4520) by @gaborbernat. (GHSA-jm68-4p79-vjpq) - Give a TOML
set_envreference its own copy of the referenced environment's variables, soTOX_ENV_NAMEand multi-line values stay correct (#4519) by @gaborbernat. (GHSA-jvqj-vmh8-rh5h) - In INI commands, keep a multi-line substitution that follows another substitution in the same command (#4491) by @gaborbernat. (GHSA-h3hp-7hf3-v24x)
- Keep
#text in an-xoverride read through an INI{[section]key}reference; drop any\#escape added as a workaround (#4512) by @gaborbernat. (GHSA-x5cf-5q6w-j9mr) - Keep a substitution inside its quoted argument when that argument continues on the next line of
install_command(#4493) by @gaborbernat. (GHSA-8c6w-xxj9-xw7v) - Keep positional arguments,
{glob:...}matches andTOX_FACTOR_<label>values literal when joined with a set host variable (#4510) by @gaborbernat. (GHSA-973j-cr58-r5j4) - Keep refusing a work directory whose cleanup was refused or interrupted; delete it if tox 4.67.11 to 4.67.17 said
tox will not remove it(#4490) by @gaborbernat. (GHSA-r896-w2xg-246c) - Mask URL credentials and secret flags in errors about rejected command line arguments (#4507) by @gaborbernat. (GHSA-25fg-rr6h-j853)
- Mask URL credentials in the warning that explains why tox recreates an environment (#4518) by @gaborbernat. (GHSA-cg5x-g2vr-5pqm)
- Mask a URL password that an unbalanced quote fuses into a command's program name (#4508) by @gaborbernat. (GHSA-rpq3-qxcr-j53q)
- Mask a URL password whose user name or password holds an unencoded
/,?,#or whitespace (#4509) by @gaborbernat. (GHSA-hrj9-4287-r44r) - Mask a secret flag that follows a comma, colon, bracket,
&or|inside another argument (#4500) by @gaborbernat. (GHSA-9f32-7248-w2cv) - Mask a secret-named
${VAR}from a requirements file in the install cache and the recreate warning, also when the parser strips or unquotes it (#4524) by @gaborbernat. (GHSA-652r-w8g3-hqqx) - Mask secrets in configuration error messages, such as a password in a value that fails type conversion (#4521) by @gaborbernat. (GHSA-8g3g-cp8x-2xf2)
- On Windows, keep an INI command argument such as
tests{/}{posargs}ortests{/}"{env:NAME}"as one argument when the value after{/}contains spaces (#4503) by @gaborbernat. (GHSA-hq5q-qhh5-xrhm) - On Windows, look up a bare command name only on
PATH, not in the current directory; use{tox_root}{/}make.batfor a script next to the configuration (#4525) by @gaborbernat. (GHSA-46m6-vxc8-x459) - Prefix
./whenargs_are_pathsrewrites a path to a bare name, sopip install .from a subfolder installs that folder (#4516) by @gaborbernat. (GHSA-32wg-pmq5-f6ph) - Refuse a dependency version that makes pip install a local path, such as
setuptools=={env:VERSION}withVERSION=1.0+x.zip(#4523) by @gaborbernat. (GHSA-jj6v-45f9-r696) - Refuse a line break within a path reference such as
{change_dir}, or one entry of a referenced list, indepsorconstraints, and replace it with a space in an INI command argument (#4513) by @gaborbernat. ([GHSA-pjfj-p8g9-hh9q](https://github.com/tox-dev/tox/security...
v4.67.17
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Reject requested environment names with a stray dash, such as
py310-orpy310--lint, and suggest the name without it, instead of creating an environment with that name (#4476) by @lau0708 and @gaborbernat. (#4475) - A requirements file whose declared encoding (PEP 263 coding cookie) cannot decode its content now raises a descriptive error naming the file and the declared encoding, instead of surfacing a raw
UnicodeDecodeError(#4468) by @waw666waw666 and @gaborbernat. - Accept a
--rootdirectory that does not exist again, instead of failing withFileNotFoundError(#4472) by @qianeric-backup and @gaborbernat. - Reject an override that has no key, such as
-x =1, instead of silently ignoring it. InTOX_OVERRIDEor the user configuration file, such an entry now makes tox warn and ignore that list, as an entry without=already does (#4473) by @qianeric-backup and @gaborbernat. - Report a file in place of the work directory (from
--workdir,work_diror a stray.toxfile), or a file passed as--rootwith the work directory under it, as a tox error instead of a traceback (#4474) by @ChaseZhang-ai and @gaborbernat. - Report labels given to
-morTOX_LABELSthat no environment defines, with a suggestion for a close match, instead of selecting nothing (#4478) by @chiruu12 and @gaborbernat.
Documentation
- Fix the
tox_after_run_commandsexample in the plugin how-to, which failed the environment with anAttributeError, and correct the verbosity flags listed for each logging level (#4466) by @mmporong and @gaborbernat. - Give the
-xexample in the override how-to the section names fortox.toml,pyproject.tomlandtox.ini, since an override that spells the section for another file format changes nothing (#4464) by @JROtto5 and @gaborbernat.
New Contributors
- @JROtto5 made their first contribution in #4464
- @waw666waw666 made their first contribution in #4468
- @lau0708 made their first contribution in #4476
- @ChaseZhang-ai made their first contribution in #4474
- @chiruu12 made their first contribution in #4478
v4.67.16
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Resolve TOML string references such as
{[envvars]label}to ordinary tables whose names begin withenv(#4452) by @mansur-akhmadi and @gaborbernat. (#4451) - Detect build files in
package_rootwhen choosing the defaultpackagefor virtualenv environments (#4455) by @mansur-akhmadi and @gaborbernat. (#4454) - Suggest
alpha-py312fortox -e alpha-p312whenalpha-py312is a configured environment (#4460) by @arindam77 and @gaborbernat. (#4458) - Accept uppercase and mixed-case hexadecimal digits in requirements-file
--hashdigests (#4463) by @xixi-box and @gaborbernat. (#4462) - Report the output path and filesystem error when tox cannot write the file requested by
--result-json(#4461) by @qianeric-backup and @gaborbernat. - Resolve INI references to section names containing colons or dots, such as
{[tool:pytest]addopts}(#4453) by @Yshuro and @gaborbernat.
Performance
- Defer imports until the modules are needed on Python 3.15, reducing startup time for common CLI operations (#4450) by @gaborbernat.
New Contributors
- @mansur-akhmadi made their first contribution in #4455
- @Yshuro made their first contribution in #4453
- @xixi-box made their first contribution in #4463
- @qianeric-backup made their first contribution in #4461
v4.67.15
Immutable
release. Only release title and notes can be modified.
Security
- 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)
v4.67.14
Immutable
release. Only release title and notes can be modified.
Bug fixes
- 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-lintortests-cpython-3.13used to fail withconflicting factors, because the prefix and the version were read as two separate Python factors. Withignore_base_python_conflict, such an environment name now takes precedence overbase_pythonas other Python factors already do, sopypy-3.10-lintruns onpypy3.10instead of the configuredbase_python(#4404) by @syahra712 and @gaborbernat. - A
set_enventry with an empty name, such as=valueintox.inior 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_enventries 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
--overridethat appends with+=, such astestenv:py.deps+=pytest-xdist, now appends to the value the environment inherits from[testenv]orenv_run_baseinstead of replacing it. Appending to a set such aslabelsadds to it, and appending to a single value such asdescriptionfails with an error, as it already did within one section (#4434) by @hemtilva and @gaborbernat. (#4432) --use-featureindepsor a requirements file now accepts any feature name and leaves the check to pip, instead of rejecting every name other than2020-resolverandfast-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 minuteinstead of60 seconds, and a hundredth of a second after a whole minute, hour or day, as in1 minute 0.01 seconds, is no longer dropped (#4420) by @syahra712 and @gaborbernat. - Changing
system_site_packagesnow 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" == extrawhen 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 configand{[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 asflit-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, withfactors = [{ source = ["py312", "py313"] }, { target = ["py312", "py313"] }], the environmentmigrate-py313-py312readpy312for both labels (#4402) by @Kernel-Hunter and @gaborbernat.
Documentation
- Explain in the
pkg_dirreference 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)
Security
- tox now treats a Windows junction where a run environment's directory, or its
logortmpfolder, 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 withis a link where this environment should liveunless-ris given, instead of raisingFileExistsError(#4418) by @subotac and @gaborbernat.
Packaging
- Every wheel now carries a PEP 770 CycloneDX SBOM in its
.dist-info/sbomsdirectory, written at build time by python-sbom (#4403) by @gaborbernat.
New Contributors
- @Jinyong-Li made their first contribution in #4397
- @Kernel-Hunter made their first contribution in #4402
- @anubhavlal07 made their first contribution in #4421
- @vudigapranav made their first contribution in #4428
- @Ramji-Purwar made their first contribution in #4439
- @hemtilva made their first contribution in #4434
- @arindam77 made their first contribution in #4423
- @anwang132 made their first contribution in #4426
- @subotac made their first contribution in #4418
v4.67.13
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Relative
{glob:...}and TOMLreplace = "glob"patterns now match files whentox_rootcontains[,*or?. tox treats those characters in the project path literally while keeping wildcards in the configured pattern (#4389) by @qodelicious and @gaborbernat. - When
work_dirortox_rootcontains[,*or?, tox now treats those characters literally in its own executable paths and in default or relativepackage_globpatterns. This lets it run environment commands and find packages built bypackage = external(#4390) by @qodelicious and @gaborbernat.
New Contributors
- @qodelicious made their first contribution in #4390
v4.67.12
Immutable
release. Only release title and notes can be modified.
Bug fixes
- A quoted
set_envvalue that ends with a literal backslash and contains a semicolon no longer loses its quote protection, soWINPATH="C:\tools;C:\bin\\"keeps the whole value instead of failing withinvalid 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)
v4.67.11
Immutable
release. Only release title and notes can be modified.
Bug fixes
- Package staging no longer fails on a
.toxthat only the project's own writers can change, such as one owned by the workspace owner while root runs tox, or a777build directory on Bitbucket. A work directory that other accounts could change, such as a777.toxleft by an older tox under umask000or 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)
v4.67.10
Immutable
release. Only release title and notes can be modified.
Bug fixes
- A pair of numbers after a
-is no longer read as a range, sopy-django-4-2keeps its name instead of splitting intopy-django-4,3and2. Braced ranges such aspy-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,-cor-fvalue indepskeeps its spaces as written instead of gaining literal backslashes (#4381) by @abo3losh1 and @gaborbernat.
New Contributors
- @abo3losh1 made their first contribution in #4381