python-trio / python-trio/flake8-async
Maybe it's helpful to warn about `try` / `except` around `open_nursery`?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 26
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure this is a common mistake, but now that strict exception groups are a thing try/except around either trio.open_nursery or is never going to happen. (except maybe cancellation? I haven't thought through that part)trio.run
Stuff like:
async def main():
try:
async with trio.open_nursery() as nursery:
...
except KeyboardInterrupt:
print("...")
raise
(maybe worth prototyping and seeing if it catches anything?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by prototyping the shown try/except KeyboardInterrupt pattern around trio.open_nursery and checking how strict exception groups behave. Resolve the open question about cancellation and whether this is a common mistake; done means the warning scope and prototype outcome are decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100