You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…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.
Because
with_scopes
raisesNotImplementedError
, the class cannot be used polymorphically where instances ofScoped
are expected (see googleapis/google-cloud-python#3933). For instance, in C++,google.auth.compute_engine.credentials.Credentials
wouldn't even be instantiable, becausewith_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
, andhas_scopes
methods), that should be factored into another class (maybedReadonlyScoped
?), with the currentScoped
class extending it.The text was updated successfully, but these errors were encountered: