Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New pyrepl gives a traceback on exit with "dumb" terminal #119102

Closed
Labels
3.13bugs and security fixestopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@dgrisby

Description

@dgrisby

Bug report

Bug description:

I was experimenting with terminal types:

$ export TERM=dumb$ python3Python 3.13.0b1 (main, May 12 2024, 23:38:03) [GCC 13.2.1 20240316 (Red Hat 13.2.1-7)] on linuxType "help", "copyright", "credits" or "license" for more information.warning: can't use pyrepl: terminal doesn't have the required clear capability>>> quitUse quit() or Ctrl-D (i.e. EOF) to exit>>> quit()Exception ignored in atexit callback <function register_readline.<locals>.write_history at 0x7f7204f537e0>:Traceback (most recent call last):  File "<frozen site>", line 530, in write_history  File "/home/duncan/py313inst/lib/python3.13/_pyrepl/readline.py", line 361, in write_history_file    history = self.get_reader().get_trimmed_history(maxlength)  File "/home/duncan/py313inst/lib/python3.13/_pyrepl/readline.py", line 277, in get_reader    console = UnixConsole(self.f_in, self.f_out, encoding=ENCODING)  File "/home/duncan/omni/py313inst/lib/python3.13/_pyrepl/unix_console.py", line 170, in __init__    self._clear = _my_getstr("clear")  File "/home/duncan/py313inst/lib/python3.13/_pyrepl/unix_console.py", line 163, in _my_getstr    raise InvalidTerminal(_pyrepl.unix_console.InvalidTerminal: terminal doesn't have the required clear capability

It notices that the terminal is unsuitable, but then tries to use it on exit.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixestopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp