Results 976 comments of Thomas Grainger

I don't think this is a good first issue. There's lots of fiddling around with linters involved

> This seems like just reimplementing `outcome`. If you need to copy, why not instantiate `outcome.Value`/`Error` directly? Only detail that's different is `unwrap` doesn't clear values, but we could just...

@TeamSpen210 https://github.com/python-trio/outcome/pull/45

could just call it InvalidatingOutcome, InvalidatingError and InvalidatingValue

> Would using a weak reference not be acceptable? I think that would be more complicated and it would be odd that unwrapped values are sometimes there sometimes not and...

so it turns out this PR does fix my original issue, but my test case is hitting https://github.com/pytest-dev/pytest/issues/7947

> IIUC, this is basically a hack to coerce `TemporaryDirectory.cleanup()` to do the dirty work for us, right? I like it :) Although I think a comment is in order...

this breaks on windows and I don't know why

Ah this can be fixed by replacing any calls to `asyncio.run(corofn())` with `asyncio.run(corofn(), loop_factory=asyncio.EventLoop)` You can backport the loop_factory kwarg from asyncio like in this PR or use anyio.run which...

the problem is here: https://github.com/prompt-toolkit/python-prompt-toolkit/blob/cd7c6a2bce4ec50fe4355f0575c066175fa93674/src/prompt_toolkit/application/application.py#L1002-L1003