From 502b8e09221b079cf282e37d31bc109a3912099d Mon Sep 17 00:00:00 2001 From: Aleksandr Omyshev Date: Fri, 15 Dec 2023 11:25:36 +0200 Subject: [PATCH] feat: Add support of Python 3.12 Fix typing_extensions dep --- async_customerio/api.py | 7 +++++-- poetry.lock | 12 ++++++------ pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/async_customerio/api.py b/async_customerio/api.py index 0ebe252..1b0b406 100644 --- a/async_customerio/api.py +++ b/async_customerio/api.py @@ -2,9 +2,12 @@ Implements the client that interacts with Customer.io"s App API using app keys. """ import base64 -from typing import Dict, Literal, Optional, Union -from typing_extensions import TypedDict + +try: + from typing import Dict, Literal, Optional, TypedDict, Union +except ImportError: + from typing_extensions import Dict, Literal, Optional, TypedDict, Union # type: ignore from async_customerio.client_base import AsyncClientBase from async_customerio.errors import AsyncCustomerIOError diff --git a/poetry.lock b/poetry.lock index b2ab799..7b50645 100644 --- a/poetry.lock +++ b/poetry.lock @@ -826,13 +826,13 @@ files = [ [[package]] name = "typing-extensions" -version = "4.9.0" -description = "Backported and Experimental Type Hints for Python 3.8+" +version = "4.7.1" +description = "Backported and Experimental Type Hints for Python 3.7+" optional = false -python-versions = ">=3.8" +python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, - {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, ] [[package]] @@ -874,4 +874,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.7.15,<3.13" -content-hash = "62b79a274e25342acfb9645458bf19801aba62c416b308d40b020e1a15c889ed" +content-hash = "f458260783a1e0bf80de38ec989ff35dcf370e862a074ec12a9da652ad41a7a6" diff --git a/pyproject.toml b/pyproject.toml index e9c8d9a..25ce226 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ classifiers = [ python = ">=3.7.15,<3.13" httpx = "<1.0.0" -typing_extensions = { version = "^4.9", python = ">=3.8,<3.13" } +typing_extensions = { version = "^4.7.1", python = "^3.7" } [tool.poetry.dev-dependencies] pre-commit = "~2.21"