Skip to content

chore: drop Python 3.9, add 3.12/3.13/3.14 classifiers and CI support#821

Merged
philpep merged 2 commits into
pytest-dev:mainfrom
shenxianpeng:chore/update-python-support
Jun 4, 2026
Merged

chore: drop Python 3.9, add 3.12/3.13/3.14 classifiers and CI support#821
philpep merged 2 commits into
pytest-dev:mainfrom
shenxianpeng:chore/update-python-support

Conversation

@shenxianpeng
Copy link
Copy Markdown
Contributor

@shenxianpeng shenxianpeng commented Jun 3, 2026

Drop Python 3.9 (EOL at 2025-10-31) support and bump minimum to 3.10. Add missing 3.12 and 3.13 classifiers, plus 3.14 support.

  • pyproject.toml: requires-python bumped from >=3.9 to >=3.10; removed 3.9 classifier; added 3.12, 3.13, 3.14 classifiers
  • .github/workflows/tox.yml: replaced 3.9 with 3.14 in the lint matrix
  • ruff.toml: target-version bumped from py39 to py310; applied pyupgrade fixes across 8 source files (PEP 604 union syntax, etc.)

Assisted by Pi + DeepSeek v4

Copy link
Copy Markdown
Contributor

@philpep philpep left a comment

Choose a reason for hiding this comment

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

Please also update target-version in ruff.toml, I guess some syntax modernization is required then.

Also I guess you use AI (or even you might be an agent?), in all cases be honnest and transparent about this please (in commit message or PR description)

Thanks

@shenxianpeng
Copy link
Copy Markdown
Contributor Author

Sure, I've updated the target-version in ruff.toml and also updated the PR description to include details about the AI tools I used.

@shenxianpeng shenxianpeng requested a review from philpep June 4, 2026 07:40
Copy link
Copy Markdown
Contributor

@philpep philpep left a comment

Choose a reason for hiding this comment

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

I think patch 3 should be squashed in patch 2 since it's a direct consequence of it.

Otherwise full changes LGTM

- ruff.toml: target-version py39 -> py310
- Modernize type annotations: Optional[X] -> X | None, Union[X, Y] -> X | Y
- Remove unused typing imports (Optional, Union)
- Migrate typing.Callable -> collections.abc.Callable
@shenxianpeng shenxianpeng force-pushed the chore/update-python-support branch from 125cda5 to 63c08f8 Compare June 4, 2026 08:04
@shenxianpeng
Copy link
Copy Markdown
Contributor Author

Not sure if suqash merge is acceptable for this project. Anyway, I have squashed into 2 commits

image

@shenxianpeng shenxianpeng requested a review from philpep June 4, 2026 08:10
@philpep philpep merged commit 04cccc3 into pytest-dev:main Jun 4, 2026
9 checks passed
@philpep
Copy link
Copy Markdown
Contributor

philpep commented Jun 4, 2026

Merged, thanks!

@shenxianpeng shenxianpeng deleted the chore/update-python-support branch June 4, 2026 19:52
@philpep
Copy link
Copy Markdown
Contributor

philpep commented Jun 4, 2026

Not sure if suqash merge is acceptable for this project. Anyway, I have squashed into 2 commits

Could be but two commits here looks better.

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