Skip to content

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Feb 19, 2016

Providing the methods for interface compatibility.

@dhermes dhermes added the api: bigtable Issues related to the Bigtable API. label Feb 19, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 19, 2016
@tseaver
Copy link
Contributor

tseaver commented Feb 19, 2016

Given the choice to have these stubs, LGTM.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 19, 2016

I'm not sure I understand. If the goal is swapping from happybase import foo for from gcloud.bigtable.happybase import foo, is there a better solution? (Honestly it's like pick your error, NotImplementedError or AttributeError or ...)

@tseaver
Copy link
Contributor

tseaver commented Feb 19, 2016

I just meant that being able to import foo but not use it doesn't seem like much of a win: the user is going to need to change code (beyond the imports) either way.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 19, 2016

Yeah I agree. @jgeewax How do you think we should handle the methods in this PR?

@jgeewax
Copy link
Contributor

jgeewax commented Feb 19, 2016

(Commenting from mobile, so forgive if this is answered elsewhere.)

How much other code needs to change ? Any short example before and after snippets ?

@jgeewax
Copy link
Contributor

jgeewax commented Feb 19, 2016

For context, if the method is just missing, people may go off the assumption that this just want implemented yet. Having this exception raised makes it clear that it wasn't as didn't do the work, it's that the concept doesn't make sense for Bigtable.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 19, 2016

For this particular PR it is essentially the choice between class A (@tseaver suggestion) or class B (current implementation of this PR):

>>> class A(object):
...     pass
... 
>>> a = A()
>>> a.foo(1, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'A' object has no attribute 'foo'
>>> class B(object):
...     def foo(self, x, y):
...         raise NotImplementedError('We cannot do', x, 'or', y)
... 
>>> b = B()
>>> b.foo(1, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in foo
NotImplementedError: ('We cannot do', 1, 'or', 2)

@dhermes
Copy link
Contributor Author

dhermes commented Feb 19, 2016

OK going to leave it as-is.

Providing the methods for interface compatibility.
@dhermes dhermes force-pushed the happybase-notimplemented branch from 48e2567 to a9e83d1 Compare February 19, 2016 19:58
dhermes added a commit that referenced this pull request Feb 19, 2016
Implementing HappyBase methods that aren't functional in Bigtable.
@dhermes dhermes merged commit 9f5d9a4 into googleapis:master Feb 19, 2016
@dhermes dhermes deleted the happybase-notimplemented branch February 19, 2016 22:32
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 26, 2025
…entials (#1496)

* feat: refactor AWS and identity pool credentials to use suppliers (#1484)

* feat: refactor aws and identity pool credentials to use supplier framework

* Linting

* changing class types

* linting

* remove unused import

* Fix typing

* add docstring and fix casing

* feat: Adds support for custom suppliers in AWS and Identity Pool credential instantiation (#1494)

* feat: refactor aws and identity pool credentials to use supplier framework

* Linting

* changing class types

* linting

* remove unused import

* Fix typing

* add docstring and fix casing

* feat: adds support for passing suppliers to credentials.

* fixes merge issues and adds _has_custom_supplier method

* adds _has_custom_supplier function to identity_pool

* Update google/auth/external_account.py

Co-authored-by: Carl Lundin <[email protected]>

* Apply suggestions from code review

Co-authored-by: Carl Lundin <[email protected]>

* Respond to comments and fix docs

---------

Co-authored-by: Carl Lundin <[email protected]>

* docs: add documentation for suppliers (#1495)

* docs: update docs for programmatic

* add space

* update user guide

* update docs

* Apply suggestions from code review

Co-authored-by: Leo <[email protected]>

* Update docs

* Add docs about context and request

---------

Co-authored-by: Carl Lundin <[email protected]>
Co-authored-by: Leo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants