diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-03-01 11:44:00 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-03-01 11:44:00 -0500 |
commit | 62560b3ba5e8d5476644711c25c158521a11f2c9 (patch) | |
tree | d28323c86a73a79448284f74cc50868e45750fdf | |
parent | 6bb9624186f3546dd203e3a20e7785dad71c6256 (diff) | |
download | cryptography-62560b3ba5e8d5476644711c25c158521a11f2c9.tar.gz cryptography-62560b3ba5e8d5476644711c25c158521a11f2c9.tar.bz2 cryptography-62560b3ba5e8d5476644711c25c158521a11f2c9.zip |
Use the official API for deprecation with the MACContext rename
-rw-r--r-- | src/cryptography/hazmat/primitives/interfaces/__init__.py | 8 | ||||
-rw-r--r-- | src/cryptography/utils.py | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/cryptography/hazmat/primitives/interfaces/__init__.py b/src/cryptography/hazmat/primitives/interfaces/__init__.py index f9ffae06..6913ace9 100644 --- a/src/cryptography/hazmat/primitives/interfaces/__init__.py +++ b/src/cryptography/hazmat/primitives/interfaces/__init__.py @@ -387,5 +387,9 @@ class MACContext(object): signature. """ -# DeprecatedIn07 -CMACContext = MACContext +CMACContext = utils.deprecated( + MACContext, + __name__, + "The CMACContext interface has been renamed to MACContext", + utils.DeprecatedIn07 +) diff --git a/src/cryptography/utils.py b/src/cryptography/utils.py index 78dcc1ca..253dea55 100644 --- a/src/cryptography/utils.py +++ b/src/cryptography/utils.py @@ -10,9 +10,7 @@ import sys import warnings -# DeprecatedIn07 objects exist. This comment exists to remind developers to -# look for them when it's time for the ninth release cycle deprecation dance. - +DeprecatedIn07 = DeprecationWarning DeprecatedIn08 = PendingDeprecationWarning |