Repository: tox-dev/tox

Issue:
env name expansion changes in 4.0
## Issue

Our library tox.ini files use `envlist` expansion sets to spawn a number of requirements configurations on each python version. In the  4.0.0 release, the expected environments are not listed. And, when running tox, it yields "conflicting factors" errors.

The issue seems to be limited to set expansion, but does not appear to be related to the listed breaking changes in the FAQ. If I set `envlist` manually to list all of the expected environments, tox will pass.

## Environment

Provide at least:

- OS: Ubuntu 20.04 LTS
- `pip list` of the host Python where `tox` is installed:

```console
Package       Version
------------- -------
build         0.9.0
cachetools    5.2.0
chardet       5.1.0
click         8.1.3
colorama      0.4.6
distlib       0.3.6
filelock      3.8.2
packaging     21.3
pep517        0.13.0
pip           22.3.1
pip-tools     6.11.0
platformdirs  2.6.0
pluggy        1.0.0
pyparsing     3.0.9
pyproject_api 1.2.1
setuptools    65.6.3
tomli         2.0.1
tox           4.0.0
virtualenv    20.17.1
wheel         0.38.4
```

## Output of running tox

Provide the output of `tox -rvv`:

```console
.pkg: 252 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 252 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 252 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 252 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 252 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 252 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 252 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 252 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 252 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 253 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 253 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 253 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 253 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 253 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 253 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 253 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 253 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 253 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 253 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 253 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 253 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 253 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 253 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 253 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 253 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 253 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 253 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 253 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 253 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 253 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 253 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 254 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 254 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 254 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 254 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 254 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 254 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 254 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 254 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 254 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 254 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 254 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 254 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 254 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 254 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 254 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 254 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 254 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
ROOT: 255 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
ROOT: 255 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
ROOT: 255 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
ROOT: 255 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py37-: 256 W remove tox env folder /storage/level12-lib/keg-elements/.tox/py37- [tox/tox_env/api.py:292]
py37-: 257 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py37-: 257 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py37-: 257 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py37-: 257 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py37-: 257 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py37-: 257 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py37-: 257 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py37-: 257 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 257 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 257 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 257 W remove tox env folder /storage/level12-lib/keg-elements/.tox/.pkg [tox/tox_env/api.py:292]
.pkg: 257 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 257 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py37-: 257 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py37-: 257 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py37-: 257 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py37-: 257 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py37-: 258 E internal error [tox/session/cmd/run/single.py:57]
Traceback (most recent call last):
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 45, in _evaluate
    tox_env.setup()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/api.py", line 226, in setup
    self._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/runner.py", line 89, in _setup_env
    super()._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 162, in _setup_env
    self.ensure_python_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 166, in ensure_python_env
    conf = self.python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/virtual_env/api.py", line 77, in python_cache
    base = super().python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 200, in python_cache
    "version_info": list(self.base_python.version_info),
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 207, in base_python
    base_pythons: list[str] = self.conf["base_python"]
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 113, in __getitem__
    return self.load(item)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 124, in load
    return config_definition.__call__(self._conf, self.loaders, ConfigLoadArgs(chain, self.name, self.env_name))
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/of_type.py", line 110, in __call__
    value = self.default(conf, args.env_name) if callable(self.default) else self.default
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 103, in default_base_python
    base_python = None if env_name is None else self.extract_base_python(env_name)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 116, in extract_base_python
    raise ValueError(f"conflicting factors {', '.join(candidates)} in {env_name}")
ValueError: conflicting factors py37,  in py37-
py37-: 258 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py37-: 258 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py37-: 258 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py37-: 258 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py37-: 258 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py37-: 258 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py37-: 258 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py37-: 258 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 258 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 258 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 258 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 258 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py37-: 259 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py37-: 259 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py37-: 259 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py37-: 259 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py38-: 259 W remove tox env folder /storage/level12-lib/keg-elements/.tox/py38- [tox/tox_env/api.py:292]
py37-: FAIL ✖ in 0 seconds
py38-: 259 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py38-: 259 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py38-: 259 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py38-: 259 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py38-: 259 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py38-: 259 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py38-: 259 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py38-: 259 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 259 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 259 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 259 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 259 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py38-: 259 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py38-: 260 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py38-: 260 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py38-: 260 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py38-: 260 E internal error [tox/session/cmd/run/single.py:57]
Traceback (most recent call last):
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 45, in _evaluate
    tox_env.setup()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/api.py", line 226, in setup
    self._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/runner.py", line 89, in _setup_env
    super()._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 162, in _setup_env
    self.ensure_python_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 166, in ensure_python_env
    conf = self.python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/virtual_env/api.py", line 77, in python_cache
    base = super().python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 200, in python_cache
    "version_info": list(self.base_python.version_info),
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 207, in base_python
    base_pythons: list[str] = self.conf["base_python"]
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 113, in __getitem__
    return self.load(item)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 124, in load
    return config_definition.__call__(self._conf, self.loaders, ConfigLoadArgs(chain, self.name, self.env_name))
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/of_type.py", line 110, in __call__
    value = self.default(conf, args.env_name) if callable(self.default) else self.default
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 103, in default_base_python
    base_python = None if env_name is None else self.extract_base_python(env_name)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 116, in extract_base_python
    raise ValueError(f"conflicting factors {', '.join(candidates)} in {env_name}")
ValueError: conflicting factors py38,  in py38-
py38-: 260 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py38-: 260 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py38-: 260 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py38-: 260 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py38-: 260 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py38-: 260 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py38-: 260 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py38-: 260 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 260 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 260 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 260 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 260 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py38-: 260 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py38-: 260 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py38-: 260 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py38-: 260 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py39-: 260 W remove tox env folder /storage/level12-lib/keg-elements/.tox/py39- [tox/tox_env/api.py:292]
py38-: FAIL ✖ in 0 seconds
py39-: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py39-: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py39-: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py39-: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py39-: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py39-: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py39-: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py39-: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py39-: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py39-: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py39-: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py39-: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py39-: 261 E internal error [tox/session/cmd/run/single.py:57]
Traceback (most recent call last):
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 45, in _evaluate
    tox_env.setup()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/api.py", line 226, in setup
    self._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/runner.py", line 89, in _setup_env
    super()._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 162, in _setup_env
    self.ensure_python_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 166, in ensure_python_env
    conf = self.python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/virtual_env/api.py", line 77, in python_cache
    base = super().python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 200, in python_cache
    "version_info": list(self.base_python.version_info),
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 207, in base_python
    base_pythons: list[str] = self.conf["base_python"]
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 113, in __getitem__
    return self.load(item)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 124, in load
    return config_definition.__call__(self._conf, self.loaders, ConfigLoadArgs(chain, self.name, self.env_name))
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/of_type.py", line 110, in __call__
    value = self.default(conf, args.env_name) if callable(self.default) else self.default
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 103, in default_base_python
    base_python = None if env_name is None else self.extract_base_python(env_name)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 116, in extract_base_python
    raise ValueError(f"conflicting factors {', '.join(candidates)} in {env_name}")
ValueError: conflicting factors py39,  in py39-
py39-: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py39-: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py39-: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py39-: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py39-: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py39-: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py39-: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py39-: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 261 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 261 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py39-: 261 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py39-: 261 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py39-: 262 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py39-: 262 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py310-: 262 W remove tox env folder /storage/level12-lib/keg-elements/.tox/py310- [tox/tox_env/api.py:292]
py39-: FAIL ✖ in 0 seconds
py310-: 262 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py310-: 262 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py310-: 262 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py310-: 262 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py310-: 262 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py310-: 262 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py310-: 262 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py310-: 262 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 262 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 262 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 262 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 262 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py310-: 262 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py310-: 262 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py310-: 262 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py310-: 262 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py310-: 262 E internal error [tox/session/cmd/run/single.py:57]
Traceback (most recent call last):
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 45, in _evaluate
    tox_env.setup()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/api.py", line 226, in setup
    self._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/runner.py", line 89, in _setup_env
    super()._setup_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 162, in _setup_env
    self.ensure_python_env()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 166, in ensure_python_env
    conf = self.python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/virtual_env/api.py", line 77, in python_cache
    base = super().python_cache()
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 200, in python_cache
    "version_info": list(self.base_python.version_info),
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 207, in base_python
    base_pythons: list[str] = self.conf["base_python"]
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 113, in __getitem__
    return self.load(item)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/sets.py", line 124, in load
    return config_definition.__call__(self._conf, self.loaders, ConfigLoadArgs(chain, self.name, self.env_name))
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/config/of_type.py", line 110, in __call__
    value = self.default(conf, args.env_name) if callable(self.default) else self.default
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 103, in default_base_python
    base_python = None if env_name is None else self.extract_base_python(env_name)
  File "/storage/level12-lib/keg-elements/.tempenv/lib/python3.9/site-packages/tox/tox_env/python/api.py", line 116, in extract_base_python
    raise ValueError(f"conflicting factors {', '.join(candidates)} in {env_name}")
ValueError: conflicting factors py310,  in py310-
py310-: 262 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py310-: 263 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py310-: 263 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py310-: 263 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py310-: 263 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py310-: 263 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py310-: 263 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py310-: 263 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
.pkg: 263 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
.pkg: 263 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
.pkg: 263 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
.pkg: 264 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
py310-: 264 D Attempting to acquire lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:172]
py310-: 264 D Lock 140174723123760 acquired on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:176]
py310-: 264 D Attempting to release lock 140174723123760 on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:209]
py310-: 264 D Lock 140174723123760 released on /storage/level12-lib/keg-elements/.tox/.pkg/file.lock [filelock/_api.py:212]
  py37-: FAIL code 2 (0.00 seconds)
  py38-: FAIL code 2 (0.00 seconds)
  py39-: FAIL code 2 (0.00 seconds)
  py310-: FAIL code 2 (0.00 seconds)
  evaluation failed :( (0.16 seconds)
```

## Minimal example

tox.ini:
```console
[tox]
envlist = py37-{base,i18n},py{38,39,310}-{base,i18n,stable}

[testenv]
commands =
    stable: pip install --progress-bar off -r ./stable-requirements.txt
    pip install --progress-bar off .[dev]
    i18n: pip install --progress-bar off .[i18n]
    pip freeze
    py.test keg_elements
```

Expected `tox -l` output (from tox 3.27.1):

```console
py37-base
py37-i18n
py38-base
py38-i18n
py38-stable
py39-base
py39-i18n
py39-stable
py310-base
py310-i18n
py310-stable
```

Actual `tox -l` output (from tox 4.0.0):

```console
py37-
py38-
py39-
py310-
```

Discussion:

Patch:
diff --git a/docs/changelog/2616.bugfix.rst b/docs/changelog/2616.bugfix.rst
new file mode 100644
index 00000000..91f854c3
--- /dev/null
+++ b/docs/changelog/2616.bugfix.rst
@@ -0,0 +1,1 @@
+Unescaped comma in substitution should not be replaced during INI expansion - by :user:`gaborbernat`.
diff --git a/docs/changelog/2624.bugfix.rst b/docs/changelog/2624.bugfix.rst
new file mode 100644
index 00000000..6cd9c50e
--- /dev/null
+++ b/docs/changelog/2624.bugfix.rst
@@ -0,0 +1,1 @@
+``tox --showconfig -e py311`` reports tox section, though it should not - by :user:`gaborbernat`.
diff --git a/src/tox/config/loader/ini/replace.py b/src/tox/config/loader/ini/replace.py
index 2e997fe4..cb0174e3 100644
--- a/src/tox/config/loader/ini/replace.py
+++ b/src/tox/config/loader/ini/replace.py
@@ -54,14 +54,14 @@ def replace(conf: Config, loader: IniLoader, value: str, args: ConfigLoadArgs) -
 
 REPLACE_PART = re.compile(
     r"""
-        (?<! \\) {  # Unescaped {
-            ( [^{}] | \\ { | \\ } )*  # Anything except an unescaped { or }
+        (?<!\\) {  # Unescaped {
+            ( [^{},] | \\ { | \\ } )*  # Anything except an unescaped { or }
         (?<! \\) }  # Unescaped }
     |
         (?<! \\) \[ ]  # Unescaped []
     """,
     re.VERBOSE,
-)  # simplified - not verbose version (?<!\\)([^{}]|\\\{|\\\})*(?<!\\)\}|(?<!\\)\[\]
+)
 
 
 def find_replace_part(value: str, end: int) -> tuple[int, int, str | None]:
@@ -70,7 +70,8 @@ def find_replace_part(value: str, end: int) -> tuple[int, int, str | None]:
         return -1, -1, None
     if match.group() == "[]":
         return match.start(), match.end() - 1, "posargs"  # brackets is an alias for positional arguments
-    return match.start(), match.end() - 1, match.group()[1:-1]
+    matched_part = match.group()[1:-1]
+    return match.start(), match.end() - 1, matched_part
 
 
 def _replace_match(conf: Config, loader: IniLoader, value: str, conf_args: ConfigLoadArgs) -> str | None:
diff --git a/src/tox/session/cmd/legacy.py b/src/tox/session/cmd/legacy.py
index 95750db5..bb5e993f 100644
--- a/src/tox/session/cmd/legacy.py
+++ b/src/tox/session/cmd/legacy.py
@@ -91,7 +91,7 @@ def legacy(state: State) -> int:
     option = state.conf.options
     if option.show_config:
         option.list_keys_only = []
-        option.show_core = True
+        option.show_core = not bool(option.env)
         return show_config(state)
     if option.list_envs or option.list_envs_all:
         state.envs.on_empty_fallback_py = False
diff --git a/src/tox/session/env_select.py b/src/tox/session/env_select.py
index a489d64c..15d41c43 100644
--- a/src/tox/session/env_select.py
+++ b/src/tox/session/env_select.py
@@ -33,6 +33,9 @@ class CliEnv:
         if not self.is_all and self._names is not None:  # pragma: no branch
             yield from self._names
 
+    def __bool__(self) -> bool:
+        return bool(self._names)
+
     def __str__(self) -> str:
         return "ALL" if self.is_all else ("<env_list>" if self.is_default_list else ",".join(self))
 


Test patch:
diff --git a/tests/config/loader/ini/test_factor.py b/tests/config/loader/ini/test_factor.py
index 9819b5c8..9f60b581 100644
--- a/tests/config/loader/ini/test_factor.py
+++ b/tests/config/loader/ini/test_factor.py
@@ -136,6 +136,11 @@ def test_factor_config(tox_ini_conf: ToxIniCreator) -> None:
             assert "Django>=1.6,<1.7" in deps
 
 
+def test_factor_config_do_not_replace_unescaped_comma(tox_ini_conf: ToxIniCreator) -> None:
+    config = tox_ini_conf("[tox]\nenv_list = py37-{base,i18n},b")
+    assert list(config) == ["py37-base", "py37-i18n", "b"]
+
+
 def test_factor_config_no_env_list_creates_env(tox_ini_conf: ToxIniCreator) -> None:
     """If we have a factor that is not specified within the core env-list then that's also an environment"""
     config = tox_ini_conf(
diff --git a/tests/session/cmd/test_legacy.py b/tests/session/cmd/test_legacy.py
index 8ec82939..c3451890 100644
--- a/tests/session/cmd/test_legacy.py
+++ b/tests/session/cmd/test_legacy.py
@@ -18,6 +18,16 @@ def test_legacy_show_config(tox_project: ToxProjectCreator, mocker: MockerFixtur
     assert outcome.state.conf.options.show_core is True
 
 
+def test_legacy_show_config_with_env(tox_project: ToxProjectCreator, mocker: MockerFixture) -> None:
+    show_config = mocker.patch("tox.session.cmd.legacy.show_config")
+
+    outcome = tox_project({"tox.ini": ""}).run("le", "--showconfig", "-e", "py")
+
+    assert show_config.call_count == 1
+    assert outcome.state.conf.options.list_keys_only == []
+    assert outcome.state.conf.options.show_core is False
+
+
 @pytest.mark.parametrize("verbose", range(3))
 def test_legacy_list_default(tox_project: ToxProjectCreator, mocker: MockerFixture, verbose: int) -> None:
     list_env = mocker.patch("tox.session.cmd.legacy.list_env")