-
Notifications
You must be signed in to change notification settings - Fork 586
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
Change DeprecationWarning and PendingDeprecationWarning to UserWarning #1211
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #1211 +/- ##
=======================================
Coverage 98.11% 98.11%
=======================================
Files 146 146
Lines 11056 11056
=======================================
Hits 10848 10848
Misses 208 208
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving a note here too. To get the warning show locally, I either had to:
- add the
warnings.simplefilter('always', DeprecationWarning)
line so that deprecation warnings are raised or - change the type of the warning from
DeprecationWarning
.
Option 1. would impact the entire codebase, so not entirely sure about the other deprecation warnings we have in place 🤔 Are they suppressed by default?
What happens if we change all the |
Unfortunately |
@mariaschuld @antalszava what is our next steps here? Is it to add our own warning filter system to PL, like other common packages do? It would be great to get this out ASAP since it is stopping users from seeing the deprecation warnings. |
@josh146 saw this just recently, I'll pick this up today! |
…aneAI/pennylane into improve_shots_deprecation_warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for helping with this @antalszava! Were these all the current deprecation warnings in the codebase?
Yep, was using |
Thanks for finalising this! |
@antalszava noted that the deprecation warning does not show in common editors (despite begin raised and tested). I realised that other warnings in PL have stack level 2, so adapting it here.