diff options
author | Jeff Quast <contact@jeffquast.com> | 2015-09-14 17:24:47 -0700 |
---|---|---|
committer | Jeff Quast <contact@jeffquast.com> | 2015-09-14 17:24:47 -0700 |
commit | 99911aebadd2ca6e9f128f346843dc2127cf26bc (patch) | |
tree | 59095f66b7f1f567faa5b9b7afd4217e11938596 | |
parent | eee85ecfeda167dd07e3abeaffcf8c51a6b0d5a8 (diff) | |
parent | 74274698a9b87aeb10b8f0ec6b1322a0787c3b8f (diff) | |
download | pexpect-git-99911aebadd2ca6e9f128f346843dc2127cf26bc.tar.gz |
Merge pull request #240 from takluyver/deprecate-emulator
Deprecate terminal emulator code
-rw-r--r-- | doc/api/ANSI.rst | 14 | ||||
-rw-r--r-- | doc/api/index.rst | 9 | ||||
-rw-r--r-- | doc/api/screen.rst | 10 | ||||
-rw-r--r-- | doc/history.rst | 5 | ||||
-rw-r--r-- | pexpect/screen.py | 7 |
5 files changed, 19 insertions, 26 deletions
diff --git a/doc/api/ANSI.rst b/doc/api/ANSI.rst deleted file mode 100644 index 064563d..0000000 --- a/doc/api/ANSI.rst +++ /dev/null @@ -1,14 +0,0 @@ -ANSI - ANSI (VT100) terminal emulator -===================================== - -.. automodule:: pexpect.ANSI - -.. autoclass:: term - :show-inheritance: - -.. autoclass:: ANSI - :show-inheritance: - - .. automethod:: write_ch - .. automethod:: write - .. automethod:: process
\ No newline at end of file diff --git a/doc/api/index.rst b/doc/api/index.rst index 1a6a6ae..fd017a5 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -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. diff --git a/doc/api/screen.rst b/doc/api/screen.rst deleted file mode 100644 index 8268fb9..0000000 --- a/doc/api/screen.rst +++ /dev/null @@ -1,10 +0,0 @@ -screen - manage a virtual 'screen' -================================== - -.. automodule:: pexpect.screen - -.. autoclass:: screen - :members: - - .. automethod:: __init__ - .. automethod:: __str__
\ No newline at end of file diff --git a/doc/history.rst b/doc/history.rst index 7844270..8186b47 100644 --- a/doc/history.rst +++ b/doc/history.rst @@ -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 ``````````` diff --git a/pexpect/screen.py b/pexpect/screen.py index efe9ee5..0bced89 100644 --- a/pexpect/screen.py +++ b/pexpect/screen.py @@ -27,6 +27,13 @@ import codecs 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. |