Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

The codebase uses PEP 585 generic type syntax (tuple[str, int]) which requires Python 3.9+. Python 3.8 raises TypeError: 'type' object is not subscriptable at runtime.

Changes

  • python/pyproject.toml

    • requires-python: >=3.8>=3.9
    • Removed Python 3.8 from classifiers
    • Updated ruff target-version: py38py39
  • python/README.md

    • Requirements section: Python 3.8+Python 3.9+

Users on Python 3.8 will now receive a clear installation error instead of runtime failures.

Original prompt

This section details on the original issue you should resolve

<issue_title>client.py</issue_title>
<issue_description>*** Python 3.8.8 (default, Apr 13 2021, 15:08:07) [MSC v.1916 32 bit (Intel)] on win32. ***
On clien.py I cannot go beyond no matter what I tried
def _parse_cli_url(self, url: str) -> tuple[str,int]:

File "G:\python\copilot-sdk-main\python\copilot\client.py", line 138, in CopilotClient
def _parse_cli_url(self, url: str) -> tuple[str,int]:
TypeError: 'type' object is not subscriptable</issue_description>

<agent_instructions>Update pyproject.toml and python readmes to reflect that the minimum version is 3.9+</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Copilot AI changed the title [WIP] Update minimum Python version to 3.9 in project files Bump Python minimum version to 3.9+ Jan 23, 2026
Copilot AI requested a review from friggeri January 23, 2026 17:34
@friggeri friggeri marked this pull request as ready for review January 23, 2026 19:00
@friggeri friggeri requested a review from a team as a code owner January 23, 2026 19:00
Copilot AI review requested due to automatic review settings January 23, 2026 19:00
@friggeri friggeri enabled auto-merge January 23, 2026 19:00
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 updates the documented and enforced minimum Python version for the Python SDK to 3.9+, aligning it with the use of PEP 585 generics that are not compatible with Python 3.8, so 3.8 users fail at install time instead of at runtime.

Changes:

  • Raised requires-python in python/pyproject.toml from >=3.8 to >=3.9 and removed the Python 3.8 classifier.
  • Updated Ruff configuration target-version from py38 to py39 to match the new minimum runtime version.
  • Updated the Python SDK README requirements from “Python 3.8+” to “Python 3.9+” for consistency with packaging metadata.
    Note: Other repo docs still reference Python 3.8 (e.g., CONTRIBUTING.md, cookbook/python/recipe/README.md); consider updating those in a follow-up change.

Reviewed changes

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

File Description
python/pyproject.toml Bumps the minimum supported Python version to 3.9 in packaging metadata and linter configuration, removing Python 3.8 from classifiers.
python/README.md Updates the documented Python version requirement from 3.8+ to 3.9+ for the Python SDK.

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

@friggeri friggeri added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit badba6c Jan 23, 2026
30 of 33 checks passed
@friggeri friggeri deleted the copilot/update-python-version-requirement branch January 23, 2026 19:08
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.

client.py

3 participants