Created
August 19, 2019 08:08
-
-
Save Birdi7/b8d94b402bc8985d2e76873b5ee5cee6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import warnings | |
def my_depr_func(user=None, **kwargs): | |
if 'user_id' in kwargs: | |
user = kwargs.pop('user_id') | |
warnings.simplefilter('always', DeprecationWarning) | |
warnings.warn("message", category=DeprecationWarning) | |
warnings.simplefilter('default', DeprecationWarning) | |
my_depr_func(user_id=123) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment