Skip to content

fix(testutils): Drop support for Python 3.9#16948

Merged
chalmerlowe merged 5 commits intomainfrom
feat/drop-python-3.7-3.9-google-cloud-testutils
May 5, 2026
Merged

fix(testutils): Drop support for Python 3.9#16948
chalmerlowe merged 5 commits intomainfrom
feat/drop-python-3.7-3.9-google-cloud-testutils

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

This PR updates `google-cloud-testutils` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below.

Changes

  • Configuration: Updated `setup.py` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.9.
  • Constraints: Transferred lower bounds to `constraints-3.10.txt` and dropped `constraints-3.9.txt`.
  • Cleanup: Removed obsolete `tests/test_version_warnings.py`.
  • Expert Improvements: Modernized `mypy.ini` to 3.10 and added `# version-scanner: ignore` pragmas to test fixtures.

Verified successfully with 35 passing unit tests under Python 3.10!

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

@chalmerlowe chalmerlowe requested a review from a team as a code owner May 5, 2026 17:22
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 version to 3.10 across configuration files including mypy.ini, noxfile.py, and setup.py. It also migrates the constraints file to Python 3.10 and adds version-scanner ignore comments to internal test resources. Feedback suggests updating the google-auth constraint to a version compatible with Python 3.10 and adding Trove classifiers for Python 3.13 and 3.14 in setup.py to maintain consistency with the supported versions defined in the CI configuration.

Comment thread packages/google-cloud-testutils/testing/constraints-3.10.txt Outdated
"packaging>=22.0",
),
python_requires=">=3.9",
python_requires=">=3.10",
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 python_requires update to >=3.10 is correct. However, the classifiers list (lines 68-70) should also be updated to include Programming Language :: Python :: 3.13 and Programming Language :: Python :: 3.14 to maintain consistency with the versions specified in noxfile.py and ensure metadata reflects the supported versions.

References
  1. 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 to reflect the same minimum version in 'python_requires' and Trove classifiers.
  2. Python 3.14 is a valid Python version and should be supported in configurations.

@chalmerlowe chalmerlowe added this to the Drop support for 3.7-3.9 milestone May 5, 2026
@@ -36,5 +36,5 @@
],
install_requires=requirements,
packages=setuptools.find_packages(),
python_requires=">=3.9",
python_requires=">=3.9", # version-scanner: ignore
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.

nit: Can we update this rather than ignore it?

@parthea parthea changed the title feat(testutils): Drop support for Python 3.9 fix(testutils): Drop support for Python 3.9 May 5, 2026
@chalmerlowe chalmerlowe merged commit cdc5dd5 into main May 5, 2026
30 checks passed
@chalmerlowe chalmerlowe deleted the feat/drop-python-3.7-3.9-google-cloud-testutils branch May 5, 2026 18:38
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