Skip to content

Drop Python 3.9 support and update type hints#906

Merged
LeMyst merged 1 commit intomasterfrom
remove-python-3.9
Mar 14, 2026
Merged

Drop Python 3.9 support and update type hints#906
LeMyst merged 1 commit intomasterfrom
remove-python-3.9

Conversation

@LeMyst
Copy link
Owner

@LeMyst LeMyst commented Sep 13, 2025

Removed Python 3.9 support from workflows, documentation, and pyproject.toml. Updated type hints throughout the codebase to use PEP 604 union syntax (e.g., str | None) and cleaned up related imports. Minor formatting improvements and dependency updates for Python 3.10+ compatibility.

@LeMyst LeMyst force-pushed the remove-python-3.9 branch 4 times, most recently from 4167451 to 05ed30d Compare March 14, 2026 14:55
Removed Python 3.9 support from workflows, documentation, and pyproject.toml. Updated type hints throughout the codebase to use PEP 604 union syntax (e.g., str | None) and cleaned up related imports. Minor formatting improvements and dependency updates for Python 3.10+ compatibility.
@LeMyst LeMyst force-pushed the remove-python-3.9 branch from 05ed30d to 8ca2cb1 Compare March 14, 2026 14:58
@LeMyst LeMyst marked this pull request as ready for review March 14, 2026 15:14
Copilot AI review requested due to automatic review settings March 14, 2026 15: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 drops Python 3.9 support and modernizes the codebase for Python 3.10+ compatibility. It updates type hints to use PEP 604 union syntax (X | Y instead of Optional[X]/Union[X, Y]), bumps CI and documentation references, and regenerates poetry.lock to remove Python 3.9-specific dependency entries.

Changes:

  • Replaced all Optional[X] and Union[X, Y] type hints with PEP 604 syntax (X | None, X | Y) across all datatype, model, and login modules, removing now-unused typing imports.
  • Updated CI workflows, pyproject.toml, README, and copilot instructions to reflect the new Python version range (3.10–3.14 stable, 3.15-dev).
  • Regenerated poetry.lock to remove duplicate Python 3.9-era package entries and version markers.

Reviewed changes

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

Show a summary per file
File Description
pyproject.toml Removed Python 3.9 classifier, added 3.15, bumped minimum to ^3.10
poetry.lock Removed Python 3.9 package variants and markers
README.md Updated supported version text from 3.9–3.13 to 3.10–3.14
.github/workflows/python-pytest.yaml Updated test matrix: dropped 3.9, added 3.14 stable and 3.15-dev
.github/workflows/python-lint.yaml Bumped lint Python from 3.13 to 3.14
.github/workflows/publish-to-pypi.yaml Bumped publish Python from 3.13 to 3.14
.github/copilot-instructions.md Updated version references to 3.10+/3.15-dev
wikibaseintegrator/wbi_config.py Replaced Union with | syntax, removed typing import
wikibaseintegrator/wbi_login.py Replaced Optional with | None syntax
wikibaseintegrator/wbi_enums.py Added blank line formatting fix
wikibaseintegrator/wbi_backoff.py Added blank line formatting fixes
wikibaseintegrator/models/claims.py Moved Callable import from typing to collections.abc
wikibaseintegrator/datatypes/*.py (13 files) Replaced Optional/Union with PEP 604 syntax in all datatype modules

You can also share your feedback on Copilot code review. Take the survey.

@LeMyst LeMyst merged commit fa79add into master Mar 14, 2026
19 checks passed
@LeMyst LeMyst deleted the remove-python-3.9 branch March 14, 2026 15:22
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