Skip to content

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