Skip to content

Support Python 3.11 through 3.15 - #2088

Open
VegetarianOrc wants to merge 8 commits into
mainfrom
amazzeo/python-311-315
Open

VegetarianOrc wants to merge 8 commits into
mainfrom
amazzeo/python-311-315

Conversation

@VegetarianOrc

@VegetarianOrc VegetarianOrc commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Raise the minimum supported Python version to 3.11 and add support for Python 3.15.

  • Update package metadata, the PyO3 abi3 baseline, wheel selectors, release smoke tests, and Ruff’s target to Python 3.11. Run CI on Python 3.11 and 3.15 across Linux x86-64, Linux ARM64, macOS ARM64, and Windows.
  • Remove obsolete pre-3.11 compatibility branches and dependencies.
  • Regenerate protobuf bindings with grpcio-tools 1.49.1 (protoc 3.21.6) and mypy-protobuf 3.6.0. Preserve generated-message pickling and optional gRPC exports.
  • Replace Docker-based protobuf generation with inline script metadata and a dedicated uv lockfile. poe gen-protos automatically uses an isolated Python 3.11 tool environment without changing the SDK development environment.
  • Address newer-Python compatibility in workflow task creation, sandboxed macOS subprocess imports, and test helpers. Eager workflow task execution remains unsupported.
  • Update mypy to 2.4.0 and Pyright to 1.1.414, separating Basedpyright-specific configuration from shared settings.
  • Update API documentation generation to read protobuf definitions from generated .pyi files, restoring documentation and cross-references for dynamically created types.

Breaking changes

  • Python 3.10 is no longer supported.
  • The protobuf runtime requirement becomes >=4.21.12,<8; protobuf 3 is no longer supported.
  • The optional grpc extra now requires grpcio>=1.49.1,<2.

Validation

All required CI checks pass at 71bcc83a, including:

  • Python 3.11 and 3.15 build, lint, default-environment tests, and time-skipping V2 tests across all four platform configurations.
  • Protobuf regeneration consistency and tests with the minimum protobuf runtime, 4.21.12.
  • API documentation generation, Rust lint, FIPS build/tests, Alpine package smoke tests, latest-dependency tests, Temporal Cloud tests, and feature tests.

Local validation also includes full default-environment suites on Python 3.11 and 3.15, generation reproducibility checks, documentation generation on both versions, and targeted regression tests.

Comment thread .github/workflows/ci.yml Outdated
- run: cargo install --locked nexgen --version 0.2.8 --features advanced --force
- run: poe build-develop
- run: poe gen-protos
- run: poe gen-protos-docker

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure if we want to switch to using docker in CI for this, it seems unrelated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since we're using uv for everything I reworked this so it doesn't need docker. Feel free to push back on that choice and I can add docker back in there.

@VegetarianOrc
VegetarianOrc marked this pull request as ready for review November 5, 2026 20:19
@VegetarianOrc
VegetarianOrc requested review from a team as code owners November 5, 2026 20:19
Comment thread scripts/gen_docs.py

# Run pydoctor
subprocess.check_call(["pydoctor", "--quiet"])
result = driver.main(["--quiet", "--system-class=__main__.ProtobufSystem"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems odd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The purpose here is to make sure that enough docs are generated for the generated protobuf classes that our doc links can reference them. The new codegen uses a setup that declares classes at import time rather than statically so pydoctor can't resolve them. The ProtobufSystem routes any _pb2.py file to it's stub instead and creates entries for each public class in the in the .pyi stub instead.

The alternative would be to change the doc links to plain text.

@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/python-311-315 branch from 4977b8c to dca3e3f Compare November 6, 2026 00:36

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants