Uh oh!
There was an error while loading. Please reload this page.
Adding scope to credentials in Connection constructors. - #840
Conversation
coveralls
commented
Apr 19, 2015
tseaver
commented
Apr 23, 2015
I might be misremembering, but it feels like we've been around a complete circle here. |
dhermes
commented
Apr 23, 2015
What's the circle? I don't recall the |
tseaver
commented
Apr 23, 2015
6ebc65e moved the scope handling from |
dhermes
commented
Apr 23, 2015
The idea behind this commit is not just churn / moving the code. We want people to be able to get credentials from elsewhere and pass them in to a connection without worrying about adding the scopes. If we never expect people to construct a This was all brought about by @jgeewax pointing out some alternate auth / credentials flows. |
dhermes
commented
Apr 27, 2015
@tseaver Can we keep moving on this? |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jgeewax
commented
Apr 29, 2015
If I recall correctly, the difference this makes becomes apparent when you look at the case where you want to use some credentials from a specific file to talk to a service. Old way: fromgcloud.credentialsimportget_for_service_account_jsonfromgcloudimportpubsubcredentials=get_for_service_account_json('/path/to/key.json')
credentials=credentials.create_scoped(pubsub.SCOPE) # <-- The thing I don't want to have to type...connection=pubsub.Connection(credentials=credentials)
pubsub.set_default_connection(connection)
pubsub.Topic('topic_name').create()(Also note that in New way fromgcloud.credentialsimportget_for_service_account_jsonfromgcloudimportpubsubcredentials=get_for_service_account_json('/path/to/key.json')
connection=pubsub.Connection(credentials=credentials) # Scoping happens here, where we know we need it...pubsub.set_default_connection(connection)
pubsub.Topic('topic_name').create()Is there a reason why you'd want to keep the "scope credentials" action separate from the "create connection" action? I can't think of a reason but maybe you guys know more about this... If there isn't then I fully support this change -- seems much more convenient to do this when creating the connection (and expecting the connection to know which scopes are necessary on the credentials you supplied). |
dhermes
commented
Apr 29, 2015
I also fully support this change FWIW |
dhermes
commented
Apr 30, 2015
@tseaver PTAL |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dhermes
commented
May 7, 2015
Just rebased on top of @tseaver Can we resolve the discussion and move forward here? |
coveralls
commented
May 8, 2015
dhermes
commented
May 12, 2015
@tseaver Can we wrap this up? |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
May 14, 2015
LGTM, module my comments this morning on the |
This also obsoletes get_scoped_connection() so it is removed.
dhermes
commented
May 14, 2015
Adding scope to credentials in Connection constructors.
Source-Link: googleapis/synthtool@5f2a608 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: create flakybot.yaml to change default issue priority * add googlel copyright license --------- Co-authored-by: cindy-peng <cindypeng@google.com>
Source-Link: googleapis/synthtool@fac8444 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5ea6d0ab82c956b50962f91d94e206d3921537ae5fe1549ec5326381d8905cfa Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@fac8444 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5ea6d0ab82c956b50962f91d94e206d3921537ae5fe1549ec5326381d8905cfa Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: release 2.0.0 * Update CHANGELOG.md * chore: set version number to 2.0.0 Follow up to #829 Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* test: refactor `list_rows` tests and add test for scalars * WIP: INTERVAL support * feat: add support for INTERVAL data type to `list_rows` * fix relativedelta construction for non-microseconds * WIP: support INTERVAL query params * remove dead code * INTERVAL not supported in query parameters * revert query parameter changes * add validation error for interval * add unit tests for extreme intervals * add dateutil to intersphinx * use dictionary for intersphinx * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add test case for trailing . * explicit none * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * truncate nanoseconds * use \d group for digits * use \d for consistency Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Peter Lamut <plamut@users.noreply.github.com>
Source-Link: googleapis/synthtool@d52e638 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4f9b3b106ad0beafc2c8a415e3f62c1a0cc23cabea115dbe841b848f581cfe99 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | cachetools | `==6.2.6` → `==7.0.2` |  |  | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/python-spanner-sqlalchemy). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My40OC4xIiwidXBkYXRlZEluVmVyIjoiNDMuNDguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
This adds a flag `preserve_generation` to the method `bucket.delete_blobs()` - allows preserving and propagating blob generations when set to True (default False) - better ensures backwards compatibility with both `delete_blobs()` and `bucket.delete(force=True)` Fixes#814
* feat: Inline Begin transction for RW transactions * ILB with lock for execute update and batch update * Added lock for execute sql and read method * fix: lint fix and testcases * fix: lint * fix: Set transction id along with resume token * fix: lint * fix: test cases * fix: few more test case for restart on unavailable * test: Batch update error test case * fix: lint * fix: Code review comments * fix: test cases + lint * fix: code review comments * fix: deprecate transactionpingingpool msg * fix: review comments Co-authored-by: larkee <31196561+larkee@users.noreply.github.com> * fix: Apply suggestions from code review Co-authored-by: larkee <31196561+larkee@users.noreply.github.com> * fix: review comments * fix: review comment Update tests/unit/test_session.py Co-authored-by: larkee <31196561+larkee@users.noreply.github.com> Co-authored-by: larkee <31196561+larkee@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [3.26.0](https://togithub.com/googleapis/python-spanner/compare/v3.25.0...v3.26.0) (2022-12-15) ### Features * Inline Begin transction for RW transactions ([#840](https://togithub.com/googleapis/python-spanner/issues/840)) ([c2456be](https://togithub.com/googleapis/python-spanner/commit/c2456bed513dc4ab8954e5227605fca12e776b63)) ### Bug Fixes * Fix for binding of pinging and bursty pool with database role ([#871](https://togithub.com/googleapis/python-spanner/issues/871)) ([89da17e](https://togithub.com/googleapis/python-spanner/commit/89da17efccdf4f686f73f87f997128a96c614839)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This also obsoletes get_scoped_connection() so it is removed.
FYI @jgeewax thanks for nudging in this direction. It moves the scope adding behavior into the
Connectionconstructors.