From 62560b3ba5e8d5476644711c25c158521a11f2c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 1 Mar 2015 11:44:00 -0500 Subject: Use the official API for deprecation with the MACContext rename --- src/cryptography/hazmat/primitives/interfaces/__init__.py | 8 ++++++-- 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 -- cgit v1.2.3