ENH: Extend deprecated decorator
Checklist
-
I have read the contribution guidelines. -
Unit tests have been added for any new or changed code, and the test suite passes. Note: Your request will likely not be merged without the appropriate tests. -
"closes #XXXX" is in the body of the MR description to link the related issue, if applicable.
This MR extends the deprecated
decorator so that deprecation warnings can be conditionally omitted based on the context of the calling function. One such use-case is when one might want to deprecate calling a function with positional arguments (prior to changing the order of parameters in said function's signature) or warn a user that a particular keyword argument will be removed.
I think these changes will be useful given the number of API changes made since the last release.
Edited by Ugo Nwosu