Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Bug report
Bug description:
How to reproduce:
- start python3
- interrupt with ^Z
- resume with
fg
- immediately press ^D (EOF)
$python3>>>^ZStopped$fg^DTraceback (mostrecentcalllast):File"<frozen runpy>",line198,in_run_module_as_mainFile"<frozen runpy>",line88,in_run_codeFile"/usr/lib/python3.13/_pyrepl/__main__.py",line6,in<module>__pyrepl_interactive_console()~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^File"/usr/lib/python3.13/_pyrepl/main.py",line59,ininteractive_consolerun_multiline_interactive_console(console)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^File"/usr/lib/python3.13/_pyrepl/simple_interact.py",line142,inrun_multiline_interactive_consolestatement=multiline_input(more_lines,ps1,ps2)File"/usr/lib/python3.13/_pyrepl/readline.py",line389,inmultiline_inputreturnreader.readline()~~~~~~~~~~~~~~~^^File"/usr/lib/python3.13/_pyrepl/reader.py",line803,inreadlineself.handle1()~~~~~~~~~~~~^^File"/usr/lib/python3.13/_pyrepl/reader.py",line759,inhandle1event=self.console.get_event(block=False)File"/usr/lib/python3.13/_pyrepl/unix_console.py",line406,inget_eventself.push_char(self.__read(1))~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^File"/usr/lib/python3.13/_pyrepl/unix_console.py",line388,inpush_charself.event_queue.push(char)~~~~~~~~~~~~~~~~~~~~~^^^^^^File"/usr/lib/python3.13/_pyrepl/unix_eventqueue.py",line120,inpushord_char=charifisinstance(char,int)elseord(char)~~~^^^^^^TypeError:ord()expectedacharacter,butstringoflength0found$
Also + likely related: resuming Python doesn't restore the>>>
prompt (nor command-line editing) until I press Enter, presumably due to the interactive interpreter not listening to SIGCONT.
CPython versions tested on:
3.13
Operating systems tested on:
Linux