Closed KoopaKing closed 1 year ago
Ah, seems like my assertion about the output size doesn't work on windows. Probably windows doesn't have echo
, idk, I'm not a windower. I'll update this PR in a bit to fix this.
I'd say skip that test on Windows.
Yeah, I'm doing that real quick, also doing a quick change to the API to move the blocking_io_executor
parameter to the TermManager. It seems like TermManager already exposes a shutdown method for controlling lifecycles, so it would be nice to have the lifecycle of autocreated executors managed there. Should have this updated in a few minutes...
Ok, for real though this is my last time trying to make the linter happy...
I was a bit concerned since technically making on_message
a coroutine it is a breaking change. I added a downstream test for jupyter_server_terminals
.
I think we're good, those tests pass. I tried testing spyder-terminal
but it has a complicated setup for testing, and it overrides on_message
anyway.
I'll cut a release with this tomorrow.
A fix for #183
This includes switching to using a dedicated executor for blocking IO, specifically wrapping calls to ptyprocess.write which, can hang when the PTY buffer (the size of which is set by the OS) is exceeded. TermSocket users can provide their own thread pool by using the named
blocking_io_executor
parameter on initialization, but by default a shared, process-wide single threaded executor will be used.This also includes a regression test which will fail on Debian and OSX (but may be able to pass on some OSs due to the variance of the PTY buffer's size).
This also switched the default filetype of terminado/tests/basic_test.py from dos to unix to match with the rest of the files in this package and prevent some editors from auto-inserting carriage returns on save.