-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Display pyproject.toml
's metatada parsing errors in verbose mode
#1979
Display pyproject.toml
's metatada parsing errors in verbose mode
#1979
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I've left a few comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for considering my suggestions! Here are the final adjustments I believe should improve code readability.
59faba9
to
0209101
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I'm wondering how I can restart ci checks since they're failed due to a timeout error (most likely a network hiccup) |
I've restarted failed jobs. |
Thanks, @atugushev, for your help and patience! |
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 <[email protected]>
Co-authored-by: Albert Tugushev <[email protected]>
Co-authored-by: Albert Tugushev <[email protected]>
To check only one action: either run in verbose or non-verbose mode
0209101
to
4557e7f
Compare
rebased on the fresh main branch |
pyproject.toml
's metatada parsing errors in verbose mode
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
Fixes #1711.
Before the changes implemented in this PR, the execution of
pip-compile
was silent about an error inpyproject.toml
file.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
build
version 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
,docs
orskip-changelog
as they determine changelog listing.