Skip to content

Commit 70c0782

Browse files
david-homelendsimo5
authored andcommitted
replace deprecated package with typing_extensions
Signed-off-by: David Diamant <[email protected]>
1 parent 8ae0df6 commit 70c0782

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

jwcrypto/jwk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from cryptography.hazmat.primitives.asymmetric import ec
1212
from cryptography.hazmat.primitives.asymmetric import rsa
1313

14-
from deprecated import deprecated
14+
from typing_extensions import deprecated
1515

1616
from jwcrypto.common import JWException
1717
from jwcrypto.common import base64url_decode, base64url_encode
@@ -764,28 +764,28 @@ def is_symmetric(self):
764764
return self.get('kty') == 'oct'
765765

766766
@property
767-
@deprecated
767+
@deprecated('')
768768
def key_type(self):
769769
"""The Key type"""
770770
return self.get('kty')
771771

772772
@property
773-
@deprecated
773+
@deprecated('')
774774
def key_id(self):
775775
"""The Key ID.
776776
Provided by the kid parameter if present, otherwise returns None.
777777
"""
778778
return self.get('kid')
779779

780780
@property
781-
@deprecated
781+
@deprecated('')
782782
def key_curve(self):
783783
"""The Curve Name."""
784784
if self.get('kty') not in ['EC', 'OKP']:
785785
raise InvalidJWKType('Not an EC or OKP key')
786786
return self.get('crv')
787787

788-
@deprecated
788+
@deprecated('')
789789
def get_curve(self, arg):
790790
"""Gets the Elliptic Curve associated with the key.
791791

jwcrypto/jwt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import time
55
import uuid
66

7-
from deprecated import deprecated
7+
from typing_extensions import deprecated
88

99
from jwcrypto.common import JWException, JWKeyNotFound
1010
from jwcrypto.common import json_decode, json_encode
@@ -123,7 +123,7 @@ def __init__(self, message=None, exception=None):
123123
super(JWTInvalidClaimFormat, self).__init__(msg)
124124

125125

126-
@deprecated
126+
@deprecated('')
127127
class JWTMissingKeyID(JWException):
128128
"""JSON Web Token is missing key id.
129129

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
data_files = [('share/doc/jwcrypto', ['LICENSE', 'README.md'])],
3939
install_requires = [
4040
'cryptography >= 3.4',
41-
'deprecated',
41+
'typing_extensions',
4242
],
4343
python_requires = '>= 3.6',
4444
)

0 commit comments

Comments
 (0)