#825: Allow passing explicit connection to dataset API methods.#858
#825: Allow passing explicit connection to dataset API methods.#858tseaver wants to merge 3 commits intogoogleapis:masterfrom tseaver:825-datastore-dataset_explicit_connection
Conversation
gcloud/datastore/dataset.py
Outdated
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
I agree with the spirit of #825 but I think the |
|
ISTM that it would be better to just delete the |
|
If we go the "clients everywhere" route, then |
|
I'm actually opposed to the "client" notion at this point: I think the "use a connection as a context manager" bit would work better. We don't need to weld the project ID together with the connection, since it is only passed in a few cases. |
|
I think @jgeewax was actually in agreement with that notion at the end of the last call, too. |
|
I'm a fan of the Client pattern that Danny is tossing around -- take a look at #861? Maybe we can discuss it there? |
|
It would be nice to avoid churn if we could. I think making connections constructable with one-liner factories that also pull in credentials will make things easier (in addition to making them have long-lived contexts). If we need clients, we can go that route, but if we don't we can move forward instead of chasing our tail. |
|
@tseaver How does it help? What is better? It certainly doesn't capture the idea of a pre-loaded object. And after the change |
|
The goal of the Except for |
|
This really just brings up the question: do all config defaults matter as a bundle or just |
Proxied functions/methods already handle that directly.
|
ISTM we can't move on this until #861 settles out. |
|
Indeed |
* chore(deps): update all dependencies * Update unittest.yml --------- Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com>
* chore(deps): update all dependencies * Update unittest.yml --------- Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* Use error log over `print` to avoid stdout write * Move common return to end of function * Update google/api_core/_python_version_support.py Co-authored-by: Chalmer Lowe <chalmerlowe@google.com> * Fix lint error --------- Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
* Allow up to 60 seconds of skew * Add actionable/helpful error message text. * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com>
See #825.