Remove support for python <3.11 (#1273)

Python 3.11 ships with latest Debian Bookworm. 
pypy is not that widely used with this library based on statistics. It could be added back when pypy supports python 3.11.
This commit is contained in:
Steven B.
2024-11-18 18:46:36 +00:00
committed by GitHub
parent 0c40939624
commit a01247d48f
55 changed files with 176 additions and 620 deletions

View File

@@ -12,7 +12,7 @@ import logging
import time
from collections.abc import AsyncGenerator
from enum import Enum, auto
from typing import TYPE_CHECKING, Any, Dict, cast
from typing import TYPE_CHECKING, Any, cast
from cryptography.hazmat.primitives import hashes, padding, serialization
from cryptography.hazmat.primitives.asymmetric import padding as asymmetric_padding
@@ -193,7 +193,7 @@ class AesTransport(BaseTransport):
)
if TYPE_CHECKING:
resp_dict = cast(Dict[str, Any], resp_dict)
resp_dict = cast(dict[str, Any], resp_dict)
assert self._encryption_session is not None
self._handle_response_error_code(
@@ -326,7 +326,7 @@ class AesTransport(BaseTransport):
)
if TYPE_CHECKING:
resp_dict = cast(Dict[str, Any], resp_dict)
resp_dict = cast(dict[str, Any], resp_dict)
self._handle_response_error_code(resp_dict, "Unable to complete handshake")