diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cryptography/utils.py | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py index 382905c0..baa7b7a1 100644 --- a/src/cryptography/utils.py +++ b/src/cryptography/utils.py @@ -11,11 +11,17 @@ import sys  import warnings +# We use a UserWarning subclass, instead of DeprecationWarning, because CPython +# decided deprecation warnings should be invisble be default. +class CryptographyDeprecationWarning(UserWarning): +    pass + +  # Several APIs were deprecated with no specific end-of-life date because of the  # ubiquity of their use. They should not be removed until we agree on when that  # cycle ends. -PersistentlyDeprecated = DeprecationWarning -DeprecatedIn21 = DeprecationWarning +PersistentlyDeprecated = CryptographyDeprecationWarning +DeprecatedIn21 = CryptographyDeprecationWarning  def _check_bytes(name, value):  | 
