Skip to content
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

Improve Warnings #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Improve Warnings #161

wants to merge 1 commit into from

Conversation

davebulaval
Copy link

Small change to improve warning messages printed instead of Warnings and output to stderr using sys.

Improve warning messages printed instead of Warnings and output to stderr using `sys`.
@davebulaval davebulaval changed the title Update utils.py Improve Warnings Apr 24, 2023
@oyarsa
Copy link

oyarsa commented Nov 2, 2023

I think you shouldn't use sys.stdout.write(warning_message) when you're already using warnings. This would lead to the same problem as the current version (no way to programmatically suppress the warning). The warning would be printed to stderr anyway as part of the default behaviour of warnings.warn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants