-
Notifications
You must be signed in to change notification settings - Fork 2k
Remove Python 3.9 support #19273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Python 3.9 support #19273
Conversation
This removes Python 3.9 support across all packages in the repository. Changes include: - Updated pyproject.toml files to require Python 3.10+ - Removed Python 3.9 from CI/CD test matrices - Updated documentation to reflect Python 3.10+ requirement - Removed Python 3.9 classifiers from all packages - Removed importlib_metadata dependency (only needed for Python <3.10) - Updated mypy target version to 3.10 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
CodSpeed Performance ReportMerging #19273 will not alter performanceComparing Summary
|
…t.mock Replace all instances of AsyncMock being imported from prefect.testing.utilities with imports from unittest.mock instead. This change standardizes the mock imports to use the standard library's unittest.mock module rather than re-exporting from prefect.testing.utilities. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Update Dockerfile, documentation, and README files that still referenced Python 3.9 as the minimum version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
| [tool.uv.sources] | ||
| prefect = { path = "../../../" } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ray==2.50.0 switched to using uv to set up execution environments, which doesn't work well with this source configuration. This change will cause the tests to run against the latest release prefect version instead of a dev version.
zzstoatzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
i think there are a few places we can remove <3.10 handling:
- https://github.com/prefecthq/prefect/tree/remove-python-39-support/src/prefect/utilities/compat.py#L8-L23
- https://github.com/prefecthq/prefect/tree/remove-python-39-support/src/prefect/utilities/importtools.py#L43-L46
- https://github.com/prefecthq/prefect/tree/remove-python-39-support/src/prefect/server/database/dependencies.py#L236-L248
Summary
This PR removes Python 3.9 support from all packages in the repository. Python 3.9 is EOL at the end of this month.
Changes
Package Configuration
requires-pythonfrom>=3.9to>=3.10in:pyproject.tomlclient/pyproject.tomlpyproject.tomlfiles (18 packages)importlib_metadatadependency (only needed for Python <3.10)CI/CD
python-tests.yamldocker-images.yamlwindows-tests.yamlprefect-aws-docker-images.yamlstatic-analysis.yamlpython-package.yamlintegration-package-release.yamlprefect-client.yamlintegration-package-tests.yamlDocumentation
docs/v3/get-started/install.mdx🤖 Generated with Claude Code