Skip to content

tox --showconfig only shows the env_list environments, but its help says "by default all env" #4538

Done

Description

@Finjineersdev

Issue

The help text of the legacy --showconfig flag says:

  --showconfig                show live configuration (by default all env, with -l only default targets, specific via TOXENV/-e) (default: False)

In tox 4, tox --showconfig without -e only shows the environments in env_list, the same as with -l. An environment that is defined in the configuration but not listed in env_list is left out. To get all of them you need -e ALL.

tox 3 behaved as the help text says (the text comes from the 3.11.0 --showconfig overhaul, #1298): no -e meant all defined environments, and -l limited the output to the default targets. So either the legacy command should select all environments when no -e/TOXENV is given, or the help text should be updated to say it shows env_list by default (and drop the -l part, which no longer changes anything here).

The flag is defined in src/tox/session/cmd/legacy.py (tox_add_option); legacy() sets show_core and the output options but keeps the default env selection, so show_config gets the env_list environments.

Environment

  • OS: macOS (Darwin 25.6.0)
  • Python 3.13.15
  • tox 4.67.17 (PyPI) and main at 72a3455 (4.67.18.dev47+g72a3455d8), same result
Output of pip list of the host Python, where tox is installed
Package          Version
---------------- --------
cachetools       8.0.4
colorama         0.4.6
distlib          0.4.4
filelock         4.3.2
packaging        26.4
platformdirs     4.14.9
pluggy           1.7.0
pyproject-api    1.12.6
python-discovery 1.9.9
tomli-w          1.2.0
tox              4.67.17
virtualenv       21.15.14

Output of running tox

Output of tox --showconfig (section headers and descriptions only)
$ tox --showconfig | grep -E '^\[|^description'
[testenv:a]
description = in env_list
[tox]

$ tox --showconfig -e ALL | grep -E '^\['
[testenv:a]
[testenv:b]
[tox]

The same tox.ini with tox 3.28.0:

$ tox --showconfig | grep -E '^\[|^description'
[tox]
[tox:versions]
[testenv:a]
description = in env_list
[testenv:b]
description = not in env_list

Minimal example

$ cat tox.ini
[tox]
env_list = a
skip_missing_interpreters = true
no_package = true

[testenv:a]
description = in env_list

[testenv:b]
description = not in env_list
$ tox --showconfig | grep '^\['
[testenv:a]
[tox]

Expected (going by the help text): both [testenv:a] and [testenv:b].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions