#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>
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v1.0.1 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 <details><summary>google-api-core: 2.29.0</summary> ## [2.29.0](googleapis/python-api-core@v2.28.1...v2.29.0) (2026-01-08) ### Features * make parse_version_to_tuple public (#864) ([c969186f](googleapis/python-api-core@c969186f)) * Auto enable mTLS when supported certificates are detected (#869) ([f8bf6f96](googleapis/python-api-core@f8bf6f96)) ### Bug Fixes * remove call to importlib.metadata.packages_distributions() for py38/py39 (#859) ([628003e2](googleapis/python-api-core@628003e2)) * Log version check errors (#858) ([6493118c](googleapis/python-api-core@6493118c)) * flaky tests due to imprecision in floating point calculation and performance test setup (#865) ([93404080](googleapis/python-api-core@93404080)) * closes tailing streams in bidi classes. (#851) ([c97b3a00](googleapis/python-api-core@c97b3a00)) </details>
See #825.