Use `anyio` for async code, so that users can choose either `asyncio` or `trio` backends

Offen
#771 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
backend

Rechercherichtung

Beginne mit der Überprüfung des asynchronen AsyncClient und des umgebenden asyncio-basierten Stacks. Lies anschließend die verlinkte Dokumentation zu anyio und Trio, um die Backend-Grenze zu verstehen. Das Ziel ist erreicht, wenn Benutzer entweder asyncio oder Trio verwenden können, ohne separate Stacks zu pflegen, während bestehender Code, der asyncio verwendet, kompatibel bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:async discussion enhancement

👋 Over at @anthropics we're enthusiastic users of both Slack and async Python - but instead of asyncio we use structured concurrency with Trio.

This makes using slack-bolt's AyncClient pretty awkward, because now we have multiple async backends running, can't use our standard helper functions, and things generally start going wrong. Building a copy of the whole stack for each backend isn't feasible (thus also sans-io designs), and hence this request to support using either asyncio or trio as the backend.

Using anyio makes this pretty easy - just ask e.g. FastAPI! - and it should be fully compatible with existing asyncio-using code. I realize it's not a particularly small task, but Trio is downloaded about 200k times per day and good support for that makes a big difference.

Vorherrschende Sprache
Python
Sterne
1.3k
Forks
288
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
10

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus slackapi/bolt-python

Alle Issues in slackapi/bolt-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.