Open agronholm opened 4 years ago
Have you tried commenting out the set_wakeup_fd code and seeing how far the test suite gets then? If there's just this one issue then that's pretty simple to work around or pressure to get fixed upstream; if this is just one of a dozen different problems then it's a bit different.
On Thu, Jan 9, 2020, 12:25 Alex Grönholm notifications@github.com wrote:
Apparently on pypy3+Windows, most trio functions raise NotImplementedError: signal.set_wakeup_fd is not implemented on Windows. Either somebody has to add that to pypy, or trio has to work around the limitation.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/python-trio/trio/issues/1361?email_source=notifications&email_token=AAEU42G2O6GOBCKVT4QMDD3Q46BZ5A5CNFSM4KE56WL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IFFITMQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEU42GVXZECNDNV4MEX2S3Q46BZ5ANCNFSM4KE56WLQ .
I have not. From what you said, it seemed like a crucial part of Trio's event loop. But, I will comment it out and see what happens.
On Windows, set_wakeup_fd
is necessary for control-C handling to work right, which is a pretty serious bug. But, it shouldn't affect anything else, so it should still be possible to check if everything else is working.
AnyIO's test suite passes completely on this combination when I replace the contents of wakeup_on_signals()
with a single yield
.
So the quick and dirty "fix" would be to check for the existence of the signal.wakeup_on_fd
function and skip its use if it doesn't exist.
Now that I've done practical tests on Windows, I've found that on PyPy, ctrl+c and ctrl+break work even without set_wakeup_fd()
so it can be safely skipped.
For what it's worth, I ran into this too (though the suggested fix of replacing wakeup_on_signals
with yield
worked).
For anyone in the future, it seems (from my following of links) that this has been resolved in pypy, so upgrading your version past 7.3.1 (if it's been released yet) should fix this. Note that I haven't tested this is actually true...
Apparently on pypy3+Windows, most trio functions raise
NotImplementedError: signal.set_wakeup_fd is not implemented on Windows
. Either somebody has to add that to pypy, or trio has to work around the limitation.