[Lldb-commits] [lldb] [lldb][NFC] Remove unused pexpect/ptyprocess (PR #89609)

via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 22 07:36:53 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jordan Rupprecht (rupprecht)

<details>
<summary>Changes</summary>



---

Patch is 224.93 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/89609.diff


35 Files Affected:

- (removed) lldb/third_party/Python/module/pexpect-4.6/.gitignore (-11) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/.travis.yml (-31) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/DEVELOPERS.rst (-12) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/LICENSE (-20) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/MANIFEST.in (-6) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/README.rst (-55) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/ANSI.py (-351) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py (-334) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/__init__.py (-85) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/_async.py (-87) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/bashrc.sh (-16) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/exceptions.py (-35) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/expect.py (-306) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/fdpexpect.py (-148) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/popen_spawn.py (-188) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/pty_spawn.py (-833) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/pxssh.py (-499) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/replwrap.py (-122) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/run.py (-157) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/screen.py (-431) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/spawnbase.py (-522) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/pexpect/utils.py (-187) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/requirements-testing.txt (-5) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/setup.cfg (-5) 
- (removed) lldb/third_party/Python/module/pexpect-4.6/setup.py (-71) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/.gitignore (-7) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/.travis.yml (-9) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/LICENSE (-16) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/README.rst (-15) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/ptyprocess/__init__.py (-4) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/ptyprocess/_fork_pty.py (-78) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/ptyprocess/ptyprocess.py (-836) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/ptyprocess/util.py (-71) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/pyproject.toml (-24) 
- (removed) lldb/third_party/Python/module/ptyprocess-0.6.0/readthedocs.yml (-2) 


``````````diff
diff --git a/lldb/third_party/Python/module/pexpect-4.6/.gitignore b/lldb/third_party/Python/module/pexpect-4.6/.gitignore
deleted file mode 100644
index 22cd4785f715dc..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.pyc
-doc/_build
-tests/log
-build/
-dist/
-MANIFEST
-*~
-.coverage*
-htmlcov
-*.egg-info/
-.cache/
diff --git a/lldb/third_party/Python/module/pexpect-4.6/.travis.yml b/lldb/third_party/Python/module/pexpect-4.6/.travis.yml
deleted file mode 100644
index 40d962295012bc..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: python
-
-python:
-  - 2.7
-  - 3.3
-  - 3.4
-  - 3.5
-  - 3.6
-  - pypy
-  - nightly
-
-matrix:
-  allow_failures:
-    # PyPy on Travis is currently incompatible with Cryptography.
-    - python: pypy
-
-install:
-  - export PYTHONIOENCODING=UTF8
-  - pip install coveralls pytest-cov ptyprocess
-
-script:
-    - ./tools/display-sighandlers.py
-    - ./tools/display-terminalinfo.py
-    - py.test --cov pexpect --cov-config .coveragerc
-
-after_success:
-  - coverage combine
-  - coveralls
-
-# Use new Travis stack, should be faster
-sudo: false
diff --git a/lldb/third_party/Python/module/pexpect-4.6/DEVELOPERS.rst b/lldb/third_party/Python/module/pexpect-4.6/DEVELOPERS.rst
deleted file mode 100644
index bf2bb9f30f8af0..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/DEVELOPERS.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-To run the tests, use `py.test <http://pytest.org/latest/>`_::
-
-    py.test tests
-
-The tests are all located in the tests/ directory. To add a new unit
-test all you have to do is create the file in the tests/ directory with a
-filename in this format::
-
-    test_*.py
-
-New test case classes may wish to inherit from ``PexpectTestCase.PexpectTestCase``
-in the tests directory, which sets up some convenient functionality.
diff --git a/lldb/third_party/Python/module/pexpect-4.6/LICENSE b/lldb/third_party/Python/module/pexpect-4.6/LICENSE
deleted file mode 100644
index 754db5afcb8260..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-ISC LICENSE
-
-    This license is approved by the OSI and FSF as GPL-compatible.
-        http://opensource.org/licenses/isc-license.txt
-
-    Copyright (c) 2013-2014, Pexpect development team
-    Copyright (c) 2012, Noah Spurrier <noah at noah.org>
-
-    Permission to use, copy, modify, and/or distribute this software for any
-    purpose with or without fee is hereby granted, provided that the above
-    copyright notice and this permission notice appear in all copies.
-    
-    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/lldb/third_party/Python/module/pexpect-4.6/MANIFEST.in b/lldb/third_party/Python/module/pexpect-4.6/MANIFEST.in
deleted file mode 100644
index 32c72ba1712486..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/MANIFEST.in
+++ /dev/null
@@ -1,6 +0,0 @@
-recursive-include doc *
-prune doc/_build
-recursive-include examples *
-include .coveragerc README.rst LICENSE pexpect/bashrc.sh
-recursive-include tests *
-global-exclude __pycache__ *.pyc *~
diff --git a/lldb/third_party/Python/module/pexpect-4.6/README.rst b/lldb/third_party/Python/module/pexpect-4.6/README.rst
deleted file mode 100644
index 0f5cb98ceb985b..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/README.rst
+++ /dev/null
@@ -1,55 +0,0 @@
-.. image:: https://travis-ci.org/pexpect/pexpect.svg?branch=master
-   :target: https://travis-ci.org/pexpect/pexpect
-   :align: right
-   :alt: Build status
-
-Pexpect is a Pure Python Expect-like module
-
-Pexpect makes Python a better tool for controlling other applications.
-
-Pexpect is a pure Python module for spawning child applications; controlling
-them; and responding to expected patterns in their output. Pexpect works like
-Don Libes' Expect. Pexpect allows your script to spawn a child application and
-control it as if a human were typing commands.
-
-Pexpect can be used for automating interactive applications such as ssh, ftp,
-passwd, telnet, etc. It can be used to a automate setup scripts for duplicating
-software package installations on different servers. It can be used for
-automated software testing. Pexpect is in the spirit of Don Libes' Expect, but
-Pexpect is pure Python.
-
-The main features of Pexpect require the pty module in the Python standard
-library, which is only available on Unix-like systems. Some features—waiting
-for patterns from file descriptors or subprocesses—are also available on
-Windows.
-
-If you want to work with the development version of the source code then please
-read the DEVELOPERS.rst document in the root of the source code tree.
-
-Free, open source, and all that good stuff.
-
-You can install Pexpect using pip::
-
-    pip install pexpect
-
-`Docs on ReadTheDocs <https://pexpect.readthedocs.io/>`_
-
-PEXPECT LICENSE::
-
-    http://opensource.org/licenses/isc-license.txt
-
-    Copyright (c) 2013-2016, Pexpect development team
-    Copyright (c) 2012, Noah Spurrier <noah at noah.org>
-
-    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
-    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
-    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
-    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-This license is approved by the OSI and FSF as GPL-compatible.
diff --git a/lldb/third_party/Python/module/pexpect-4.6/pexpect/ANSI.py b/lldb/third_party/Python/module/pexpect-4.6/pexpect/ANSI.py
deleted file mode 100644
index 1cd2e90e7ab0c5..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/pexpect/ANSI.py
+++ /dev/null
@@ -1,351 +0,0 @@
-'''This implements an ANSI (VT100) terminal emulator as a subclass of screen.
-
-PEXPECT LICENSE
-
-    This license is approved by the OSI and FSF as GPL-compatible.
-        http://opensource.org/licenses/isc-license.txt
-
-    Copyright (c) 2012, Noah Spurrier <noah at noah.org>
-    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
-    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
-    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
-    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-'''
-
-# references:
-#     http://en.wikipedia.org/wiki/ANSI_escape_code
-#     http://www.retards.org/terminals/vt102.html
-#     http://vt100.net/docs/vt102-ug/contents.html
-#     http://vt100.net/docs/vt220-rm/
-#     http://www.termsys.demon.co.uk/vtansi.htm
-
-from . import screen
-from . import FSM
-import string
-
-#
-# The 'Do.*' functions are helper functions for the ANSI class.
-#
-def DoEmit (fsm):
-
-    screen = fsm.memory[0]
-    screen.write_ch(fsm.input_symbol)
-
-def DoStartNumber (fsm):
-
-    fsm.memory.append (fsm.input_symbol)
-
-def DoBuildNumber (fsm):
-
-    ns = fsm.memory.pop()
-    ns = ns + fsm.input_symbol
-    fsm.memory.append (ns)
-
-def DoBackOne (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_back ()
-
-def DoBack (fsm):
-
-    count = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    screen.cursor_back (count)
-
-def DoDownOne (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_down ()
-
-def DoDown (fsm):
-
-    count = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    screen.cursor_down (count)
-
-def DoForwardOne (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_forward ()
-
-def DoForward (fsm):
-
-    count = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    screen.cursor_forward (count)
-
-def DoUpReverse (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_up_reverse()
-
-def DoUpOne (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_up ()
-
-def DoUp (fsm):
-
-    count = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    screen.cursor_up (count)
-
-def DoHome (fsm):
-
-    c = int(fsm.memory.pop())
-    r = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    screen.cursor_home (r,c)
-
-def DoHomeOrigin (fsm):
-
-    c = 1
-    r = 1
-    screen = fsm.memory[0]
-    screen.cursor_home (r,c)
-
-def DoEraseDown (fsm):
-
-    screen = fsm.memory[0]
-    screen.erase_down()
-
-def DoErase (fsm):
-
-    arg = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    if arg == 0:
-        screen.erase_down()
-    elif arg == 1:
-        screen.erase_up()
-    elif arg == 2:
-        screen.erase_screen()
-
-def DoEraseEndOfLine (fsm):
-
-    screen = fsm.memory[0]
-    screen.erase_end_of_line()
-
-def DoEraseLine (fsm):
-
-    arg = int(fsm.memory.pop())
-    screen = fsm.memory[0]
-    if arg == 0:
-        screen.erase_end_of_line()
-    elif arg == 1:
-        screen.erase_start_of_line()
-    elif arg == 2:
-        screen.erase_line()
-
-def DoEnableScroll (fsm):
-
-    screen = fsm.memory[0]
-    screen.scroll_screen()
-
-def DoCursorSave (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_save_attrs()
-
-def DoCursorRestore (fsm):
-
-    screen = fsm.memory[0]
-    screen.cursor_restore_attrs()
-
-def DoScrollRegion (fsm):
-
-    screen = fsm.memory[0]
-    r2 = int(fsm.memory.pop())
-    r1 = int(fsm.memory.pop())
-    screen.scroll_screen_rows (r1,r2)
-
-def DoMode (fsm):
-
-    screen = fsm.memory[0]
-    mode = fsm.memory.pop() # Should be 4
-    # screen.setReplaceMode ()
-
-def DoLog (fsm):
-
-    screen = fsm.memory[0]
-    fsm.memory = [screen]
-    fout = open ('log', 'a')
-    fout.write (fsm.input_symbol + ',' + fsm.current_state + '\n')
-    fout.close()
-
-class term (screen.screen):
-
-    '''This class is an abstract, generic terminal.
-    This does nothing. This is a placeholder that
-    provides a common base class for other terminals
-    such as an ANSI terminal. '''
-
-    def __init__ (self, r=24, c=80, *args, **kwargs):
-
-        screen.screen.__init__(self, r,c,*args,**kwargs)
-
-class ANSI (term):
-    '''This class implements an ANSI (VT100) terminal.
-    It is a stream filter that recognizes ANSI terminal
-    escape sequences and maintains the state of a screen object. '''
-
-    def __init__ (self, r=24,c=80,*args,**kwargs):
-
-        term.__init__(self,r,c,*args,**kwargs)
-
-        #self.screen = screen (24,80)
-        self.state = FSM.FSM ('INIT',[self])
-        self.state.set_default_transition (DoLog, 'INIT')
-        self.state.add_transition_any ('INIT', DoEmit, 'INIT')
-        self.state.add_transition ('\x1b', 'INIT', None, 'ESC')
-        self.state.add_transition_any ('ESC', DoLog, 'INIT')
-        self.state.add_transition ('(', 'ESC', None, 'G0SCS')
-        self.state.add_transition (')', 'ESC', None, 'G1SCS')
-        self.state.add_transition_list ('AB012', 'G0SCS', None, 'INIT')
-        self.state.add_transition_list ('AB012', 'G1SCS', None, 'INIT')
-        self.state.add_transition ('7', 'ESC', DoCursorSave, 'INIT')
-        self.state.add_transition ('8', 'ESC', DoCursorRestore, 'INIT')
-        self.state.add_transition ('M', 'ESC', DoUpReverse, 'INIT')
-        self.state.add_transition ('>', 'ESC', DoUpReverse, 'INIT')
-        self.state.add_transition ('<', 'ESC', DoUpReverse, 'INIT')
-        self.state.add_transition ('=', 'ESC', None, 'INIT') # Selects application keypad.
-        self.state.add_transition ('#', 'ESC', None, 'GRAPHICS_POUND')
-        self.state.add_transition_any ('GRAPHICS_POUND', None, 'INIT')
-        self.state.add_transition ('[', 'ESC', None, 'ELB')
-        # ELB means Escape Left Bracket. That is ^[[
-        self.state.add_transition ('H', 'ELB', DoHomeOrigin, 'INIT')
-        self.state.add_transition ('D', 'ELB', DoBackOne, 'INIT')
-        self.state.add_transition ('B', 'ELB', DoDownOne, 'INIT')
-        self.state.add_transition ('C', 'ELB', DoForwardOne, 'INIT')
-        self.state.add_transition ('A', 'ELB', DoUpOne, 'INIT')
-        self.state.add_transition ('J', 'ELB', DoEraseDown, 'INIT')
-        self.state.add_transition ('K', 'ELB', DoEraseEndOfLine, 'INIT')
-        self.state.add_transition ('r', 'ELB', DoEnableScroll, 'INIT')
-        self.state.add_transition ('m', 'ELB', self.do_sgr, 'INIT')
-        self.state.add_transition ('?', 'ELB', None, 'MODECRAP')
-        self.state.add_transition_list (string.digits, 'ELB', DoStartNumber, 'NUMBER_1')
-        self.state.add_transition_list (string.digits, 'NUMBER_1', DoBuildNumber, 'NUMBER_1')
-        self.state.add_transition ('D', 'NUMBER_1', DoBack, 'INIT')
-        self.state.add_transition ('B', 'NUMBER_1', DoDown, 'INIT')
-        self.state.add_transition ('C', 'NUMBER_1', DoForward, 'INIT')
-        self.state.add_transition ('A', 'NUMBER_1', DoUp, 'INIT')
-        self.state.add_transition ('J', 'NUMBER_1', DoErase, 'INIT')
-        self.state.add_transition ('K', 'NUMBER_1', DoEraseLine, 'INIT')
-        self.state.add_transition ('l', 'NUMBER_1', DoMode, 'INIT')
-        ### It gets worse... the 'm' code can have infinite number of
-        ### number;number;number before it. I've never seen more than two,
-        ### but the specs say it's allowed. crap!
-        self.state.add_transition ('m', 'NUMBER_1', self.do_sgr, 'INIT')
-        ### LED control. Same implementation problem as 'm' code.
-        self.state.add_transition ('q', 'NUMBER_1', self.do_decsca, 'INIT')
-
-        # \E[?47h switch to alternate screen
-        # \E[?47l restores to normal screen from alternate screen.
-        self.state.add_transition_list (string.digits, 'MODECRAP', DoStartNumber, 'MODECRAP_NUM')
-        self.state.add_transition_list (string.digits, 'MODECRAP_NUM', DoBuildNumber, 'MODECRAP_NUM')
-        self.state.add_transition ('l', 'MODECRAP_NUM', self.do_modecrap, 'INIT')
-        self.state.add_transition ('h', 'MODECRAP_NUM', self.do_modecrap, 'INIT')
-
-#RM   Reset Mode                Esc [ Ps l                   none
-        self.state.add_transition (';', 'NUMBER_1', None, 'SEMICOLON')
-        self.state.add_transition_any ('SEMICOLON', DoLog, 'INIT')
-        self.state.add_transition_list (string.digits, 'SEMICOLON', DoStartNumber, 'NUMBER_2')
-        self.state.add_transition_list (string.digits, 'NUMBER_2', DoBuildNumber, 'NUMBER_2')
-        self.state.add_transition_any ('NUMBER_2', DoLog, 'INIT')
-        self.state.add_transition ('H', 'NUMBER_2', DoHome, 'INIT')
-        self.state.add_transition ('f', 'NUMBER_2', DoHome, 'INIT')
-        self.state.add_transition ('r', 'NUMBER_2', DoScrollRegion, 'INIT')
-        ### It gets worse... the 'm' code can have infinite number of
-        ### number;number;number before it. I've never seen more than two,
-        ### but the specs say it's allowed. crap!
-        self.state.add_transition ('m', 'NUMBER_2', self.do_sgr, 'INIT')
-        ### LED control. Same problem as 'm' code.
-        self.state.add_transition ('q', 'NUMBER_2', self.do_decsca, 'INIT')
-        self.state.add_transition (';', 'NUMBER_2', None, 'SEMICOLON_X')
-
-        # Create a state for 'q' and 'm' which allows an infinite number of ignored numbers
-        self.state.add_transition_any ('SEMICOLON_X', DoLog, 'INIT')
-        self.state.add_transition_list (string.digits, 'SEMICOLON_X', DoStartNumber, 'NUMBER_X')
-        self.state.add_transition_list (string.digits, 'NUMBER_X', DoBuildNumber, 'NUMBER_X')
-        self.state.add_transition_any ('NUMBER_X', DoLog, 'INIT')
-        self.state.add_transition ('m', 'NUMBER_X', self.do_sgr, 'INIT')
-        self.state.add_transition ('q', 'NUMBER_X', self.do_decsca, 'INIT')
-        self.state.add_transition (';', 'NUMBER_X', None, 'SEMICOLON_X')
-
-    def process (self, c):
-        """Process a single character. Called by :meth:`write`."""
-        if isinstance(c, bytes):
-            c = self._decode(c)
-        self.state.process(c)
-
-    def process_list (self, l):
-
-        self.write(l)
-
-    def write (self, s):
-        """Process text, writing it to the virtual screen while handling
-        ANSI escape codes.
-        """
-        if isinstance(s, bytes):
-            s = self._decode(s)
-        for c in s:
-            self.process(c)
-
-    def flush (self):
-        pass
-
-    def write_ch (self, ch):
-        '''This puts a character at the current cursor position. The cursor
-        position is moved forward with wrap-around, but no scrolling is done if
-        the cursor hits the lower-right corner of the screen. '''
-
-        if isinstance(ch, bytes):
-            ch = self._decode(ch)
-
-        #\r and \n both produce a call to cr() and lf(), respectively.
-        ch = ch[0]
-
-        if ch == u'\r':
-            self.cr()
-            return
-        if ch == u'\n':
-            self.crlf()
-            return
-        if ch == chr(screen.BS):
-            self.cursor_back()
-            return
-        self.put_abs(self.cur_r, self.cur_c, ch)
-        old_r = self.cur_r
-        old_c = self.cur_c
-        self.cursor_forward()
-        if old_c == self.cur_c:
-            self.cursor_down()
-            if old_r != self.cur_r:
-                self.cursor_home (self.cur_r, 1)
-            else:
-                self.scroll_up ()
-                self.cursor_home (self.cur_r, 1)
-                self.erase_line()
-
-    def do_sgr (self, fsm):
-        '''Select Graphic Rendition, e.g. color. '''
-        screen = fsm.memory[0]
-        fsm.memory = [screen]
-
-    def do_decsca (self, fsm):
-        '''Select character protection attribute. '''
-        screen = fsm.memory[0]
-        fsm.memory = [screen]
-
-    def do_modecrap (self, fsm):
-        '''Handler for \x1b[?<number>h and \x1b[?<number>l. If anyone
-        wanted to actually use these, they'd need to add more states to the
-        FSM rather than just improve or override this method. '''
-        screen = fsm.memory[0]
-        fsm.memory = [screen]
diff --git a/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py b/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py
deleted file mode 100644
index 46b392ea08aaf5..00000000000000
--- a/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py
+++ /dev/null
@@ -1,334 +0,0 @@
-#!/usr/bin/env python
-
-'''This module implements a Finite State Machine (FSM). In addition to state
-this FSM also maintains a user defined "memory". So this FSM can be used as a
-Push-down Automata (PDA) since a PDA is a FSM + memory.
-
-The following describes how the FSM works, but you will probably also need to
-see the example function to understand how the FSM is used in practice.
-
-You define an FSM by building tables of transitions. For a given input symbol
-the process() method uses these tables to decide what action to call and what
-the next state will be. The FSM has a table of transitions that associate:
-
-        (input_symbol, current_state) --> (action, next_state)
-
-Where "action" is a function you define. The symbols and states can be any
-objects. You use the add_transition() and add_transition_list() methods to add
-to the transition table. The FSM also has a table of transitions that
-associa...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/89609


More information about the lldb-commits mailing list