Skip to content
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

fix: remove trailing underscore in transcoding #489

Closed
wants to merge 16 commits into from

Conversation

parthea
Copy link
Collaborator

@parthea parthea commented Mar 7, 2023

Fixes #490
Googlers see proposal go/python-transcoding-reserved-keywords

This PR fixes an error seen in googleapis/python-debugger-client#151 which happens when the gapic generator appends an underscore to a field name which is a python reserved keyword. As similar issue was reported in #227 and fixed in #228. Based on comment #227 (comment) it is not possible for fields to have trailing _ at the proto level (Creating a field like this generates an error from the protobuf runtime).

See build log https://github.com/googleapis/python-debugger-client/actions/runs/4292539515/jobs/7479094983 which shows the failure when a request has body with breakpoint_ instead of breakpoint_.

@parthea parthea closed this Mar 7, 2023
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Mar 7, 2023
@parthea parthea marked this pull request as ready for review March 7, 2023 15:58
@parthea parthea requested review from a team as code owners March 7, 2023 15:58
Copy link
Contributor

@vchudnov-g vchudnov-g left a comment

Choose a reason for hiding this comment

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

Question about simplifying/robustifying processing...

tests/unit/test_path_template.py Outdated Show resolved Hide resolved
google/api_core/path_template.py Outdated Show resolved Hide resolved
google/api_core/path_template.py Outdated Show resolved Hide resolved
google/api_core/path_template.py Show resolved Hide resolved
@parthea
Copy link
Collaborator Author

parthea commented Mar 14, 2023

Waiting for approval in go/python-transcoding-reserved-keywords

@parthea parthea added the status: blocked Resolving the issue is dependent on other work. label Mar 14, 2023
@parthea parthea requested a review from BenRKarl March 16, 2023 11:39
@parthea parthea closed this Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium. status: blocked Resolving the issue is dependent on other work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transcoding fails when HTTP request body contains a field name which is a reserved word in python
5 participants