Skip to content

feat(sdk-python)!: require Python >=3.10#83

Merged
MDzaja merged 5 commits into
mainfrom
sec/drop-python-3.9
Jul 16, 2026
Merged

feat(sdk-python)!: require Python >=3.10#83
MDzaja merged 5 commits into
mainfrom
sec/drop-python-3.9

Conversation

@aprojic

@aprojic aprojic commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Raises requires-python from >=3.9 to >=3.10 across the published Python packages: sdk-python, all six generated API clients, and the root workspace. The generator postprocess.sh gets the same floor so regeneration cannot reintroduce 3.9.

Why

Every security patch of the SDK's HTTP stack now ships only for Python >=3.10:

Dependency Open advisories First patched Requires
urllib3 2 HIGH (on the shipped sync transport, reachable) 2.7.0 >=3.10
aiohttp 11 (async clients) 3.14.x >=3.10
python-multipart 3 HIGH (parses file-transfer responses, reachable) 0.0.21+ >=3.10

While 3.9 stays in requires-python, Poetry cannot resolve any of those patches for the workspace - which is why Dependabot #8 fails CI and ~85 Python alerts are permanently unfixable. Python 3.9 has been EOL since October 2025.

Impact on users

pypistats for the daytona package (last 30 days, n=5.3M downloads): Python 3.9 accounts for 0.01%, and download stats include CI bots. Existing 3.9 installs keep working - pip serves them the last compatible release; they only stop receiving new versions.

What this unblocks

Verified: poetry lock resolves clean, poetry check unchanged from main (one pre-existing layout warning).


Summary by cubic

Raise the minimum Python version to >=3.10 across sdk-python, all generated API clients, and the workspace to unlock security‑patched HTTP dependencies and stabilize installs. Regenerated process docs to reflect 3.10 | union callback types.

  • Dependencies

    • Enforce >=3.10 in the generator (hack/python-client/postprocess.sh) so regenerated clients don’t reintroduce 3.9.
    • Simplified sdk-python deps: collapsed python-multipart to >=0.0.31,<0.1.0; made typing-extensions unconditional; set basedpyright target to 3.10.
    • Updated poetry.lock to resolve patched releases (e.g., urllib3 2.7+, aiohttp 3.14+) and drop 3.9‑only markers.
  • Migration

    • Python 3.10+ is required for new releases. On Python 3.9, pip will install the last compatible version. Upgrade Python to receive updates.

Written for commit 6a52abc. Summary will update on new commits.

Review in cubic

Signed-off-by: Ante Projić <anteprojic@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR raises the minimum supported Python version to >=3.10 across the Python SDK workspace and all published/generated Python packages, aligning package metadata and the generator postprocess step so regeneration won’t reintroduce Python 3.9 support.

Changes:

  • Bump requires-python from 3.9 to 3.10 across the root workspace and the six generated Python API clients.
  • Update the Python SDK package metadata to require Python >=3.10 (and simplify python-multipart constraints accordingly).
  • Regenerate poetry.lock under the new Python floor and update the OpenAPI Python client postprocess.sh to enforce the floor.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Raises workspace requires-python to ^3.10.
sdk-python/pyproject.toml Raises SDK floor to >=3.10,<4.0, simplifies python-multipart constraints, removes 3.9 classifier.
api-client-python/pyproject.toml Raises generated sync client requires-python to >=3.10.
api-client-python-async/pyproject.toml Raises generated async client requires-python to >=3.10.
analytics-api-client-python/pyproject.toml Raises generated analytics sync client requires-python to >=3.10.
analytics-api-client-python-async/pyproject.toml Raises generated analytics async client requires-python to >=3.10.
toolbox-api-client-python/pyproject.toml Raises generated toolbox sync client requires-python to >=3.10.
toolbox-api-client-python-async/pyproject.toml Raises generated toolbox async client requires-python to >=3.10.
hack/python-client/postprocess.sh Enforces requires-python >=3.10 during client postprocessing.
poetry.lock Updates lock resolution/markers for the new Python floor and collapses the prior 3.9 branches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment thread sdk-python/pyproject.toml Outdated
aprojic added 4 commits July 16, 2026 13:56
… Python >=3.10

Signed-off-by: Ante Projić <anteprojic@gmail.com>
Signed-off-by: Ante Projić <anteprojic@gmail.com>
…right 3.10

Signed-off-by: Ante Projić <anteprojic@gmail.com>
Signed-off-by: Ante Projić <anteprojic@gmail.com>

@MDzaja MDzaja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed locally: basedpyright clean, wheel metadata correct (>=3.10).

@MDzaja
MDzaja merged commit e8969a3 into main Jul 16, 2026
26 of 27 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants