Skip to content

Comments

Bump the oldest supported Python version to 3.11#561

Open
brettcannon wants to merge 4 commits intogithub:mainfrom
brettcannon:python-3.11
Open

Bump the oldest supported Python version to 3.11#561
brettcannon wants to merge 4 commits intogithub:mainfrom
brettcannon:python-3.11

Conversation

@brettcannon
Copy link
Contributor

@brettcannon brettcannon commented Feb 24, 2026

Python 3.10 gives us nicer type hint syntax and 3.11 gives us exception groups which will be used in the future. Along the way, expand the test matrix for Python versions in CI.

@brettcannon brettcannon requested a review from a team as a code owner February 24, 2026 23:14
Copilot AI review requested due to automatic review settings February 24, 2026 23:14
Copy link
Contributor

Copilot AI left a comment

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 for the Python SDK to 3.11 and modernizes type annotations across the Python package and test harness to use Python 3.10+ syntax, aligning linting and CI with the new baseline.

Changes:

  • Bump Python package minimum version to >=3.11 and update Ruff target version accordingly.
  • Modernize type hints across Python sources/tests to use X | None, built-in generics (list[...], dict[...]), and stdlib typing.NotRequired.
  • Expand GitHub Actions Python SDK test workflow to run across a Python-version matrix.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
python/pyproject.toml Raises minimum Python version, updates trove classifiers, and switches Ruff target-version to py311.
python/e2e/testharness/proxy.py Updates type hints to `
python/e2e/testharness/context.py Updates internal optional fields to `
python/e2e/test_session.py Switches timeout exception handling to TimeoutError.
python/copilot/types.py Adopts Python 3.10+ union syntax and moves NotRequired to stdlib typing.
python/copilot/tools.py Uses collections.abc.Callable for annotations.
python/copilot/session.py Updates optional annotations and changes timeout exception handling.
python/copilot/jsonrpc.py Updates type hints to `
python/copilot/generated/session_events.py Generated typing modernizations (built-in generics/unions).
python/copilot/generated/rpc.py Generated typing modernizations (built-in generics/unions).
python/copilot/client.py Updates optional annotations and timeout exception handling.
.github/workflows/python-sdk-tests.yml Adds a Python-version matrix to run SDK tests across multiple interpreters.

@brettcannon
Copy link
Contributor Author

I don't think those test failures are because of my PR.

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.

1 participant