-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unsolicited messages output to stdout, --quiet does not do anything #1611
Comments
Hello @rdaysky , I took a quick look at the code and it seems that those messages are all printed to stdout. A cleaner way would be, to print them to stderr, to not get in conflict with the programs output when redirecting to other programs. Thanks for pointing to it! fin swimmer |
That would be an improvement for sure, but still the right thing to do is either to make -q actually work, suppressing all output, or, even better, not to output any such messages unless -v is present. |
Hello @rdaysky , I see. Could you please try the latest preview version? For me run e.g. I will have a look on how/if it is possible to suppress all info/debugging/... messages but still print the output of the running program. fin swimmer |
Hello again, I talked to @sdispater and this is something we definitely add to our agenda. But at the moments the priority are tasks that has to be done before launching poetry 1.0. So this issue will most likely not be handled before 1.1. I hope you can have patience with us. fin swimmer |
Greetings, this is indeed very annoying. There should absolutely be a flag for quickly setting verbosity to warnings / errors only. These logs are useless, I don't need to know that you've found the environment context file for the 100th time successfully. In general print statements should be avoided once functionality is stable, but otherwise at least give us the opportunity to shut them up. |
I've been struggling with a similar issue (with Poetry 1.1.4) and I believe I have found several inconsistencies:
This is also inconsistent with the usage:
Ideally, it shouldn't matter wether |
I guess the worst offender is:
|
While there is some difference between I've run both under
The diff shows that IMO the situation is much worse for large packages (more deps, more permutations during concurrent install). Maybe let's add a |
+1 tools should write to stderr. I have a python script that outputs json that I want to send through jq and cannot because it is outputting seems like a good first step would be to make sure that everything that outputs as part of |
I would be interested on an update on this. :) |
I'll add my +1 here. This is clearly the sort of informational message that should be directed to standard error, not standard out, as a matter of general Unix software design best practices. However, given that poetry is not just any old program, but a Python package framework, this issue is doubly important: When poetry pollutes standard out with random warnings, it becomes very difficult to follow the unix philosophy in CLI programs. |
Since this has been on the agenda since 2019 is there any hope of it actually happening? |
This one just bit us in a deployment. Something happened to break
Naturally, you'd want to try poetry export -q --without-hashes --format=requirements.txt | wc -l
# 0
|
You are complaining about the exact opposite of what this issue describes which is "--quiet does not do anything". (What were you expecting This issue should be closed. |
In my head, I was complaining about unexpected behavior surrounding what poetry puts to stdout. From the original issue:
So I don't know if -q suppressing even the actual output of actually the intended command to be run would be considered the opposite of what this issue is for, but sure. Notice also, the first half of the title is
Not sure if you saw the error message
wherein poetry ouputs unsolicited messages to stdout |
I think everyone is a bit turned around and frustrated here -- to recap, Issues with the export plugin are at https://github.com/python-poetry/poetry-plugin-export, though this is fixed in master and the next version of that plugin. In the mean time, you can simply use The |
@neersighted Thank you. |
@neersighted The original issue was about Poetry outputting unsolicited messages to stdout when invoking |
They should now be on stderr -- if any were overlooked, please open a new issue with a reproduction/specifics. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
poetry run
. Observe that a message “Skipping virtualenv creation, as specified in config file.” is output to stdout.poetry -q run
,poetry run --quiet
and other variations thereof. Observe that nothing is run and an exception is raised.There should be a way to suppress all output other than that of the command being run. Otherwise it’s impossible to run scripts reliably.
The text was updated successfully, but these errors were encountered: