googleapis / googleapis/google-cloud-python

[async REST] Remove guards for async rest transport and async client generation once async REST support is GA

Abierto
#16,286 3 comentarios 0 reacciones 0 asignados Ver en GitHub
priority: p2 type: feature request
Lenguaje dominante
Python
Estrellas
5.4k
Forks
1.8k
Merge medio
3 d 4 h
PR fusionados (30 d)
122

Descripción

Once support for async `REST` transport goes from `experimental` -> `GA`,
we need to remove the following conditions that guard the generation of the async rest transport and the async client:

from `rest_asyncio.py.j2`:
```
{% set rest_async_io_enabled = api.all_library_settings[api.naming.proto_package].python_settings.experimental_features.rest_async_io_enabled %}
{% if rest_async_io_enabled %}
..code
{% endif %}{# if rest_async_io_enabled #}
```

from `async_client.py.j2`:
```
{% set rest_async_io_enabled = api.all_library_settings[api.naming.proto_package].python_settings.experimental_features.rest_async_io_enabled %}
{% set is_grpc_transport = True if 'grpc' in opts.transport else False %}
{% if rest_async_io_enabled or is_grpc_transport %}
..code
{% endif %}{# if rest_async_io_enabled and is_grpc_transport #}
```
Making this change wil generate the relevant files i.e `rest_asyncio.py` and `async_client.py` unconditionally for GAPICs.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.