-
-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Library should not be printing to stdout without verbose option #6929
Comments
Hi, |
somewhat related #78 |
I would also prefer if all output would go through Python logging. |
Yes, this could do with some love. One concern is that we're not sure how to manage backwards compatibility. |
Backwards compatibility being going to |
More that current users may have code that expects stdout.
|
It seems this is still open. One possibility to deal with users expecting prints to stdout is to append all existing prints with a deprecation warning, mentioning that in a next 1.x version the prints would be taken out and the user might adjust the |
Closing as duplicate of #78 |
I think it's good policy not to print anything to standard output in library code, except when that's specified by the API, e.g. through a
verbose
parameter. We have, for instance, a few unguardedprint
calls insklearn/datasets
. These should be weeded out. One option for fixing is to uselogging.info
; another is to useprint(..., file=sys.stderr)
.The text was updated successfully, but these errors were encountered: