-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: only warn once for a use of a deprecated binding #13424
Conversation
This seems like the wrong way to do this since it makes the binding seem non-deprecated afterwards. We don't expose that information right now, but it would be incredibly useful, e.g. for tab completion. That is, don't tab complete deprecated bindings (or methods). What about just having a flag that tracks if a warning has been printed or not and only warn if both deprecated and not previously warned? |
The right way to remove deprecation warnings is to fix the uses of deprecated names. It's the easiest case; just search and replace. |
of course that's the right way, but it's not always practical to go fix the deprecations while trying to bug hunt something else. i can see Stefan's point that if we were going to expose this information in any other way, it would be better to not clear the flag. |
In the mean time, the flood of deprecation warnings have been causing CI logs to become enormous. Are you seriously advocating that this is an acceptable user experience, to which one says to the user "just fix it"? |
If it is annoying, why not just use --depwarn=no? |
because I still want to get some notification that there is something to look into, just not have to deal with it first. Paraphrasing, "why do the defaults have to be broken and there is an option to get sane behavior?" |
At the moment repeated binding deprecation warnings provide no additional information. Each deprecation merely tells you that somewhere, something is using a deprecated binding. If the message is going to be printed more than once per binding it should at least tell you the module where it's being used. |
+1 to @simonster; that was certainly a pain not having locations of the binding use. |
Ok, ok, I know. We could try printing |
Running with |
RFC: only warn once for a use of a deprecated binding