Public bug reported:

Press Control-Z on the python repl, resume with `fg`, and press
Control-D right away.

```
ivo@Veronica:~$ python3
Python 3.13.3 (main, Aug 14 2025, 11:53:40) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[1]+  Stopped                 python3
ivo@Veronica:~$ fg
python3
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.13/_pyrepl/__main__.py", line 6, in <module>
    __pyrepl_interactive_console()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/_pyrepl/main.py", line 59, in interactive_console
    run_multiline_interactive_console(console)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/_pyrepl/simple_interact.py", line 142, in 
run_multiline_interactive_console
    statement = multiline_input(more_lines, ps1, ps2)
  File "/usr/lib/python3.13/_pyrepl/readline.py", line 389, in multiline_input
    return reader.readline()
           ~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/_pyrepl/reader.py", line 750, in readline
    self.handle1()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/_pyrepl/reader.py", line 706, in handle1
    event = self.console.get_event(block=False)
  File "/usr/lib/python3.13/_pyrepl/unix_console.py", line 406, in get_event
    self.push_char(self.__read(1))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/_pyrepl/unix_console.py", line 388, in push_char
    self.event_queue.push(char)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/_pyrepl/unix_eventqueue.py", line 120, in push
    ord_char = char if isinstance(char, int) else ord(char)
                                                  ~~~^^^^^^
TypeError: ord() expected a character, but string of length 0 found
ivo@Veronica:~$ echo $?
1
ivo@Veronica:~$
```

ProblemType: Bug
DistroRelease: Ubuntu 25.04
Package: python3 3.13.3-1
Uname: Linux 5.15.167.4-microsoft-standard-WSL2 x86_64
ApportVersion: 2.32.0-0ubuntu5.3
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Fri Sep 19 15:59:33 2025
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: python3-defaults
UpgradeStatus: Upgraded to plucky on 2025-09-19 (0 days ago)

** Affects: python3-defaults (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug plucky wayland-session

** Summary changed:

- Python3 crashes with traceback after resuming from pause
+ Python3 crashes with traceback on Ctrl-D after resuming from pause

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python3-defaults in
Ubuntu.
https://bugs.launchpad.net/bugs/2125204

Title:
  Python3 crashes with traceback on Ctrl-D after resuming from pause

Status in python3-defaults package in Ubuntu:
  New

Bug description:
  Press Control-Z on the python repl, resume with `fg`, and press
  Control-D right away.

  ```
  ivo@Veronica:~$ python3
  Python 3.13.3 (main, Aug 14 2025, 11:53:40) [GCC 14.2.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>>
  [1]+  Stopped                 python3
  ivo@Veronica:~$ fg
  python3
  Traceback (most recent call last):
    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "/usr/lib/python3.13/_pyrepl/__main__.py", line 6, in <module>
      __pyrepl_interactive_console()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3.13/_pyrepl/main.py", line 59, in interactive_console
      run_multiline_interactive_console(console)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.13/_pyrepl/simple_interact.py", line 142, in 
run_multiline_interactive_console
      statement = multiline_input(more_lines, ps1, ps2)
    File "/usr/lib/python3.13/_pyrepl/readline.py", line 389, in multiline_input
      return reader.readline()
             ~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3.13/_pyrepl/reader.py", line 750, in readline
      self.handle1()
      ~~~~~~~~~~~~^^
    File "/usr/lib/python3.13/_pyrepl/reader.py", line 706, in handle1
      event = self.console.get_event(block=False)
    File "/usr/lib/python3.13/_pyrepl/unix_console.py", line 406, in get_event
      self.push_char(self.__read(1))
      ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.13/_pyrepl/unix_console.py", line 388, in push_char
      self.event_queue.push(char)
      ~~~~~~~~~~~~~~~~~~~~~^^^^^^
    File "/usr/lib/python3.13/_pyrepl/unix_eventqueue.py", line 120, in push
      ord_char = char if isinstance(char, int) else ord(char)
                                                    ~~~^^^^^^
  TypeError: ord() expected a character, but string of length 0 found
  ivo@Veronica:~$ echo $?
  1
  ivo@Veronica:~$
  ```

  ProblemType: Bug
  DistroRelease: Ubuntu 25.04
  Package: python3 3.13.3-1
  Uname: Linux 5.15.167.4-microsoft-standard-WSL2 x86_64
  ApportVersion: 2.32.0-0ubuntu5.3
  Architecture: amd64
  CasperMD5CheckResult: unknown
  Date: Fri Sep 19 15:59:33 2025
  ProcEnviron:
   LANG=C.UTF-8
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=xterm-256color
   XDG_RUNTIME_DIR=<set>
  SourcePackage: python3-defaults
  UpgradeStatus: Upgraded to plucky on 2025-09-19 (0 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2125204/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to