Skip to content

Conversation

vchudnov-g
Copy link
Contributor

Add a check to generated GAPICs to emit the appropriate usage warnings (most prominently, deprecation messages) for unsupported Python runtime versions and dependency versions.

The intent is that before we stop allowing some old versions of a package dependency, we'll have at least one release that adds a warning saying those versions of the dependency are deprecated, before we actually disallow those versions of the dependency in future versions of the GAPICs.

For Python run-times, once we depend on google.api_core after the run-time checks have been implemented (in googleapis/python-api-core#832), these usage/deprecation warnings will be automatic. All we need to do is update the dates for (future) Python versions hard-coded therein.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jul 30, 2025
@vchudnov-g
Copy link
Contributor Author

Both the package dependency and the Python run-time checks depend on googleapis/python-api-core#832

@product-auto-label product-auto-label bot added size: m Pull request size is medium. size: l Pull request size is large. and removed size: s Pull request size is small. size: m Pull request size is medium. labels Jul 31, 2025
return parse_version(version_string)

try:
_dependency_package = "google.protobuf"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct package name? It falls through to the except clause for me when I run the integration tests. Do I need to create a real GAPIC to test this properly?

@vchudnov-g
Copy link
Contributor Author

This PR will now do basic checks even if api_core is not updated, so it is no longer dependent on googleapis/python-api-core#832.

There are still some presubmit failures that I will continue investigating.

@vchudnov-g vchudnov-g marked this pull request as ready for review August 1, 2025 04:35
@vchudnov-g vchudnov-g requested a review from a team as a code owner August 1, 2025 04:35
@parthea parthea assigned vchudnov-g and unassigned parthea Aug 28, 2025
@vchudnov-g vchudnov-g force-pushed the python-version-support-check branch 2 times, most recently from dce9bdf to 8645ead Compare September 2, 2025 22:37
@vchudnov-g vchudnov-g force-pushed the python-version-support-check branch from aa6c360 to 34eb7ab Compare September 9, 2025 19:11
@vchudnov-g vchudnov-g force-pushed the python-version-support-check branch 11 times, most recently from 7db28d8 to a4eb323 Compare September 24, 2025 23:45
@vchudnov-g vchudnov-g added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 24, 2025
@vchudnov-g
Copy link
Contributor Author

Do not merge yet while I work out the final details of this initial implementation and we get approval on the design.

(I'm expecting pre-submits to pass now.)

@vchudnov-g vchudnov-g added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 25, 2025
@vchudnov-g vchudnov-g force-pushed the python-version-support-check branch from a4eb323 to a58ed35 Compare October 1, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates a pull request not ready for merge, due to either quality or timing. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants