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

REPL exits with traceback when str(sys.ps1) raises #130698

Open
Labels
stdlibPython modules in the Lib dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
@gvanrossum

Description

@gvanrossum

Bug report

Bug description:

Subject says it all. This is on the latest HEAD of main.

~/cpython$gpullAlreadyuptodate.~/cpython$makeChecked112modules (34built-in,78shared,0n/aonmacosx-14.6-x86_64,0disabled,0missing,0failedonimport)./python.exe-E ./Tools/build/generate-build-details.py`cat pybuilddir.txt`/build-details.json~/cpython$ ./python.exePython3.14.0a5+ (heads/main:ab11c097052,Feb282025,08:56:47) [Clang16.0.0 (clang-1600.0.26.6)]ondarwinType"help","copyright","credits"or"license"formoreinformation.>>>importsys>>>classC:...def__str__(self):1/0...>>>sys.ps1=C()Traceback (mostrecentcalllast):File"<frozen runpy>",line198,in_run_module_as_mainFile"<frozen runpy>",line88,in_run_codeFile"/Users/guido/cpython/Lib/_pyrepl/__main__.py",line6,in<module>__pyrepl_interactive_console()~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^File"/Users/guido/cpython/Lib/_pyrepl/main.py",line59,ininteractive_consolerun_multiline_interactive_console(console)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File"/Users/guido/cpython/Lib/_pyrepl/simple_interact.py",line143,inrun_multiline_interactive_consolestatement=multiline_input(more_lines,ps1,ps2)File"/Users/guido/cpython/Lib/_pyrepl/readline.py",line389,inmultiline_inputreturnreader.readline()~~~~~~~~~~~~~~~^^File"/Users/guido/cpython/Lib/_pyrepl/reader.py",line796,inreadlineself.prepare()~~~~~~~~~~~~^^File"/Users/guido/cpython/Lib/_pyrepl/historical_reader.py",line306,inpreparesuper().prepare()~~~~~~~~~~~~~~~^^File"/Users/guido/cpython/Lib/_pyrepl/reader.py",line643,inprepareself.calc_screen()~~~~~~~~~~~~~~~~^^File"/Users/guido/cpython/Lib/_pyrepl/completing_reader.py",line261,incalc_screenscreen=super().calc_screen()File"/Users/guido/cpython/Lib/_pyrepl/reader.py",line371,incalc_screenprompt=self.get_prompt(ln,ll>=pos>=0)File"/Users/guido/cpython/Lib/_pyrepl/historical_reader.py",line326,inget_promptreturnsuper().get_prompt(lineno,cursor_on_line)~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^File"/Users/guido/cpython/Lib/_pyrepl/reader.py",line552,inget_promptprompt=f"{ANSIColors.BOLD_MAGENTA}{prompt}{ANSIColors.RESET}"^^^^^^^^File"<python-input-1>",line2,in__str__def__str__(self):1/0~^~ZeroDivisionError:divisionbyzero~/cpython$

Probably@pablogsal should look into this.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtopic-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