Description
I'm trying to make prompt-toolkit (which has asyncio support) work with trio through this library. I don't actually know what I'm doing. :)
I had a persistent issue due to an assertion in trio-asyncio
assert sig not in self._signal_handlers, \ "Signal %d is already being caught" % (sig,)
My hypothesis is that prompt-toolkit in async mode assumes it can call this multiple times, but that trio-asyncio assumes you can't. Which one is right I cannot judge. If it's prompt-toolkit, I can try to communicate that to them.
I have an evil workaround where I write this in my application:
del signal.SIGWINCH
Because I noticed it was going wrong when prompt-toolkit detected SIGWINCH exists. But of course that's not a proper solution (and I just now lack resize support).