Skip to content

fix: provide clear messaging about config file loading #3578

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Aug 8, 2025

Fix bug where tox is silently ignoring loading pyproject.toml files
that failed be loaded by tomllint and falling back to other config.

  • if pyproject.toml does not have one of the two expected sections
    it will be logged, so it would be visible with -v
  • make pyproject.toml failure to load a fatal error with clear
    information about cause
  • keeps ignoring missing pyproject.toml files as expected

With these, users of tox will not be surprised when they break the
config file by mistake, like adding a duplicate section.

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

@ssbarnea ssbarnea force-pushed the fix/msg-on-config-file-loading branch 2 times, most recently from 48979d1 to b85911f Compare August 8, 2025 14:13
@ssbarnea ssbarnea force-pushed the fix/msg-on-config-file-loading branch from 465d0fe to 1953e4f Compare August 8, 2025 16:07
@ssbarnea ssbarnea marked this pull request as ready for review August 8, 2025 16:10
@ssbarnea ssbarnea requested a review from gaborbernat as a code owner August 8, 2025 16:10
Fix bug where tox is silently ignoring loading pyproject.toml files
that failed be loaded by tomllint and falling back to other config.

- if pyproject.toml does not have one of the two expected sections
  it will be logged, so it would be visible with `-v`
- make pyproject.toml failure to load a fatal error with clear
  information about cause
- keeps ignoring missing pyproject.toml files as expected

With these, users of tox will not be surprised when they break the
config file by mistake, like adding a duplicate section.
@ssbarnea ssbarnea force-pushed the fix/msg-on-config-file-loading branch from 1953e4f to e41c1b5 Compare August 11, 2025 10:05
@ssbarnea ssbarnea requested a review from gaborbernat August 11, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants