Skip to content

fix(google-cloud-core): Drop support for Python 3.9#16953

Merged
parthea merged 15 commits intomainfrom
feat/drop-python-3.7-3.9-google-cloud-core
May 6, 2026
Merged

fix(google-cloud-core): Drop support for Python 3.9#16953
parthea merged 15 commits intomainfrom
feat/drop-python-3.7-3.9-google-cloud-core

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

@chalmerlowe chalmerlowe commented May 5, 2026

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

  • Configuration: Updated `setup.py` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.9.
  • Documentation: Updated `README.rst` and `CONTRIBUTING.rst` to reflect supported Python versions.
  • Cleanup: Removed dead polyfill for `importlib.metadata` in `google/cloud/obsolete/init.py`.
  • Constraints: Transferred lower bounds to `constraints-3.10.txt` and dropped `constraints-3.9.txt`.
  • Fixes: Bumped `grpcio` to `1.47.0` to fix Python 3.10 build failures.

Fixes internal issue: http://b/482126936 🦕

@chalmerlowe chalmerlowe requested a review from a team as a code owner May 5, 2026 20:12
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, 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.

Comment on lines 28 to 30
"3.10",
"3.11",
"3.12",
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 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.

Suggested change
"3.10",
"3.11",
"3.12",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
References
  1. 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.
  2. Python 3.14 is a valid Python version and should be supported in configurations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@gemini-code-assist:

Thanks for your help. In this case, these references are present. They may be outside the diff window but they are there.

This comment is not relevent. Closing. Please make a note of this occurrence as part of training yourself to improve the quality of your future code reviews.

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.

I apologize for the oversight. Thank you for clarifying that the Python versions are present in the configuration. I have noted this for future reference.

Comment on lines 78 to 80
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
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 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.

Suggested change
"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
  1. 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@gemini-code-assist:

Thanks for your help. In this case, these references are present. They may be outside the diff window but they are there.

This comment is not relevent. Closing. Please make a note of this occurrence as part of training yourself to improve the quality of your future code reviews.

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.

Understood. Thank you for the clarification regarding the presence of these classifiers in other files. I have noted this for future reference.

Comment thread packages/google-cloud-core/testing/constraints-3.10.txt
@chalmerlowe chalmerlowe added this to the Drop support for 3.7-3.9 milestone May 5, 2026
@parthea parthea changed the title feat(core): Drop support for Python 3.7, 3.8, and 3.9 fix(core): Drop support for Python 3.9 May 6, 2026
@parthea parthea changed the title fix(core): Drop support for Python 3.9 fix(google-cloud-core): Drop support for Python 3.9 May 6, 2026
@parthea parthea merged commit 78a48b0 into main May 6, 2026
30 checks passed
@parthea parthea deleted the feat/drop-python-3.7-3.9-google-cloud-core branch May 6, 2026 15:19
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.

2 participants