slackapi / slackapi/bolt-python

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

Open
#771 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area:async discussion enhancement
Dominant language
Python
Stars
1.3k
Forks
288
Avg merge
1d 8h
Merged PRs (30d)
10

Description

👋 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the async AsyncClient and the surrounding asyncio-based stack, then read the linked anyio and Trio documentation to understand the backend boundary. Done means users can choose either asyncio or Trio without maintaining separate stacks, while existing asyncio-using code remains compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.