diff --git a/.changes/unreleased/changed-20261010-000108-fewer-runtime-dependencies.yaml b/.changes/unreleased/changed-20261010-000108-fewer-runtime-dependencies.yaml new file mode 100644 index 00000000..29b05f69 --- /dev/null +++ b/.changes/unreleased/changed-20261010-000108-fewer-runtime-dependencies.yaml @@ -0,0 +1,8 @@ +kind: changed +body: | + Installing the SDK no longer installs `setuptools`, `google`, `deprecation` or `Faker`, or their dependencies `beautifulsoup4`, `soupsieve` and `packaging`. The SDK imports none of them. The SDK also no longer pins your environment to `setuptools` 82.x. If your code imports one of these packages without declaring it, add it to your own dependencies. +time: '2026-10-10T00:01:08.292217+00:00' +custom: + Breaking: 'No' + Ticket: '' + Migration: '' diff --git a/.changes/unreleased/changed-20261010-000507-minimum-python-3-10.yaml b/.changes/unreleased/changed-20261010-000507-minimum-python-3-10.yaml new file mode 100644 index 00000000..8fd8a436 --- /dev/null +++ b/.changes/unreleased/changed-20261010-000507-minimum-python-3-10.yaml @@ -0,0 +1,8 @@ +kind: changed +body: | + The SDK now declares Python 3.10 as its minimum supported version (`python_requires=">=3.10"`); the README previously listed 3.8. Working installs are unaffected: the previous release's dependencies, such as `grpcio` 1.81, already required Python 3.10. +time: '2026-10-10T00:05:07.307370+00:00' +custom: + Breaking: 'No' + Ticket: '' + Migration: '' diff --git a/.changes/unreleased/fixed-20261010-000108-python-3-10-import.yaml b/.changes/unreleased/fixed-20261010-000108-python-3-10-import.yaml new file mode 100644 index 00000000..60f2eacf --- /dev/null +++ b/.changes/unreleased/fixed-20261010-000108-python-3-10-import.yaml @@ -0,0 +1,8 @@ +kind: fixed +body: | + `import scalekit` no longer fails on Python 3.10. Previously it raised `TypeError: typing.Optional requires a single type`; the SDK now imports and runs on Python 3.10. +time: '2026-10-10T00:01:08.210495+00:00' +custom: + Breaking: 'No' + Ticket: '' + Migration: '' diff --git a/Makefile b/Makefile index 9074bbef..9dca6efa 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ PROTOC_DIR := protoc_gen_openapiv2 setup: create-venv @echo "Installing SDK dependencies in $(VENV_DIR)..." $(VENV_PIP) install --upgrade pip - $(VENV_PIP) install -e ".[flask,fastapi,django]" + $(VENV_PIP) install -e ".[flask,fastapi,django,dev]" create-venv: @if [ ! -d "$(VENV_DIR)" ]; then \ diff --git a/README.md b/README.md index 9a06851b..b838a71d 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,7 @@ To use the Scalekit Python SDK, you must have the following: | Component | Version | | --------- | ------- | -| Python | 3.8+ | - -> **Tip:** Although Python 3.8 meets the minimum requirement, using a more recent version (such as Python 3.9 or later) is advisable. +| Python | 3.10+ | ## Examples - SSO with FastAPI diff --git a/scalekit/organization.py b/scalekit/organization.py index 0ed153bd..345e0d16 100644 --- a/scalekit/organization.py +++ b/scalekit/organization.py @@ -1,3 +1,7 @@ +# Postponed annotations: Optional[TimeUnit] wraps a protobuf enum wrapper +# object, which typing rejects at import time on Python 3.10. +from __future__ import annotations + from typing import Optional, List, Dict from google.protobuf import wrappers_pb2 diff --git a/setup.py b/setup.py index b4b2aa82..dd0ea533 100644 --- a/setup.py +++ b/setup.py @@ -12,18 +12,15 @@ install_requires=[ "grpcio>=1.81.0,<2.0", "protobuf>=5.29.5,<8.0.0", - "google>=3.0", "requests>=2.34.0", "PyJWT>=2.13.0", - "cffi>=1.15.1", "cryptography>=50.0.0", - "setuptools>=82.0.1,<83.0", "grpcio-status>=1.81.0,<2.0", "protoc-gen-openapiv2>=0.0.1", "googleapis-common-protos>=1.75.0", - "deprecation>=2.1.0", + # Not imported by the SDK, but kept: docs and customer code call + # load_dotenv() relying on the SDK to install it. "python-dotenv>=1.2.2,<2.0", - "Faker>=33.0.0,<41.0", "pydantic>=2.13.4", "mcp>=1.27.2", ], @@ -34,6 +31,9 @@ "flask": ["flask>=2.0"], "fastapi": ["fastapi>=0.100"], "django": ["django>=4.2"], + # Test-only dependencies (several tests generate fixtures with Faker). + # Installed by `make setup`. + "dev": ["Faker>=33.0.0,<41.0"], }, url="https://github.com/scalekit-inc/scalekit-sdk-python", license="MIT", @@ -42,8 +42,16 @@ description="Scalekit official Python SDK", long_description=open("README.md").read(), long_description_content_type="text/markdown", + # grpcio, protobuf and mcp all require Python 3.10+. + python_requires=">=3.10", classifiers=[ "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], diff --git a/tests/TEST_README.md b/tests/TEST_README.md index 960b29ec..48377479 100644 --- a/tests/TEST_README.md +++ b/tests/TEST_README.md @@ -3,10 +3,10 @@ To run the test cases for this project, follow the steps below: ### Prerequisites -1. Ensure you have Python 3.8 or higher installed. -2. Install the required dependencies by running: +1. Ensure you have Python 3.10 or higher installed. +2. Install the SDK with its framework and test dependencies (or run `make setup`, which does the same in a virtual environment): ```sh - python3 setup.py install + python3 -m pip install -e ".[flask,fastapi,django,dev]" ``` ### Setting Up Environment Variables