Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

fix: remove trailing underscore in transcoding - #489

Closed
parthea wants to merge 16 commits into
mainfrom
remove-trailing-underscore-transcoding
Closed

fix: remove trailing underscore in transcoding#489
parthea wants to merge 16 commits into
mainfrom
remove-trailing-underscore-transcoding

Conversation

@parthea

@partheaparthea commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

Fixesgoogleapis/google-cloud-python#15074
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_.

@partheaparthea closed this Mar 7, 2023
@product-auto-labelproduct-auto-labelBot 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 teamMarch 7, 2023 15:58

@vchudnov-gvchudnov-g left a comment

Copy link
Copy Markdown
Contributor

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...

Comment threadtests/unit/test_path_template.py Outdated
Comment threadgoogle/api_core/path_template.py Outdated
Comment threadgoogle/api_core/path_template.py Outdated
Comment threadgoogle/api_core/path_template.py
Comment threadgoogle/api_core/path_template.py
@parthea

Copy link
Copy Markdown
ContributorAuthor

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

@partheaparthea added the status: blocked Resolving the issue is dependent on other work. label Mar 14, 2023
Comment threadgoogle/api_core/path_template.py
@parthea
parthea requested a review from BenRKarlMarch 16, 2023 11:39
@partheaparthea closed this Jul 4, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: mPull request size is medium.status: blockedResolving 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

@parthea@BenRKarl@vchudnov-g@atulep@dizcology