diff --git a/encryption_jwt/encryptor.py b/encryption_jwt/encryptor.py index 31c91ec0..a0e324d9 100644 --- a/encryption_jwt/encryptor.py +++ b/encryption_jwt/encryptor.py @@ -2,6 +2,7 @@ import base64 import logging import os +import typing from botocore.exceptions import ClientError from cryptography.hazmat.primitives.ciphers.aead import AESGCM @@ -27,7 +28,7 @@ def boto_session(self): return self._boto_session - async def encrypt(self, data: bytes) -> tuple[bytes, bytes]: + async def encrypt(self, data: bytes) -> typing.Tuple[bytes, bytes]: """Encrypt data using a key from KMS.""" # The keys are rotated automatically by KMS, so fetch a new key to encrypt the data. data_key_encrypted, data_key_plaintext = await self.__create_data_key( diff --git a/pyproject.toml b/pyproject.toml index 15566c81..8c3f8620 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ dependencies = { cryptography = "^38.0.1", aiohttp = "^3.8.1" } [tool.poetry.group.encryption_jwt] optional = true -dependencies = { cryptography = "^38.0.1", aiohttp = "^3.8.1", pyjwt = "^2.9.0", aioboto3 = "^13.1.1", "requests" = "^2.32.3" } +dependencies = { cryptography = "^38.0.1", aiohttp = "^3.8.1", pyjwt = "^2.9.0", aioboto3 = "^13.1.1", "requests" = "^2.32.3", "types-requests": "^2.32.0" } [tool.poetry.group.gevent] optional = true