googleapis / googleapis/google-cloud-python

generated client code attempts to use a copy constructor

未关闭
#16,205 1 条评论 0 个 reaction 已指派 1 人 已被 @daniel-sanche 认领 在 GitHub 查看
priority: p2 type: bug
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
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 摘要。