googleapis / googleapis/google-cloud-python

BidiRpc missing timeout and retry arguments

Đang mở
#15,084 2 bình luận 0 reaction 1 người được giao Được @tswast nhận Xem trên GitHub
type: feature request
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

**Is your feature request related to a problem? Please describe.**

Most (all?) generated methods contain the following arguments:

```
retry: google.api_core.retry.Retry = google.api_core.gapic_v1.method.DEFAULT,
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
```

I'd like to be able to pass these through from the method I'm wrapping. Currently, this is possible with `metadata`. See:

https://github.com/googleapis/python-api-core/blob/40f52bf1100cf56b7f9af267d210b8a72fc34f08/google/api_core/bidi.py#L279

But it does not appear to be possible with other arguments such as `timeout` and `retry`.

**Describe the solution you'd like**

Add `retry` and `timeout` as optional arguments to `BidiRpc`.

Perhaps if `retry` and `timeout` aren't available in older generated clients, some additional logic will be required to prevent breaking them? I recall they've been around for quite some time, though.

**Describe alternatives you've considered**

Perhaps an arbitrary `**kwargs` dictionary for extra arguments to pass to the `_start_rpc` method?

**Additional context**

* https://github.com/googleapis/python-bigquery-storage/pull/278
* https://github.com/googleapis/google-cloud-python/issues/16450 -- I suspect this feature will need to be implemented before the generator can consider using BidiRpc by default.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.