diff options
-rw-r--r-- | src/cryptography/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py index da7df76e..64a1c785 100644 --- a/src/cryptography/utils.py +++ b/src/cryptography/utils.py @@ -120,6 +120,10 @@ class _ModuleWithDeprecations(object): setattr(self._module, attr, value) def __delattr__(self, attr): + obj = getattr(self._module, attr) + if isinstance(obj, _DeprecatedValue): + warnings.warn(obj.message, obj.warning_class, stacklevel=2) + delattr(self._module, attr) def __dir__(self): |