googleapis / googleapis/google-cloud-python
Add conditional logic in `_compat.py.j2` to import static code from google-api-core
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 122
Description
As part of refactoring the generator we are moving static code within templates to `_compat.py.j2` and google-api-core. Add conditional logic to check if this static code exists in google-api-core and use it from there, if not then use the fallback implementation within the file.
Contributor guide
Research direction
Start by reading the generator template `_compat.py.j2` and locating the static code that is being moved. Then inspect how google-api-core exposes that code and how the generator handles conditional imports. Done means the template uses the google-api-core implementation when available and retains its fallback when it is not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100