[Python-modules-team] Bug#879159: ipython3: Using ? to get a docstring sometimes causes an AssertionError
Diane Trout
diane at ghic.org
Thu Oct 19 21:58:47 UTC 2017
Package: ipython3
Version: 5.1.0-3
Severity: normal
Dear Maintainer,
I was trying to understand a module and when I hit a ? ipython3 exited
with the traceback below.
I looked at
https://github.com/ipython/ipython/issues/10381
And have a quick reproducer.
import numpy
x = numpy.z<TAB>
(Autocomplete to zero, add ?, hit enter)
x = numpy.zero?
(read help)
Crash
My traceback
------------
In [41]: e[0].get_properties?
Object `get_properties` not found.
In [42]: e[0].get_properties?
Traceback (most recent call last):
File "/home/diane/.local/bin/ipython3", line 11, in <module>
sys.exit(start_ipython())
File "/usr/lib/python3/dist-packages/IPython/__init__.py", line 119, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/usr/lib/python3/dist-packages/IPython/terminal/ipapp.py", line 348, in start
self.shell.mainloop()
File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 440, in mainloop
self.interact()
File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 423, in interact
code = self.prompt_for_code()
File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 333, in prompt_for_code
pre_run=self.pre_prompt, reset_current_buffer=True)
File "/usr/lib/python3/dist-packages/prompt_toolkit/interface.py", line 408, in run
self._pre_run(pre_run)
File "/usr/lib/python3/dist-packages/prompt_toolkit/interface.py", line 383, in _pre_run
pre_run()
File "/usr/lib/python3/dist-packages/IPython/terminal/interactiveshell.py", line 410, in pre_prompt
self.pt_cli.application.buffer.text = cast_unicode_py2(self.rl_next_input)
File "/usr/lib/python3/dist-packages/prompt_toolkit/buffer.py", line 372, in text
assert self.cursor_position <= len(value)
AssertionError
-- System Information:
Debian Release: buster/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'stable-debug'), (500, 'testing'), (500, 'stable'), (110, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages ipython3 depends on:
ii python3-ipython 5.1.0-3
ipython3 recommends no packages.
ipython3 suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list