Skip to content

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Mar 30, 2015

Allows fallback in this order:

  • explicit connection
  • current batch
  • default connection
  • raise exception

Also adding Batch.current() to determine the top batch in context.

Also making storage.Batch publicly visible (reduces number of imports).

This was peeled off from #759

Allows fallback in this order:
- explicit connection
- current batch
- default connection
- raise exception

Also adding Batch.top() to determine the current batch in
context.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 30, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f429945 on dhermes:storage-add-require-connection into e60acb8 on GoogleCloudPlatform:master.

@tseaver
Copy link
Contributor

tseaver commented Mar 30, 2015

LGTM

dhermes added a commit that referenced this pull request Mar 30, 2015
Adding storage.api._require_connection to allow fallback behavior.
@dhermes dhermes merged commit 37fb0ec into googleapis:master Mar 30, 2015
@dhermes dhermes deleted the storage-add-require-connection branch March 30, 2015 21:58
parthea pushed a commit that referenced this pull request Oct 21, 2023
…-samples#779)

* Draft of first half of KMS samples

* reversed wrong change

* KMS Apiary Python samples - P1

* Few minor style issues

* Adding back in space i accidentally deleted

* Addressed all code review comments

* Renamed api directory to api-client

* Addressed more code review comments

* Formatting change

* Fix quickstart test

Change-Id: Ib79dc1345c9c40547f3fd4e9c3c9a48963a3b399

* Update readme

Change-Id: Icf4a66083f56d6f51be76ba1cf3b5dc8daf2c4c1

* Add readme

Change-Id: I2fbaa55092ef8787f1423d499aa310cab258c0c1

* Added parsers

* Final minor changes to parsers

* Added autogenerated README

* Changed snippets_test keyring name and cryptokey name
parthea added a commit that referenced this pull request Aug 21, 2025
)

* feat: Add BigQuery Metastore Partition Service API version v1alpha

PiperOrigin-RevId: 662212485

Source-Link: googleapis/googleapis@456a812

Source-Link: googleapis/googleapis-gen@2ec266e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmVjMjY2ZTZkYTAzMjA4YTc2YjBmZDYwMDFiYTdkZjkzZGFlNDRlNiJ9

chore: Update gapic-generator-python to v1.18.5

PiperOrigin-RevId: 661268868

Source-Link: googleapis/googleapis@f7d214c

Source-Link: googleapis/googleapis-gen@79a8411
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzlhODQxMWJiZGIyNWE5ODNmYTNhYWU4YzBlMTQzMjdkZjEyOWY5NCJ9

chore: Update gapic-generator-python to v1.18.4

PiperOrigin-RevId: 657207628

Source-Link: googleapis/googleapis@33fe71e

Source-Link: googleapis/googleapis-gen@e02739d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTAyNzM5ZDEyMmVkMTViZDVlZjU3NzFjNTdmMTJhODNkNDdhMWRkYSJ9

chore: Update gapic-generator-python to v1.18.3

PiperOrigin-RevId: 656040068

Source-Link: googleapis/googleapis@3f4e29a

Source-Link: googleapis/googleapis-gen@b8feb21
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjhmZWIyMTA5ZGRlN2IwOTM4YzIyYzk5M2QwMDIyNTFhYzY3MTRkYyJ9

chore: Update gapic-generator-python to v1.18.3

PiperOrigin-RevId: 655567917

Source-Link: googleapis/googleapis@43aa65e

Source-Link: googleapis/googleapis-gen@0e38378
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGUzODM3ODc1MzA3NGMwZjY2ZmY2MzM0OGQ2ODY0OTI5ZTEwNGQ1YyJ9

feat(spanner): Add support for Cloud Spanner Scheduled Backups

PiperOrigin-RevId: 649277844

Source-Link: googleapis/googleapis@fd7efa2

Source-Link: googleapis/googleapis-gen@50be251
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9

chore: Update gapic-generator-python to v1.18.2

PiperOrigin-RevId: 649219344

Source-Link: googleapis/googleapis@7fe35b0

Source-Link: googleapis/googleapis-gen@7a6ae64
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2E2YWU2NDQxZDFjYjA2MTBjZjhlOTgzMmI5MzgzYTRmZDUyNDIzZiJ9

chore: Update gapic-generator-python to v1.18.0

PiperOrigin-RevId: 638650618

Source-Link: googleapis/googleapis@6330f03

Source-Link: googleapis/googleapis-gen@44fa4f1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDRmYTRmMTk3OWRjNDVjMTc3OGZkN2NhZjEzZjhlNjFjNmQxY2FlOCJ9

chore: Update gapic-generator-python to v1.17.1

PiperOrigin-RevId: 629071173

Source-Link: googleapis/googleapis@4afa392

Source-Link: googleapis/googleapis-gen@16dbbb4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZkYmJiNGQwNDU3ZGI1ZTYxYWM5Zjk5YjBkNTJhNDYxNTQ0NTVhYyJ9

* update replacements in owlbot.py

* remove v1alpha

* update owlbot config

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix failing unit test by mocking the correct class's method

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
Co-authored-by: Lingqing Gan <[email protected]>
parthea added a commit that referenced this pull request Sep 16, 2025
)

* feat: Add BigQuery Metastore Partition Service API version v1alpha

PiperOrigin-RevId: 662212485

Source-Link: googleapis/googleapis@456a812

Source-Link: googleapis/googleapis-gen@2ec266e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmVjMjY2ZTZkYTAzMjA4YTc2YjBmZDYwMDFiYTdkZjkzZGFlNDRlNiJ9

chore: Update gapic-generator-python to v1.18.5

PiperOrigin-RevId: 661268868

Source-Link: googleapis/googleapis@f7d214c

Source-Link: googleapis/googleapis-gen@79a8411
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzlhODQxMWJiZGIyNWE5ODNmYTNhYWU4YzBlMTQzMjdkZjEyOWY5NCJ9

chore: Update gapic-generator-python to v1.18.4

PiperOrigin-RevId: 657207628

Source-Link: googleapis/googleapis@33fe71e

Source-Link: googleapis/googleapis-gen@e02739d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTAyNzM5ZDEyMmVkMTViZDVlZjU3NzFjNTdmMTJhODNkNDdhMWRkYSJ9

chore: Update gapic-generator-python to v1.18.3

PiperOrigin-RevId: 656040068

Source-Link: googleapis/googleapis@3f4e29a

Source-Link: googleapis/googleapis-gen@b8feb21
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjhmZWIyMTA5ZGRlN2IwOTM4YzIyYzk5M2QwMDIyNTFhYzY3MTRkYyJ9

chore: Update gapic-generator-python to v1.18.3

PiperOrigin-RevId: 655567917

Source-Link: googleapis/googleapis@43aa65e

Source-Link: googleapis/googleapis-gen@0e38378
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGUzODM3ODc1MzA3NGMwZjY2ZmY2MzM0OGQ2ODY0OTI5ZTEwNGQ1YyJ9

feat(spanner): Add support for Cloud Spanner Scheduled Backups

PiperOrigin-RevId: 649277844

Source-Link: googleapis/googleapis@fd7efa2

Source-Link: googleapis/googleapis-gen@50be251
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9

chore: Update gapic-generator-python to v1.18.2

PiperOrigin-RevId: 649219344

Source-Link: googleapis/googleapis@7fe35b0

Source-Link: googleapis/googleapis-gen@7a6ae64
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2E2YWU2NDQxZDFjYjA2MTBjZjhlOTgzMmI5MzgzYTRmZDUyNDIzZiJ9

chore: Update gapic-generator-python to v1.18.0

PiperOrigin-RevId: 638650618

Source-Link: googleapis/googleapis@6330f03

Source-Link: googleapis/googleapis-gen@44fa4f1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDRmYTRmMTk3OWRjNDVjMTc3OGZkN2NhZjEzZjhlNjFjNmQxY2FlOCJ9

chore: Update gapic-generator-python to v1.17.1

PiperOrigin-RevId: 629071173

Source-Link: googleapis/googleapis@4afa392

Source-Link: googleapis/googleapis-gen@16dbbb4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZkYmJiNGQwNDU3ZGI1ZTYxYWM5Zjk5YjBkNTJhNDYxNTQ0NTVhYyJ9

* update replacements in owlbot.py

* remove v1alpha

* update owlbot config

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix failing unit test by mocking the correct class's method

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
Co-authored-by: Lingqing Gan <[email protected]>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Currently, creating async clients with constructor works fine:

from google.cloud import vision

client = vision.ImageAnnotatorAsyncClient()
print(type(client))
prints: <class 'google.cloud.vision_v1.services.image_annotator.async_client.ImageAnnotatorAsyncClient'>

Using from_service_account_* methods on the other hand return sync client:

client = vision.ImageAnnotatorAsyncClient.from_service_account_file("service_account.json")
print(type(client))
This gives <class 'google.cloud.vision_v1.services.image_annotator.client.ImageAnnotatorClient'>, which is just a normal synchronous client.

This happens because these functions are linked to sync clients' methods. Now it's fixed to call the same method, but with proper class.
parthea pushed a commit that referenced this pull request Nov 24, 2025
* chore: Update gapic-generator-python to v1.11.7

PiperOrigin-RevId: 573230664

Source-Link: googleapis/googleapis@93beed3

Source-Link: googleapis/googleapis-gen@f4a4eda
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRhNGVkYWE4MDU3NjM5ZmNmNmFkZjkxNzk4NzIyODBkMWE4ZjY1MSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.11.8

PiperOrigin-RevId: 574178735

Source-Link: googleapis/googleapis@7307199

Source-Link: googleapis/googleapis-gen@ce3af21
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2UzYWYyMWI3YzU1OWE4N2MyYmVmYzA3NmJlMGUzYWVkYTNhMjZmMCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.11.9

PiperOrigin-RevId: 574520922

Source-Link: googleapis/googleapis@5183984

Source-Link: googleapis/googleapis-gen@a59af19
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTU5YWYxOWQ0YWM2NTA5ZmFlZGYxY2MzOTAyOTE0MWI2YTViODk2OCJ9

* 🦉 Updates from OwlBot post-processor

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: Daniel Sanche <[email protected]>
parthea pushed a commit that referenced this pull request Nov 26, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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