SIGN IN SIGN UP

Turn create_pipe_input into a context manager (breaking change).

This makes context managers of the following:
- `create_pipe_input()`
- `PosixPipeInput`
- `Win32PipeInput`

The reason for this change is that the close method of the pipe should only
close the write-end, and as a consequence of that, the read-end should trigger
an `EOFError`. Before this change, the read-end was also closed, and that
caused the key input to never wake up and "read" the end-of-file. However, we
still want to close the read end at some point, and that's why this is a
context manager now.

As part of this change, exceptions that are raised in the TelnetServer interact
method, won't cause cause the whole server to crash.

See also: https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1585

Co-Author: Frank Wu <kwyd@163.com>
J
Jonathan Slenders committed
97ac51413f8d412599233fc3da44d4c7fc456f8c
Parent: 045e2b2