[pypy-issue] Issue #2718: pypy3.5 traceback when hitting backspace in repl (pypy/pypy)
Miro Hrončok
issues-reply at bitbucket.org
Wed Dec 27 17:46:57 EST 2017
New issue 2718: pypy3.5 traceback when hitting backspace in repl
https://bitbucket.org/pypy/pypy/issues/2718/pypy35-traceback-when-hitting-backspace-in
Miro Hrončok:
In interactive prompt, when I remove a character via backspace, a traceback is scattered all around my terminal with the following:
```
Traceback (most recent call last):
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/reader.py", line 620, in readline
self.handle1()
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/reader.py", line 603, in handle1
self.do_cmd(cmd)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/reader.py", line 555, in do_cmd
self.refresh()
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/reader.py", line 537, in refresh
self.console.refresh(screen, self.cxy)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 245, in refresh
self.move_cursor(cx, cy)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 355, in move_cursor
self.flushoutput()
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 479, in flushoutput
self.__tputs(text)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 503, in __tputs
if '*' in m.group(2):
TypeError: 'str' does not support the buffer interface
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/pypy3-5.10.0/lib_pypy/_pypy_interact.py", line 32, in interactive_console
run_interactive(mainmodule)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/simple_interact.py", line 73, in run_multiline_interactive_console
returns_unicode=True)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/readline.py", line 275, in multiline_input
return reader.readline(returns_unicode=returns_unicode)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/reader.py", line 625, in readline
self.restore()
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/reader.py", line 518, in restore
self.console.restore()
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 392, in restore
self.flushoutput()
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 479, in flushoutput
self.__tputs(text)
File "/usr/lib/pypy3-5.10.0/lib_pypy/pyrepl/unix_console.py", line 503, in __tputs
if '*' in m.group(2):
TypeError: 'str' does not support the buffer interface
```
Note that this only happens with a minimal setup in Fedora's build environment. where the tty is somehow limited and I cannot reproduce this on my normal environment.
Adding `b` into `if b'*' in m.group(2)` fixes the problem, will try to send a PR, but Bitbucket keeps saying it is forking the repo forever.
More information about the pypy-issue
mailing list