diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 56c88a4..faeff2a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout diff --git a/aiomcache/client.py b/aiomcache/client.py index f26f5be..cad91d0 100644 --- a/aiomcache/client.py +++ b/aiomcache/client.py @@ -1,18 +1,13 @@ import functools import re import sys -from typing import (Any, Awaitable, Callable, Dict, Generic, Mapping, Optional, Tuple, - TypeVar, Union, overload) +from typing import (Any, Awaitable, Callable, Dict, Generic, Literal, Mapping, Optional, + Tuple, TypeVar, Union, overload) from . import constants as const from .exceptions import ClientException, ValidationException from .pool import Connection, MemcachePool -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal - if sys.version_info >= (3, 10): from typing import Concatenate, ParamSpec else: diff --git a/setup.py b/setup.py index b9c0879..6c07df7 100644 --- a/setup.py +++ b/setup.py @@ -26,11 +26,11 @@ def read(f): 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', @@ -45,7 +45,7 @@ def read(f): url='https://github.com/aio-libs/aiomcache/', license='BSD', packages=("aiomcache",), - python_requires='>=3.7', + python_requires='>=3.8', install_requires=('typing_extensions>=4; python_version<"3.11"',), tests_require=("nose",), test_suite='nose.collector', diff --git a/tests/conftest.py b/tests/conftest.py index c49b568..a583254 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ import sys import time import uuid -from typing import Any, AsyncIterator, Callable, Iterator +from typing import Any, AsyncIterator, Callable, Iterator, TypedDict import docker as docker_mod import memcache @@ -12,11 +12,6 @@ import aiomcache from .flag_helper import FlagHelperDemo -if sys.version_info < (3, 8): - from typing_extensions import TypedDict -else: - from typing import TypedDict - if sys.version_info < (3, 11): from typing_extensions import NotRequired else: diff --git a/tests/conn_args_test.py b/tests/conn_args_test.py index f71e1f9..79f3bc3 100644 --- a/tests/conn_args_test.py +++ b/tests/conn_args_test.py @@ -1,5 +1,4 @@ import ssl -import sys from asyncio import StreamReader, StreamWriter from unittest import mock @@ -9,7 +8,6 @@ from .conftest import McacheParams -@pytest.mark.skipif(sys.version_info < (3, 8), reason="AsyncMock requires python3.8") async def test_params_forwarded_from_client() -> None: client = Client("host", port=11211, conn_args={ "ssl": True, "ssl_handshake_timeout": 20