Merge pull request #1738 from reaperhulk/deprecation-dance
Do the deprecation dance
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 518bc60..4c866f6 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -161,8 +161,7 @@
* More bit-lengths are now supported for ``p`` and ``q`` when loading DSA keys
from numbers.
* Added :class:`~cryptography.hazmat.primitives.interfaces.MACContext` as a
- common interface for CMAC and HMAC and deprecated
- :class:`~cryptography.hazmat.primitives.interfaces.CMACContext`.
+ common interface for CMAC and HMAC and deprecated ``CMACContext``.
* Added support for encoding and decoding :rfc:`6979` signatures in
:doc:`/hazmat/primitives/asymmetric/utils`.
* Added
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 0ce8f5f..1af8d8f 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -164,7 +164,7 @@
.. method:: create_cmac_ctx(algorithm)
Create a
- :class:`~cryptography.hazmat.primitives.interfaces.CMACContext` that
+ :class:`~cryptography.hazmat.primitives.interfaces.MACContext` that
uses the specified ``algorithm`` to calculate a message authentication code.
:param algorithm: An instance of a
@@ -172,7 +172,7 @@
provider.
:returns:
- :class:`~cryptography.hazmat.primitives.interfaces.CMACContext`
+ :class:`~cryptography.hazmat.primitives.interfaces.MACContext`
.. class:: PBKDF2HMACBackend
diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst
index f58d324..d60fe18 100644
--- a/docs/hazmat/primitives/interfaces.rst
+++ b/docs/hazmat/primitives/interfaces.rst
@@ -51,28 +51,6 @@
:mod:`cryptography.hazmat.primitives.kdf` module.
-`Message Authentication Code`_
-------------------------------
-
-.. class:: CMACContext
-
- :class:`CMACContext` has been deprecated in favor of :class:`MACContext`.
-
- .. versionadded:: 0.4
-
- .. method:: update(data)
-
- :param bytes data: The data you want to authenticate.
-
- .. method:: finalize()
-
- :return: The message authentication code.
-
- .. method:: copy()
-
- :return: A :class:`~cryptography.hazmat.primitives.interfaces.CMACContext`
- that is a copy of the current context.
-
.. class:: MACContext
.. versionadded:: 0.7
diff --git a/src/cryptography/hazmat/primitives/interfaces/__init__.py b/src/cryptography/hazmat/primitives/interfaces/__init__.py
index 6913ace..1e7b121 100644
--- a/src/cryptography/hazmat/primitives/interfaces/__init__.py
+++ b/src/cryptography/hazmat/primitives/interfaces/__init__.py
@@ -386,10 +386,3 @@
Checks if the generated message authentication code matches the
signature.
"""
-
-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 253dea5..0f8cbb2 100644
--- a/src/cryptography/utils.py
+++ b/src/cryptography/utils.py
@@ -10,8 +10,7 @@
import warnings
-DeprecatedIn07 = DeprecationWarning
-DeprecatedIn08 = PendingDeprecationWarning
+DeprecatedIn08 = DeprecationWarning
def read_only_property(name):