-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Consider warnings as exceptions in the test suite #738
Conversation
@hoxbro I'm interested in your opinion on this one! I really wasn't sure about creating specific warning types and spent some time thinking about that. I saw that indeed some libraries implement custom warnings that are usually just subclasses of the builtin warnings. Notably Bokeh, which is maybe where you saw it in the first place? I saw two advantages of having these specific Param warnings:
The disadvantage is that it is more code to maintain of course , which is why I'm interested in keeping it as private as possible, if that's sensible. |
Correct, I chose this because I saw it in Bokeh (and liked the approach). My reason for exposing the warnings in My belief is even though the code itself is in a private module, the warning itself is public because we expose it to our users, and to a certain degree, they have to interact with it either by looking at the red warning or by muting it.
Yeah, I'm not a fan of that either, but that is how Jupyter works. It is much nicer if the warning is emitted for a Python file, which easily shows your the file and line where the warning occurs. |
Thanks for your input! I will keep things as is for two reasons:
|
Fixes #201