aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py
index 3407bfe6..4c006278 100644
--- a/src/cryptography/utils.py
+++ b/src/cryptography/utils.py
@@ -118,6 +118,13 @@ class _ModuleWithDeprecations(object):
def __setattr__(self, attr, value):
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):
return ["_module"] + dir(self._module)