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

Improve pyproject.toml validation messages #3487

Merged
merged 2 commits into from Aug 6, 2022

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Aug 4, 2022

Based on the following discussions:

it seems that people are having a hard time finding information about validation error due to the long traceback and debug info.

Summary of changes

  • Make the most relevant information to fix a pyproject.toml error easier to spot:
    • Add the error summary to the exception message itself (this way it is shown at the bottom of the traceback)
    • Avoid displaying debugging information in the case the whole project table is considered invalid (too verbose, and probably the error is just a missing/misnamed field).
    • Modify the tests to reflect the changes listed above.

Closes

Pull Request Checklist

Based on the following discussions:

- pypa/packaging.python.org#1031 (comment)
- pypa/packaging-problems#604

it seems that people are having a hard time finding information about
validation error due to the long traceback and debug info.

The idea behind this change is to make the most relevant information
to fix the error easier to spot.
@abravalheri abravalheri changed the title Improve pyproject.toml validation messages Improve pyproject.toml validation messages Aug 4, 2022
@abravalheri abravalheri marked this pull request as ready for review August 4, 2022 13:09
@abravalheri abravalheri merged commit 33fe15c into pypa:main Aug 6, 2022
@abravalheri abravalheri deleted the clarify-warning branch August 6, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant