chore: regenerate google-cloud-automl to resolve conflict#17132
chore: regenerate google-cloud-automl to resolve conflict#17132chalmerlowe wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a post-processing configuration to update the google-auth dependency version in the AutoML client's setup.py to resolve a dependency conflict. The reviewer recommended using flexible regex patterns instead of hardcoded version strings in the search block to ensure the replacement logic remains robust against future version updates in the source code.
| before: | | ||
| dependencies = \[ | ||
| "google-api-core[grpc\] >= 2.17.1, <3.0.0", | ||
| # Exclude incompatible versions of `google-auth` | ||
| # See https://github.com/googleapis/google-cloud-python/issues/12364 | ||
| "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", | ||
| "grpcio >= 1.44.0, < 2.0.0", | ||
| "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", | ||
| "proto-plus >= 1.22.3, <2.0.0", | ||
| "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", | ||
| "protobuf >= 4.25.8, < 8.0.0", |
There was a problem hiding this comment.
The before block uses hardcoded versions. According to the repository rules, search patterns for automated code replacements in librarian post-processing YAML files should use flexible regex patterns (such as [\s\S]*) to match version strings instead of hardcoding specific versions. This ensures the replacement logic remains functional even when dependency versions are updated in the source files. Also, ensure all special characters like [ are properly escaped.
before: |
dependencies = \[
"google-api-core\[grpc\] >= [\s\S]*, <3.0.0",
# Exclude incompatible versions of google-auth
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth >= [\s\S]*, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= [\s\S]*, < 2.0.0",
"grpcio >= [\s\S]*, < 2.0.0; python_version >= '[\s\S]*'",
"proto-plus >= [\s\S]*, <2.0.0",
"proto-plus >= [\s\S]*, <2.0.0; python_version >= '[\s\S]*'",
"protobuf >= [\s\S]*, < 8.0.0",References
- When defining search patterns for automated code replacements in librarian post-processing YAML files, use flexible regex patterns (such as [\s\S]*) to match version strings instead of hardcoding specific versions. This ensures the replacement logic remains functional even when dependency versions are updated in the source files, preventing match failures.
Bump
google-authto>=2.26.1to prevent dependency resolution issue and regenerate.Fixes #17131 🦕