From d2ec29d84bb7d560627738b6e94db18e47d08783 Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Mon, 15 Sep 2025 16:26:48 +0200 Subject: [PATCH 1/2] Bring back Python 3.10 support --- .github/workflows/test.yml | 2 +- README.md | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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", From 1cc7bc73398600af42517c6babf502e8e0b6cd2b Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Mon, 15 Sep 2025 16:31:28 +0200 Subject: [PATCH 2/2] Typing extension stuff --- python/restate/context.py | 4 ++-- python/restate/server_types.py | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) 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"""