-
Notifications
You must be signed in to change notification settings - Fork 54
Silencing stdout/stderr by default makes some errors extremely hard to debug #142
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
Comments
The The build package provides an alternative: |
Thanks for this. This works for me. It is a bit surprising to see it construct a MIME message instance. I assume this is for PEP-0566. As it contains all the values I need I can work with this. |
Yup, the canonical format for Python packaging metadata is based on email headers. When it was first defined in 2001, JSON either didn't exist or was something new and unfamiliar. And there's little benefit in changing the format, because tools still have to work with all the existing packages. |
I have question .. Q: May I ask about opinion using that as king of generic/template method? 🤔 I'm asking because I see used are any methods to extract for example current vision. From use I would be rally appreciated for any comments about above .. and sorry for a bit off-topic question. |
I think from what you describe,
As you've noticed, what projects do in both their Sphinx |
While a bit off topic, the following might help someone coming across this via google-searches: I've been using yq (which has toml support) pretty successfully lately for automation. Especially since most of the interesting project metadata has now been well defined via PEP-621 and is therefore independent of build-backend. With that, extracting the version number is as simple as |
Don't forget that the spec allows for version (along with most other fields) to be dynamic, so reading it directly from |
Using
pep517
to extract the project version number resulted in the following error:Note that the line-numbers may not be representative as I had to resort to some fairly ugly print-debugging with a pinch of
pdb
.After a lengthy session I found quiet_subprocess_runner which completely suppresses any output. Wrapping that with a try/except and printing the exception content has shown me this message:
Which is pretty clear and helped me to fix the issue in my environment.
But this should not have taken me over an hour to fix. At least put a debug-log or something with the error to make it easier to detect. My first try was actually to set the root-logger level to
DEBUG
but I could also not see anything there.The text was updated successfully, but these errors were encountered: