fix(db-dtypes): Drop support for Python <= 3.9#16966
fix(db-dtypes): Drop support for Python <= 3.9#16966chalmerlowe wants to merge 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request drops support for Python 3.9, updating documentation, CI configurations, and package metadata to reflect a new minimum requirement of Python 3.10. The runtime version check has been simplified by removing the _versions_helpers module and using sys.version_info directly. Feedback suggests moving the sys import to the top level for idiomatic consistency and ensuring that versioning follows standard policies when dropping support.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/db-dtypes/db_dtypes/init.py (33)
It is more idiomatic to import sys at the top level of the module rather than inside a function, especially for a lightweight standard library module. This also avoids re-importing it every time _check_python_version is called.
import sys
packages/db-dtypes/db_dtypes/init.py (343-345)
The local import of sys can be removed if it is moved to the top level. Additionally, when updating the minimum supported Python version in runtime checks (e.g., sys.version_info), ensure that the project's metadata in setup.py or pyproject.toml is updated to reflect the same minimum version. If this change drops support for a Python version, prefer a minor version bump over a patch version bump.
if sys.version_info < (3, 10):
References
- When updating the minimum supported Python version in runtime checks, ensure that the project's metadata in 'setup.py' or 'pyproject.toml' is also updated.
- When a release introduces breaking changes such as dropping support for specific Python versions, prefer a minor version bump over a patch version bump.
This PR updates `db-dtypes` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.7, 3.8, and 3.9.
Changes
Fixes internal issue: http://b/482126936 🦕