Repository navigation
asyncio REPL fails to run with TERM=dumb or PYTHON_BASIC_REPL in 3.13.0b2 #120842
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
topic-asynciotopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jun 21, 2024 Confirm on main branch and 3.13
Plz assign this to me, I will dive into this issue. BTW we need asyncio and repl related labels cc @Eclips4
Reacted by Kirill Podoprigora and Łukasz Langa- addedtopic-replRelated to the interactive shellRelated to the interactive shell
on Jun 21, 2024 @ambv this Bug was introduced into codebase since #119433 and was made by two part
- https://github.com/python/cpython/pull/119433/files#diff-7dde21a2106757650c70cf16ab62c5c40a63bec89e420d70ae12782c95e1daa8R119 we should convert
exit_messageto'' - An InvalidTerminal has been raised in
register_readline. Actually I'm not sure which is the graceful way to fix it.
- https://github.com/python/cpython/pull/119433/files#diff-7dde21a2106757650c70cf16ab62c5c40a63bec89e420d70ae12782c95e1daa8R119 we should convert
- https://github.com/python/cpython/pull/119433/files#diff-7dde21a2106757650c70cf16ab62c5c40a63bec89e420d70ae12782c95e1daa8R119 we should convert
exit_messageto''
We already have a PR to fix that: #121341
- https://github.com/python/cpython/pull/119433/files#diff-7dde21a2106757650c70cf16ab62c5c40a63bec89e420d70ae12782c95e1daa8R119 we should convert
- https://github.com/python/cpython/pull/119433/files#diff-7dde21a2106757650c70cf16ab62c5c40a63bec89e420d70ae12782c95e1daa8R119 we should convert
exit_messageto''
We already have a PR to fix that: #121341
Yes but this is only for case1
asyncio REPL 3.14.0a0 (heads/main:6239d41527, Jul 6 2024, 20:42:50) [GCC 14.1.1 20240522] on linux Use "await" directly instead of "asyncio.run()". Type "help", "copyright", "credits" or "license" for more information. >>> import asyncio >>> exiting asyncio REPL... Exception ignored in atexit callback <function register_readline.<locals>.write_history at 0x7ce232fa9850>: Traceback (most recent call last): File "/home/manjusaka/Documents/projects/cpython/Lib/site.py", line 537, in write_history _pyrepl.readline.write_history_file(history) File "/home/manjusaka/Documents/projects/cpython/Lib/_pyrepl/readline.py", line 444, in write_history_file history = self.get_reader().get_trimmed_history(maxlength) File "/home/manjusaka/Documents/projects/cpython/Lib/_pyrepl/readline.py", line 358, in get_reader console = Console(self.f_in, self.f_out, encoding=ENCODING) File "/home/manjusaka/Documents/projects/cpython/Lib/_pyrepl/unix_console.py", line 173, in __init__ self._clear = _my_getstr("clear") File "/home/manjusaka/Documents/projects/cpython/Lib/_pyrepl/unix_console.py", line 166, in _my_getstr raise InvalidTerminal( _pyrepl.unix_console.InvalidTerminal: terminal doesn't have the required clear capabilityHere's case2. This exception should not be raised into terminal I guess
- https://github.com/python/cpython/pull/119433/files#diff-7dde21a2106757650c70cf16ab62c5c40a63bec89e420d70ae12782c95e1daa8R119 we should convert
I think this is fixed on current main now.
Metadata
Metadata
Assignees
Labels
topic-asynciotopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
Similar bug report: #119102
Linux: Starting asyncio REPL using
TERM=dumb:Linux: Using
PYTHON_BASIC_REPL=1:CPython versions tested on:
3.13
Operating systems tested on:
Linux, macOS