A5rocks
A5rocks
Could we spawn the REPL as another process and send it a signal? (simulate ctrl+c) I think we could first send it some data over stdin to get into specific...
> The newline is sent to the terminal I think, rather than any specific process. I was talking about just sending `SIGTERM` to a process running the REPL as a...
I would be happy to push this to the finish line. Here's a couple things I noticed: 1. the extra newline after pressing ctrl+c after a prompt irritates me more...
> What happened to your `tmux` idea? Unfortunately that doesn't seem to help -- I've tried both `shell=True` (which implies `sh -c "..."`) and explicitly using `tmux -c "..."`, but...
Ok it seems this relies on having a PTY, which is something we can provide it. Maybe one day CPython will export pyrepl so we can do what asyncio does...
Turns out the reason my test code above wasn't working is somewhat trivial: `terminal_newline` is suppressing OSError! So far I get: - using `subprocess.PIPE` for stdin, etc gives OSError 25...
It's actually impossible to test this in CI... because it doesn't work in CI! Linux 6.2 introduced a `sysctl` to make the `TIOCSTI` ioctl require superuser (`CAP_SYS_ADMIN`), and guess what...
Only if the distro disables the ioctl, so maybe not all? But yeah we will need to brainstorm another solution...
I want to do this but still haven't: - make the test skip only if the relevant sysctl is enabled - add a bunch of codecov skips.... Sorry about the...
> One option is to actually do the blocking I/O on the main thread. I think we discussed it a bit and this fails because someone may run this in...