Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate terminal emulator code #240

Merged
merged 2 commits into from
Sep 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions doc/api/ANSI.rst

This file was deleted.

9 changes: 7 additions & 2 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ API documentation
fdpexpect
replwrap
pxssh
screen
ANSI

The modules ``pexpect.screen`` and ``pexpect.ANSI`` have been deprecated in
Pexpect version 4. They were separate from the main use cases for Pexpect, and
there are better maintained Python terminal emulator packages, such as
`pyte <https://pypi.python.org/pypi/pyte>`__.
These modules are still present for now, but we don't advise using them in new
code.
10 changes: 0 additions & 10 deletions doc/api/screen.rst

This file was deleted.

5 changes: 5 additions & 0 deletions doc/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Version 4.0
* It is now possible to call :meth:`~.wait` multiple times, or after a process
is already determined to be terminated without raising an exception
(:ghpull:`211`).
* Deprecated ``pexpect.screen`` and ``pexpect.ANSI``. Please use other packages
such as `pyte <https://pypi.python.org/pypi/pyte>`__ to emulate a terminal.
* Removed the independent top-level modules (``pxssh fdpexpect FSM screen ANSI``)
which were installed alongside Pexpect. These were moved into the Pexpect
package in 3.0, but the old names were left as aliases.

Version 3.4
```````````
Expand Down
7 changes: 7 additions & 0 deletions pexpect/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
import copy
import sys

import warnings

warnings.warn(("pexpect.screen and pexpect.ANSI are deprecated. "
"We recommend using pyte to emulate a terminal screen: "
"https://pypi.python.org/pypi/pyte"),
stacklevel=2)

NUL = 0 # Fill character; ignored on input.
ENQ = 5 # Transmit answerback message.
BEL = 7 # Ring the bell.
Expand Down