-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add FutureWarning
to deprecated_call()
#11447
Comments
Closing as invalid, pydeprecate doesn't use warnings As far as I'm concerned it's completely broken |
@RonnyPfannschmidt ...huh? It sure does, and given the Python docs:
(emphasis mine), it seems perfectly reasonable to me to have |
i missed that alias i think i need to get updated on what futurewarnings mean these days i indeed missed the alias to warn(category=...) when reading the code of the library |
What's the problem this feature will solve?
When implementing deprecated features, we are regularly expected to use the
DeprecationWarning
andPendingDeprecationWarning
warnings. However, there is another one:FutureWarning
. This particular warning is used by packages such aspydeprecate
as the default warning for any functions that will be removed in the future.However, when I write a function that raises the
FutureWarning
(or use the@deprecated
decorator), thendeprecated_call()
currently does not catch the test successfully.Describe the solution you'd like
I'd like to add
FutureWarning
to the list of warnings which are captured bydeprecated_call()
.This is the current behaviour:
The expected behaviour would be for both of these two test cases to pass successfully.
Alternative Solutions
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: