In [3], isn't there a pretty trivial exploit to get a "background task reads from closed file" again?
async with mk_nursery() as nursery: with os.fopen(...) as file: nursery.start_soon(lambda: file.read())