googleapis / googleapis/google-cloud-python

generated client code attempts to use a copy constructor

オープン
#16,205 コメント 1 件 リアクション 0 件 担当者 1 名 @daniel-sanche が担当を希望しています GitHub で見る
priority: p2 type: bug
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
3日 4時間
マージ済み PR(30日)
122

説明

I have a generated `services/forrest/pagers.py`

It's generating the following:

self._request = forrest_pb2.ListRunsRequest(request)

There doesn't appear to be a copy constructor in my protobuf version. Not sure when that was added. Manually modifying the code to

self._request = forrest_pb2.ListRunsRequest()
self._request.CopyFrom(request)

works correctly.

`forrest_pb2.ListRunsRequest()` is a python protobuf that is in a different package then the `service.proto` I generated using gapic. I think the `pagers.py` is assuming the `ListRunsRequest` message is a proto-plus message.

#### Environment details

- OS type and version: gLinux
- protoc version: libprotoc 32.1
- Python version: 3.11.9
- `gapic-generator` version: 1.30.2
- python `protobuf` package: 6.32.1

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。