diff --git a/jwcrypto/jwk.py b/jwcrypto/jwk.py index 43e8b67..fe8598e 100644 --- a/jwcrypto/jwk.py +++ b/jwcrypto/jwk.py @@ -11,7 +11,7 @@ from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.asymmetric import rsa -from deprecated import deprecated +from typing_extensions import deprecated from jwcrypto.common import JWException from jwcrypto.common import base64url_decode, base64url_encode @@ -764,13 +764,13 @@ def is_symmetric(self): return self.get('kty') == 'oct' @property - @deprecated + @deprecated('') def key_type(self): """The Key type""" return self.get('kty') @property - @deprecated + @deprecated('') def key_id(self): """The Key ID. Provided by the kid parameter if present, otherwise returns None. @@ -778,14 +778,14 @@ def key_id(self): return self.get('kid') @property - @deprecated + @deprecated('') def key_curve(self): """The Curve Name.""" if self.get('kty') not in ['EC', 'OKP']: raise InvalidJWKType('Not an EC or OKP key') return self.get('crv') - @deprecated + @deprecated('') def get_curve(self, arg): """Gets the Elliptic Curve associated with the key. diff --git a/jwcrypto/jwt.py b/jwcrypto/jwt.py index a30804b..157d519 100644 --- a/jwcrypto/jwt.py +++ b/jwcrypto/jwt.py @@ -4,7 +4,7 @@ import time import uuid -from deprecated import deprecated +from typing_extensions import deprecated from jwcrypto.common import JWException, JWKeyNotFound from jwcrypto.common import json_decode, json_encode @@ -123,7 +123,7 @@ def __init__(self, message=None, exception=None): super(JWTInvalidClaimFormat, self).__init__(msg) -@deprecated +@deprecated('') class JWTMissingKeyID(JWException): """JSON Web Token is missing key id. diff --git a/setup.py b/setup.py index a08920f..72afb9e 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ data_files = [('share/doc/jwcrypto', ['LICENSE', 'README.md'])], install_requires = [ 'cryptography >= 3.4', - 'deprecated', + 'typing_extensions', ], python_requires = '>= 3.6', )