Skip to content

fix(api-core): drop support for Python 3.9#16980

Merged
chalmerlowe merged 21 commits intomainfrom
feat/drop-python-3.7-3.9-google-api-core
May 11, 2026
Merged

fix(api-core): drop support for Python 3.9#16980
chalmerlowe merged 21 commits intomainfrom
feat/drop-python-3.7-3.9-google-api-core

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

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

Changes

Configuration: Updated pyproject.toml and noxfile.py to require Python 3.10+ and remove references to Python 3.7, 3.8, and 3.9. Updated README.rst and CONTRIBUTING.rst to reflect the new support status.
Cleanup: Removed aiter and anext polyfills in test_bidi_async.py and removed Python < 3.10 polyfills in _python_version_support.py.
Constraints & Dependencies:

  • Created constraints-3.10.txt using the old 3.9 constraints as a baseline.
  • Bumped grpcio to 1.80.0 and requests to 2.33.0 to avoid issues with pkg_resources and six warnings on Python 3.10.
  • Bumped google-auth to 2.35.0 to satisfy async_rest requirements.
    Fixes internal issue: http://b/482126936 🦕

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 documentation, metadata, and CI configurations to set the minimum requirement to Python 3.10. The changes include removing compatibility shims for older Python versions and refactoring logic to utilize features like match statements. Feedback indicates a potential regression in noxfile.py where the new match statement for legacy_proto does not explicitly handle False values, which could lead to assertion failures during testing.

Comment thread packages/google-api-core/noxfile.py
@chalmerlowe chalmerlowe added this to the Drop support for 3.7-3.9 milestone May 7, 2026
Comment thread packages/google-api-core/noxfile.py Outdated
Comment thread packages/google-api-core/testing/constraints-async-rest-3.10.txt
Comment thread packages/google-api-core/tests/asyncio/test_bidi_async.py Outdated
Comment thread packages/google-api-core/pyproject.toml
@parthea parthea changed the title feat(api-core): drop support for Python 3.7, 3.8, and 3.9 fix(api-core): drop support for Python 3.7, 3.8, and 3.9 May 7, 2026
@parthea parthea changed the title fix(api-core): drop support for Python 3.7, 3.8, and 3.9 fix(api-core): drop support for Python 3.9 May 7, 2026
@parthea parthea marked this pull request as ready for review May 7, 2026 18:56
@parthea parthea requested a review from a team as a code owner May 7, 2026 18:56
@chalmerlowe chalmerlowe marked this pull request as draft May 8, 2026 15:47
@chalmerlowe chalmerlowe marked this pull request as ready for review May 8, 2026 16:28
Comment thread packages/google-api-core/google/api_core/grpc_helpers_async.py Outdated
Comment thread packages/google-api-core/testing/constraints-3.10.txt Outdated
Comment thread packages/google-api-core/google/api_core/grpc_helpers_async.py Outdated
Comment thread packages/google-api-core/pyproject.toml Outdated
Comment thread packages/google-api-core/pyproject.toml Outdated
… files.

Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
@chalmerlowe chalmerlowe marked this pull request as draft May 11, 2026 14:14
@chalmerlowe chalmerlowe marked this pull request as ready for review May 11, 2026 14:33
@chalmerlowe
Copy link
Copy Markdown
Contributor Author

chalmerlowe commented May 11, 2026

@parthea

UPDATE: I did not see the approval when I wrote this. Thanks

I believe I have addressed all your comments. Please review. Thanks!

@chalmerlowe chalmerlowe merged commit e5ed472 into main May 11, 2026
31 checks passed
@chalmerlowe chalmerlowe deleted the feat/drop-python-3.7-3.9-google-api-core branch May 11, 2026 14:34
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