[pypy-issue] Issue #1939: PyPy 3k interactive interpreter crashes on RCTRL+number key combination (pypy/pypy)
Carmen Bianca Bakker
issues-reply at bitbucket.org
Tue Dec 2 12:37:06 CET 2014
New issue 1939: PyPy 3k interactive interpreter crashes on RCTRL+number key combination
https://bitbucket.org/pypy/pypy/issue/1939/pypy-3k-interactive-interpreter-crashes-on
Carmen Bianca Bakker:
So this is an odd bug. I run Ubuntu 14.10. I have PyPy 3k installed from the binary download.
```
#!bash
$ pypy3 --version
Python 3.2.5 (b2091e973da6, Oct 19 2014, 18:29:55)
[PyPy 2.4.0 with GCC 4.6.3]
```
If I type right CTRL + [2, 3, 4, 5, 6, 7], the interpreter crashes and I get the following stack trace:
```
#!bash
$ pypy3
Python 3.2.5 (b2091e973da6, Oct 19 2014, 18:29:55)
[PyPy 2.4.0 with GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>> Traceback (most recent call last):
File "/opt/pypy3/lib_pypy/_pypy_interact.py", line 45, in interactive_console
run_interactive(mainmodule)
File "/opt/pypy3/lib_pypy/pyrepl/simple_interact.py", line 62, in run_multiline_interactive_console
returns_unicode=True)
File "/opt/pypy3/lib_pypy/pyrepl/readline.py", line 216, in multiline_input
return reader.readline(returns_unicode=returns_unicode)
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 616, in readline
self.handle1()
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 599, in handle1
self.do_cmd(cmd)
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 551, in do_cmd
self.refresh()
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 532, in refresh
screen = self.calc_screen()
File "/opt/pypy3/lib_pypy/pyrepl/completing_reader.py", line 230, in calc_screen
screen = super(CompletingReader, self).calc_screen()
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 295, in calc_screen
l, l2 = disp_str(line)
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 81, in disp_str
s = [uc(x) for x in buffer]
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 81, in <listcomp>
s = [uc(x) for x in buffer]
File "/opt/pypy3/lib_pypy/pyrepl/reader.py", line 57, in _my_unctrl
return br'\u%04x' % ord(c)
TypeError: unsupported operand type(s) for %: 'bytes' and 'int'
```
I just thought I'd do the right thing and report the bug. CPython 3 does not appear to have this behaviour, and neither does PyPy 2.
More information about the pypy-issue
mailing list