diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-04-02 17:55:46 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-04-02 21:28:53 -0500 |
commit | dc378d10347db0cd5d76108b041a42ca8512ab38 (patch) | |
tree | af201143976cbe07f0225a78603c10aeae4b2cb0 /cryptography | |
parent | c9a879350d46581d69d51732d18579defd78072f (diff) | |
download | cryptography-dc378d10347db0cd5d76108b041a42ca8512ab38.tar.gz cryptography-dc378d10347db0cd5d76108b041a42ca8512ab38.tar.bz2 cryptography-dc378d10347db0cd5d76108b041a42ca8512ab38.zip |
move DeprecatedIn04 to utils, some kwargs changes
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/exceptions.py | 3 | ||||
-rw-r--r-- | cryptography/hazmat/primitives/asymmetric/padding.py | 6 | ||||
-rw-r--r-- | cryptography/utils.py | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cryptography/exceptions.py b/cryptography/exceptions.py index b3c6ca7b..b4ee8feb 100644 --- a/cryptography/exceptions.py +++ b/cryptography/exceptions.py @@ -59,6 +59,3 @@ class InvalidKey(Exception): class InvalidToken(Exception): pass - - -DeprecatedIn04 = PendingDeprecationWarning diff --git a/cryptography/hazmat/primitives/asymmetric/padding.py b/cryptography/hazmat/primitives/asymmetric/padding.py index 932c2e29..72806a61 100644 --- a/cryptography/hazmat/primitives/asymmetric/padding.py +++ b/cryptography/hazmat/primitives/asymmetric/padding.py @@ -17,7 +17,7 @@ import warnings import six -from cryptography import exceptions, utils +from cryptography import utils from cryptography.hazmat.primitives import interfaces @@ -38,7 +38,7 @@ class PSS(object): warnings.warn( "salt_length is deprecated on MGF1 and should be added via the" " PSS constructor.", - exceptions.DeprecatedIn04 + utils.DeprecatedIn04 ) else: if (not isinstance(salt_length, six.integer_types) and @@ -67,7 +67,7 @@ class MGF1(object): warnings.warn( "salt_length is deprecated on MGF1 and should be passed to " "the PSS constructor instead.", - exceptions.DeprecatedIn04 + utils.DeprecatedIn04 ) if (not isinstance(salt_length, six.integer_types) and salt_length is not self.MAX_LENGTH): diff --git a/cryptography/utils.py b/cryptography/utils.py index eac833b6..5566d123 100644 --- a/cryptography/utils.py +++ b/cryptography/utils.py @@ -16,6 +16,9 @@ from __future__ import absolute_import, division, print_function import sys +DeprecatedIn04 = PendingDeprecationWarning + + def register_interface(iface): def register_decorator(klass): iface.register(klass) |