googleapis / googleapis/google-cloud-python

(for v3) consider using anyio for the async client implementation

Aperta
#15,286 1 commento 0 reazioni 1 assegnatario Rivendicata da @rameshdharan Vedi su GitHub
api: bigtable
Lingua principale
Python
Stelle
5.4k
Fork
1.8k
Merge medio
3g 4h
PR unite (30g)
122

Descrizione

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**

Today, I can't use BigTable's Async client in my [Trio](https://github.com/python-trio/trio) application because the client assumes that the async runtime is asyncio.

**Describe the solution you'd like**

By using [Anyio](https://github.com/agronholm/anyio), the client implementation would support both the Trio and asyncio runtimes, allowing Trio users to use the client libraries without having to resort to using the sync library, and wrapping it in a lot of `trio.to_thread.run_sync` calls.

**Describe alternatives you've considered**

The client library could also support a trio-native implementation. However, this feels pretty burdensome for maintenance.

I believe this should be a ~straightforward change since the library seems to alias a lot of the asyncio methods. Swapping those out for anyio equivalents should do the right thing.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.