feat(spanner): drop Python 3.7-3.9 support and regenerate#17169
feat(spanner): drop Python 3.7-3.9 support and regenerate#17169chalmerlowe wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request drops support for Python 3.9 across the Spanner client library, updating CI configurations, dependency constraints, and package initialization logic. However, several issues were identified in the review: the documentation in README.rst files incorrectly suggests that Python 3.9 is still supported while 3.8 is the limit, and the setup.py file contains inconsistent dependency downgrades for google-api-core and proto-plus. Additionally, missing f-string prefixes in __init__.py files for both database and instance admin packages will prevent proper variable interpolation in warning messages. Feedback also suggests ensuring that setup.py metadata (classifiers and python_requires) and the package versioning reflect this breaking change.
| Python >= 3.9, including 3.14 | ||
|
|
||
| .. _active: https://devguide.python.org/devcycle/#in-development-main-branch | ||
| .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches | ||
|
|
||
| Unsupported Python Versions | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| Python <= 3.9 | ||
| Python <= 3.8 |
There was a problem hiding this comment.
The documentation update contradicts the pull request title and the logic implemented in the package initialization. Since support for Python 3.9 is being dropped, the supported version should remain >= 3.10 and the unsupported range should include 3.9 (i.e., <= 3.9). The current changes incorrectly suggest that Python 3.9 is supported and that 3.8 is the maximum unsupported version. Additionally, ensure all version-specific link targets are correctly defined to avoid broken references.
References
- When updating the list of supported Python versions in documentation, ensure that all version-specific link targets are present and correctly defined.
| Python >= 3.9, including 3.14 | ||
|
|
||
| .. _active: https://devguide.python.org/devcycle/#in-development-main-branch | ||
| .. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches | ||
|
|
||
| Unsupported Python Versions | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| Python <= 3.9 | ||
| Python <= 3.8 |
There was a problem hiding this comment.
The documentation update contradicts the pull request title and the logic implemented in the package initialization. Since support for Python 3.9 is being dropped, the supported version should remain >= 3.10 and the unsupported range should include 3.9 (i.e., <= 3.9). The current changes incorrectly suggest that Python 3.9 is supported and that 3.8 is the maximum unsupported version. Additionally, ensure all version-specific link targets are correctly defined to avoid broken references.
References
- When updating the list of supported Python versions in documentation, ensure that all version-specific link targets are present and correctly defined.
| FutureWarning, | ||
| "Could not determine the version of Python " | ||
| + "currently being used. To continue receiving " | ||
| + "updates for {_package_label}, ensure you are " |
There was a problem hiding this comment.
| "Could not determine the version of Python " | ||
| + "currently being used. To continue receiving " | ||
| + "updates for {_package_label}, ensure you are " | ||
| + "using a supported version of Python; see " |
There was a problem hiding this comment.
| "google-api-core[grpc] >= 1.34.0, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", | ||
| "google-cloud-core >= 2.0.0, < 3.0.0", | ||
| "grpc-google-iam-v1 >= 0.12.4, <1.0.0", | ||
| "proto-plus >= 1.22.3, <2.0.0", | ||
| "proto-plus >= 1.22.0, <2.0.0", |
There was a problem hiding this comment.
The lower bounds for google-api-core and proto-plus have been downgraded. This is counter-intuitive when dropping support for older Python versions and increases the risk of introducing compatibility issues. Furthermore, the pinned version for google-api-core in packages/google-cloud-spanner/testing/constraints-3.10.txt is 2.17.1, which is inconsistent with the new lower bound of 1.34.0 defined here. Additionally, since this change drops support for Python 3.9, ensure that the python_requires and Trove classifiers in setup.py are updated to reflect the new minimum version, and that the package version is updated with a minor bump rather than a patch bump.
References
- Verify that libraries listed in constraints files are present and consistent with the project's primary dependency specification in setup.py.
- When updating the minimum supported Python version, ensure that the project's metadata in setup.py (python_requires and Trove classifiers) 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.
…n 3.7-3.9 references
Updates post processing to account for dropping support for Python 3.7, 3.8, 3.9 and the impacts that has on using 3.10 for lower bounds testing.
Changes
setup.pyandconstraints-3.10.txt