diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5871767..5817062 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [ "3.11", "3.12" ] + python: [ "3.10", "3.11", "3.12", "3.13" ] steps: - uses: actions/checkout@v4 - uses: extractions/setup-just@v2 diff --git a/README.md b/README.md index df4aaaa..cfe9c4e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ## Using the SDK **Prerequisites**: -- Python >= v3.11 +- Python >= v3.10 To use this SDK, add the dependency to your project: diff --git a/pyproject.toml b/pyproject.toml index 696e75a..9a1a02d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "restate-sdk" description = "A Python SDK for Restate" -requires-python = ">=3.11" +requires-python = ">=3.10" classifiers = [ "Programming Language :: Rust", "Programming Language :: Python :: Implementation :: CPython", diff --git a/python/restate/context.py b/python/restate/context.py index 2c22c04..915b8d5 100644 --- a/python/restate/context.py +++ b/python/restate/context.py @@ -245,8 +245,8 @@ def time(self) -> RestateDurableFuture[float]: This timestamp will be stable across retries and replays. """ - @typing_extensions.deprecated("`run` is deprecated, use `run_typed` instead for better type safety") @overload + @typing_extensions.deprecated("`run` is deprecated, use `run_typed` instead for better type safety") @abc.abstractmethod def run(self, name: str, @@ -275,8 +275,8 @@ def run(self, """ - @typing_extensions.deprecated("`run` is deprecated, use `run_typed` instead for better type safety") @overload + @typing_extensions.deprecated("`run` is deprecated, use `run_typed` instead for better type safety") @abc.abstractmethod def run(self, name: str, diff --git a/python/restate/server_types.py b/python/restate/server_types.py index b375b75..1e00b4a 100644 --- a/python/restate/server_types.py +++ b/python/restate/server_types.py @@ -16,7 +16,12 @@ import asyncio from typing import (Awaitable, Callable, Dict, Iterable, List, - Tuple, Union, TypedDict, Literal, Optional, NotRequired, Any) + Tuple, Union, TypedDict, Literal, Optional, Any) +import sys +if sys.version_info >= (3, 11): + from typing import NotRequired +else: + from typing_extensions import NotRequired class ASGIVersions(TypedDict): """ASGI Versions"""