gapic-generator-python
gapic-generator-python copied to clipboard
Generate Python API client libraries from Protocol Buffers.
Once Python 3.8 is dropped, we should use `@functools.cache`, which was added in Python3.9, instead of `@functools.lru_cache(max_size=None)` From https://docs.python.org/3/library/functools.html#functools.cache, > `@functools.cache` returns the same as `lru_cache(maxsize=None)`, creating a thin wrapper...
See feedback in https://github.com/googleapis/gapic-generator-python/pull/2131/files#r1751065571 from review of PR https://github.com/googleapis/gapic-generator-python/pull/2131 which calls out that the logic for explicit routing headers which exists in `_client_macros.j2` could be moved to `google-api-core`, similar to...
See feedback in https://github.com/googleapis/gapic-generator-python/pull/2126#discussion_r1750834836 from review of PR https://github.com/googleapis/gapic-generator-python/pull/2126 which calls out that `empty_call_test` should test that an exception is raised if `request=None` and a field in the request message...
The following mixin methods implemented in the async client wrap the retry and timeout information during the method call in the following way: ``` rpc = gapic_v1.method_async.wrap_method( self._client._transport.get_iam_policy, default_timeout=None, client_info=DEFAULT_CLIENT_INFO,...
The macro `shared_macros.create_interceptor_class` which generates an interceptor class for async / sync rest transport currently guards generation of asynchronous interceptor class methods for api mixins. As we add support for...
Add test coverage for the following method types in the macros called within `rest_required_test` as we implement these features for async rest: - `server streaming` - `lros` - `extended lros`...
Part of b/362329264
Bump the minimum version of `google-api-core` in GAPICs to include the changes required for an asynchronous REST transport and to leverage the updated `wrap_method` with the kind method unconditionally for...
[This comment thread](https://github.com/googleapis/gapic-generator-python/commit/c4408075f8cc8a270af4a818ea7aafc0c2ad6a7e#r146008230) highlights that some unknown time ago, code that was apparently meant to cover several cases including bi-directional streaming was moved into sections of macro files that were...
`google.api.core.exceptions.from_http_response` only supports formatting response errors where a response is of type `requests.Response`. Deprecate `google.api.core.exceptions.from_http_response` and use `google.api.core.exceptions.format_http_response_error` instead for handling response errors for a synchronous calls in GAPIC(s).