Skip to content

Maybe it's helpful to warn about try / except around open_nursery? #354

Open
@A5rocks

Description

@A5rocks

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 trio.run is never going to happen. (except maybe cancellation? I haven't thought through that part)

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions