fix(api-core): drop support for Python 3.9#16980
Conversation
There was a problem hiding this comment.
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.
| # limitations under the License. | ||
|
|
||
| """AsyncIO helpers for :mod:`grpc` supporting 3.7+. | ||
| """AsyncIO helpers for :mod:`grpc` supporting 3.10+. |
There was a problem hiding this comment.
nit: Do we need to include the version here?
| """AsyncIO helpers for :mod:`grpc` supporting 3.10+. | |
| """AsyncIO helpers for :mod:`grpc`. |
| protobuf==4.25.8 | ||
| google-auth==2.35.0 | ||
| requests==2.33.0 | ||
| grpcio==1.80.0 |
There was a problem hiding this comment.
The constraints file should have the minimum support version of grpcio. 1.80.0 is the latest. PTAL . Applies to packages/google-api-core/testing/constraints-async-rest-3.10.txt also
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:
Fixes internal issue: http://b/482126936 🦕