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

Open Beginner friendly
#16,286 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python

Research direction

Start by reading rest_asyncio.py.j2 and async_client.py.j2, focusing on the experimental-feature guards around generated code. Inspect the generator’s output for GAPICs and confirm that rest_asyncio.py and async_client.py are produced unconditionally once async REST support is GA.

Written by the indexing model from the issue text.

Description

priority: p2 type: feature request

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.

Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-cloud-python

All issues in googleapis/google-cloud-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.