GeezerVison is showing github.com — Naming conflict when importing `ga_operation` · Issue #819 · googleapis/gapic-generator-python
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Naming conflict when importing ga_operation #819
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Description
I'm having trouble generating the client for appengine v1 and I found the issue is that there is a naming conflict with ga_operation
In client.py, ga_operation has a naming conflict.
from google.api_core import operation as ga_operation
conflicts with
from google.cloud.appengine_admin_v1.types import operation as ga_operation
__________________________________ ERROR collecting tests/unit/gapic/appengine_admin_v1/test_applications.py __________________________________
tests/unit/gapic/appengine_admin_v1/test_applications.py:38: in <module>
from google.cloud.appengine_admin_v1.services.applications import (
google/cloud/appengine_admin_v1/__init__.py:18: in <module>
from .services.applications import ApplicationsClient
google/cloud/appengine_admin_v1/services/applications/__init__.py:18: in <module>
from .client import ApplicationsClient
google/cloud/appengine_admin_v1/services/applications/client.py:78: in <module>
class ApplicationsClient(metaclass=ApplicationsClientMeta):
google/cloud/appengine_admin_v1/services/applications/client.py:392: in ApplicationsClient
) -> ga_operation.Operation:
E AttributeError: module 'google.cloud.appengine_admin_v1.types.operation' has no attribute 'Operation'
Activity
added
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p3Desirable enhancement or fix. May not be included in next release. and removed
on Mar 23, 2021software-dov commented on Mar 23, 2021
Root cause turns out to be that raw imports in e.g. test template are not being added to name disambiguation. Fix is to add "auth" et al to RESERVED_NAMES.
added a commit that references this issue
on Mar 23, 2021This issue will close once commit f5e9f36 is merged into the 'main' branch.f5e9f36
Metadata
Metadata
priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Development
No branches or pull requestsIssue actions