feat(core): Drop support for Python 3.7, 3.8, and 3.9#16953
feat(core): Drop support for Python 3.7, 3.8, and 3.9#16953chalmerlowe wants to merge 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request drops support for Python 3.9, updating the minimum supported version to 3.10 across the package configuration and documentation. It also removes legacy Python 3.7 compatibility code and updates the minimum version for grpcio dependencies. Feedback includes ensuring that Python 3.13 and 3.14 are included in the unit test matrix and PyPI classifiers, as well as adding grpcio-status to the new constraints file to properly verify dependency lower bounds.
| "3.10", | ||
| "3.11", | ||
| "3.12", |
There was a problem hiding this comment.
The UNIT_TEST_PYTHON_VERSIONS list is missing Python 3.13 and 3.14. Since these versions are explicitly listed as supported in CONTRIBUTING.rst and 3.14 is designated as the DEFAULT_PYTHON_VERSION, they should be included in the unit test matrix to ensure compatibility is verified in CI. Please verify that these versions are not already present in the configuration list before applying this change.
| "3.10", | |
| "3.11", | |
| "3.12", | |
| "3.10", | |
| "3.11", | |
| "3.12", | |
| "3.13", | |
| "3.14", |
References
- Verify that suggested additions to a configuration list (such as Python versions in a test matrix) are not already present in the file before recommending their inclusion to avoid false positive suggestions.
- Python 3.14 is a valid Python version and should be supported in configurations.
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", |
There was a problem hiding this comment.
The PyPI classifiers are missing Python 3.13 and 3.14. To accurately reflect the supported versions mentioned in the documentation and other configuration files, please add these classifiers. This ensures the project's metadata in 'setup.py' is updated to reflect the supported Python versions consistently.
| "Programming Language :: Python :: 3.10", | |
| "Programming Language :: Python :: 3.11", | |
| "Programming Language :: Python :: 3.12", | |
| "Programming Language :: Python :: 3.10", | |
| "Programming Language :: Python :: 3.11", | |
| "Programming Language :: Python :: 3.12", | |
| "Programming Language :: Python :: 3.13", | |
| "Programming Language :: Python :: 3.14", |
References
- When updating supported Python versions, ensure that the project's metadata in 'setup.py' or 'pyproject.toml' is also updated to reflect the same versions in Trove classifiers.
| # Then this file should have foo==1.14.0 | ||
| google-api-core==2.11.0 | ||
| google-auth==2.14.1 | ||
| grpcio==1.47.0 |
There was a problem hiding this comment.
The constraints file should include grpcio-status at its lower bound (1.47.0), as it is a dependency in the grpc extra and the file header specifies that all library dependencies and extras should be listed to ensure lower bounds are correctly tested. This ensures that testing minimum dependency versions does not inadvertently pull in newer transitive dependencies that could mask compatibility issues.
grpcio==1.47.0
grpcio-status==1.47.0
References
- When testing minimum dependency versions, use a minimal set of extras to avoid pulling in newer transitive dependencies that could mask compatibility issues.
This PR updates `google-cloud-core` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.7, 3.8, and 3.9.
Changes
Verified successfully with 153 passing unit tests under Python 3.10!
Fixes internal issue: http://b/482126936 🦕