Skip to content

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
@vchudnov-g vchudnov-g force-pushed the python-version-support-check branch from bd11f72 to 0a3434e Compare August 12, 2025 17:17
@vchudnov-g vchudnov-g force-pushed the python-version-support-check branch from d727f14 to 17ef4f0 Compare August 12, 2025 19:23
Removed @pytest.mark.asyncio
Defined literl timeouts as a specifie_timeout local variable
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