Skip to content

feat: provide and use Python version support check #832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

vchudnov-g
Copy link
Contributor

This exports a function check_python_version that dependent packages can use to verify the run-time version on which they are running and warn users when they need to upgrade their Python version. google.api_core also applies this function to itself.

This checks the runtime versions.

Note that the defaults mean

- we get the correct behavior for 3.7 and 3.8: both of these became
immediately unsupported;

- we get the most conservative behavior for 3.9: it becomes
immediately deprecated (desired, since Python 3.9 reaches its end of
life in 2025-10), and will become unsupported once it reaches its end
of life (which is a conservative policy that we may or may not want to
relax in a follow-up)

Still todo: echo the package name in the warning message.
@vchudnov-g vchudnov-g requested review from parthea and ohmayr July 29, 2025 21:35
@vchudnov-g vchudnov-g requested review from a team as code owners July 29, 2025 21:35
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Jul 29, 2025
@vchudnov-g
Copy link
Contributor Author

Note that I've also made the Python 3.9 support window as conservative (short) as possible. We can extend it if that's the outcome of our discussions, but it's better to start restrictively and then extend than to start permissively and then contract.

@vchudnov-g vchudnov-g marked this pull request as draft July 29, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants