Closes #855 Support Python 3.13 in the library#854
Merged
shirasassoon merged 47 commits intomicrosoft:mainfrom Mar 8, 2026
Merged
Closes #855 Support Python 3.13 in the library#854shirasassoon merged 47 commits intomicrosoft:mainfrom
shirasassoon merged 47 commits intomicrosoft:mainfrom
Conversation
added 14 commits
January 22, 2026 11:15
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Python 3.13 support by updating the version requirement to >=3.9,<3.14 and fixing type annotations throughout the codebase that used PEP 604 union syntax (X | Y), which requires Python 3.10+. All such annotations are replaced with Optional[X] and Union[X, Y] from the typing module, ensuring backward compatibility with Python 3.9.
Changes:
- Updated Python version range and classifier in
pyproject.toml, anduv.lockwith Python 3.13 dependency wheels - Updated CI workflow to test against Python 3.9–3.13 as a matrix and upgraded action versions to
checkout@v4/setup-python@v5 - Replaced PEP 604
X | Ytype annotation syntax withOptional[X]/Union[X, Y]in_config_utils.py,_config_validator.py,_fabric_endpoint.py, and_logging.py
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Bumps requires-python to <3.14 and adds Python 3.13 classifier |
uv.lock |
Adds cp313 wheel entries for cffi, charset-normalizer, coverage, MarkupSafe, pywin32, PyYAML, regex, tomli, and watchdog |
.github/workflows/test.yml |
Adds Python version matrix (3.9–3.13), upgrades actions/checkout to v4 and actions/setup-python to v5 |
src/fabric_cicd/_common/_config_utils.py |
Replaces str | list | bool | None return type with Optional[Union[str, list, bool]] |
src/fabric_cicd/_common/_config_validator.py |
Replaces dict | list and str | dict parameter types with Union[dict, list] and Union[str, dict] |
src/fabric_cicd/_common/_fabric_endpoint.py |
Replaces int | None and float | None parameter types with Optional[int] and Optional[float] |
src/fabric_cicd/_common/_logging.py |
Replaces logging.FileHandler | RotatingFileHandler with Union[logging.FileHandler, RotatingFileHandler] |
.changes/unreleased/optimization-20260308-092252.yaml |
Adds changelog entry for Python 3.13 support |
ayeshurun
approved these changes
Mar 8, 2026
ayeshurun
approved these changes
Mar 8, 2026
aviatco
approved these changes
Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds Python 3.13 support and updates type annotations throughout the codebase for better compatibility and clarity. The most significant changes include updating the supported Python versions in the project configuration and CI, and standardizing type hints to use
OptionalandUnionfor improved readability and future compatibility.Python version support:
pyproject.tomlto support Python 3.13 by changingrequires-pythonto>=3.9,<3.14and adding the appropriate classifier. [1] [2].github/workflows/test.yml) to run unit tests against Python 3.9 through 3.13 and updated the used action versions.Type annotation improvements:
OptionalandUnioninstead of the Python 3.10+ syntax (|), improving compatibility and clarity. This includes changes in_common/_config_utils.py,_common/_config_validator.py,_common/_fabric_endpoint.py, and_common/_logging.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]