Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCE Credentials should not derive from Scoped #194

Closed
tseaver opened this issue Sep 11, 2017 · 0 comments
Closed

GCE Credentials should not derive from Scoped #194

tseaver opened this issue Sep 11, 2017 · 0 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@tseaver
Copy link
Contributor

tseaver commented Sep 11, 2017

Because with_scopes raises NotImplementedError, the class cannot be used polymorphically where instances of Scoped are expected (see googleapis/google-cloud-python#3933). For instance, in C++,google.auth.compute_engine.credentials.Credentials wouldn't even be instantiable, because with_scopes is a pure virtual method cognate.

If there is a need for part of the interface to be expressed (e.g., the scopes, requires_scopes, and has_scopes methods), that should be factored into another class (maybed ReadonlyScoped?), with the current Scoped class extending it.

theacodes pushed a commit that referenced this issue Sep 11, 2017
…d'. (#195)

Not all subclasses of 'Scoped' can sanely implement 'with_scopes' (e.g, on
GCE the scopes are hard-wired in when creating the GCE node).

Make 'Scoped' derive from 'ReadOnlyScoped', adding the 'with_scopes' method.

Make GCE's 'credentials' class derive from 'ReadOnlyScoped'.

Closes #194.
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants