Skip to content

feat(spanner): drop Python 3.7-3.9 support and regenerate#17169

Draft
chalmerlowe wants to merge 2 commits into
mainfrom
fix-spanner-FTL-1.32.0
Draft

feat(spanner): drop Python 3.7-3.9 support and regenerate#17169
chalmerlowe wants to merge 2 commits into
mainfrom
fix-spanner-FTL-1.32.0

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

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

  • updates the lower bound versions for several libraries to avoid conflicts and install issues in both setup.py and constraints-3.10.txt
  • updates post-processing scripts to ensure the above updates persist

@chalmerlowe chalmerlowe added this to the generate via 1.32.0 milestone May 18, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +65 to +72
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. When updating the list of supported Python versions in documentation, ensure that all version-specific link targets are present and correctly defined.

Comment on lines +65 to +72
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. 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 "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The warning message contains a placeholder {_package_label} but the string segment is missing the f prefix, which will prevent the variable from being interpolated.

Suggested change
+ "updates for {_package_label}, ensure you are "
+ f"updates for {_package_label}, ensure you are "

"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 "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The warning message contains a placeholder {_package_label} but the string segment is missing the f prefix, which will prevent the variable from being interpolated.

Suggested change
+ "using a supported version of Python; see "
+ f"updates for {_package_label}, ensure you are "

Comment on lines +42 to +45
"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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. Verify that libraries listed in constraints files are present and consistent with the project's primary dependency specification in setup.py.
  2. When updating the minimum supported Python version, ensure that the project's metadata in setup.py (python_requires and Trove classifiers) is also updated.
  3. When a release introduces breaking changes such as dropping support for specific Python versions, prefer a minor version bump over a patch version bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant