Display pyproject.toml's metatada parsing errors in verbose mode#1979
Merged
atugushev merged 12 commits intojazzband:mainfrom Sep 5, 2023
Merged
Display pyproject.toml's metatada parsing errors in verbose mode#1979atugushev merged 12 commits intojazzband:mainfrom
pyproject.toml's metatada parsing errors in verbose mode#1979atugushev merged 12 commits intojazzband:mainfrom
Conversation
atugushev
reviewed
Sep 3, 2023
Member
atugushev
left a comment
There was a problem hiding this comment.
Thanks for the PR! I've left a few comments below.
atugushev
reviewed
Sep 4, 2023
Member
atugushev
left a comment
There was a problem hiding this comment.
Thanks for considering my suggestions! Here are the final adjustments I believe should improve code readability.
atugushev
reviewed
Sep 5, 2023
59faba9 to
0209101
Compare
Contributor
Author
|
I'm wondering how I can restart ci checks since they're failed due to a timeout error (most likely a network hiccup) |
Member
|
I've restarted failed jobs. |
Contributor
Author
|
Thanks, @atugushev, for your help and patience! |
theryanwalker
approved these changes
Sep 5, 2023
Since version "1.0.0" is released on PyPI we can pass a type of subprocess runner to "build.ProjectBuilder". Before the type was hardcoded insude "ProjectBuilder" and was not available to user. Therefore, whenever the error on parsing pyproject.toml file happened, user seen only short and non-informative `Backend subprocess exited when trying to invoke get_requires_for_build_wheel`. Now we can select `pyproject_hooks.default_subprocess_runner` from `pyproject_hooks` library. This runner will throw the error directly from toml parsing library.
In order to show user the error from toml's parsing library instead of `Backend subprocess exited when trying to invoke get_requires_for_build_wheel`.
for more information, see https://pre-commit.ci
* No more dependencies on flit * No network connection required * Test verbose and non-verbose modes
Co-authored-by: Albert Tugushev <albert@tugushev.ru>
Co-authored-by: Albert Tugushev <albert@tugushev.ru>
Co-authored-by: Albert Tugushev <albert@tugushev.ru>
To check only one action: either run in verbose or non-verbose mode
0209101 to
4557e7f
Compare
Contributor
Author
|
rebased on the fresh main branch |
pyproject.toml's metatada parsing errors in verbose mode
4 tasks
github-merge-queue bot
pushed a commit
to bazel-contrib/rules_python
that referenced
this pull request
Apr 18, 2024
Bump pip_tools to >= 7.4.0 so that we can make use of better `pyproject.toml` parsing error messages during compiling. Specifically: jazzband/pip-tools#1979
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1711.
Before the changes implemented in this PR, the execution of
pip-compilewas silent about an error inpyproject.tomlfile.If the user made a mistake in the configuration file, the output of the command was:
Now, the output is the following (the error is in the "licence" field for demonstration):
There are several issues already mentioned on GitHub:
#1711
#1794
The changes implemented in this PR are possible only because of the new
buildversion release:pypa/build#615 (comment)
The particular change is this: pypa/build#566.
Please pay attention that in case of an error, the traceback is huge, but unfortunately, the error is captured and printed inside
build.ProjectBuilder, and it's currently impossible to capture it and show only a short error description. On the other hand, the traceback gives the user an extra debug information.Contributor checklist
Maintainer checklist
backwards incompatible,feature,enhancement,deprecation,bug,dependency,docsorskip-changelogas they determine changelog listing.