Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox list can consume ValueErrors raised during config discovery #3030

Open
chillipino opened this issue Jun 10, 2023 · 1 comment
Open

tox list can consume ValueErrors raised during config discovery #3030

chillipino opened this issue Jun 10, 2023 · 1 comment
Labels
help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@chillipino
Copy link

Issue

when running tox list, the config file discovery code in tox.config.source.discover may semi-silently consume ValueError exceptions that would be useful to report to the user. i say "semi-silently" because no traceback is displayed, but it does print a missing config file warning. my repro is on windows, but i'd expect it's not dependent on OS.

tox run will report that tomllib.TOMLDecodeError: Unescaped '\' in a string is raised for the provided repro case. tomllib.TOMLDecodeError does derive from ValueError.

Environment

Provide at least:

  • OS: windows
  • python 3.11.3
  • pip list of the host Python where tox is installed:
Package       Version
------------- -------
cachetools    5.3.1
chardet       5.1.0
colorama      0.4.6
distlib       0.3.6
filelock      3.12.0
packaging     23.1
pip           22.3.1
platformdirs  3.5.1
pluggy        1.0.0
pyproject_api 1.5.1
setuptools    65.5.0
tox           4.6.0
virtualenv    20.23.0

Output of running tox

Provide the output of tox -rvv list:

ROOT: No tox.ini or setup.cfg or pyproject.toml found, assuming empty tox.ini at D:\bugtemp\pkg
default environments:
py -> [no description]

Minimal example

this pyproject.toml will repro (no other files are necessary):

[tool.tox]
legacy_tox_ini = """

[testenv]
base_python = c:\path\with\unescaped\backslashes

"""
@gaborbernat gaborbernat added the help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. label Jun 16, 2023
@gaborbernat
Copy link
Member

PR welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

2 participants