The Wayback Machine - https://web.archive.org/web/20200905014509/http://github.com/bpython/bpython/issues/822
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo after interactive help() crashes #822

Open
thomasballinger opened this issue Jul 16, 2020 · 3 comments
Open

Undo after interactive help() crashes #822

thomasballinger opened this issue Jul 16, 2020 · 3 comments

Comments

@thomasballinger
Copy link
Member

@thomasballinger thomasballinger commented Jul 16, 2020

tomb (master) audioembed$ bpython
bpython version 0.20.dev11 on top of Python 3.8.2 /Users/tomb/.pyenv/versions/3.8.2/bin/python3.8
>>> help()

Welcome to Python 3.8's help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at https://docs.python.org/3.8/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"modules", "keywords", "symbols", or "topics".  Each module also comes
with a one-line summary of what it does; to list the modules whose name
or summary contain a given string such as "spam", type "modules spam".

help> quit

You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.
>>> 1
1
>>> ctrl-R
```
@sebastinas
Copy link
Contributor

@sebastinas sebastinas commented Jul 16, 2020

How does it crash? I cannot reproduce it (with Python 3.6).

@thomasballinger
Copy link
Member Author

@thomasballinger thomasballinger commented Jul 16, 2020

2020-07-16 09 38 10

@thomasballinger
Copy link
Member Author

@thomasballinger thomasballinger commented Jul 16, 2020

Traceback (most recent call last):
  File "/Users/tomb/.pyenv/versions/3.8.2/bin/bpython", line 33, in <module>
    sys.exit(load_entry_point('bpython', 'console_scripts', 'bpython')())
  File "/Users/tomb/bpython/bpython/curtsies.py", line 220, in main
    exit_value = repl.mainloop(True, paste)
  File "/Users/tomb/bpython/bpython/curtsies.py", line 132, in mainloop
    self.process_event_and_paint(e)
  File "/Users/tomb/bpython/bpython/curtsies.py", line 96, in process_event_and_paint
    self.process_event(e)
  File "/Users/tomb/bpython/bpython/curtsiesfrontend/repl.py", line 630, in process_event
    return self.process_control_event(e)
  File "/Users/tomb/bpython/bpython/curtsiesfrontend/repl.py", line 688, in process_control_event
    self.undo(n=e.n)
  File "/Users/tomb/bpython/bpython/repl.py", line 1018, in undo
    self.reevaluate()
  File "/Users/tomb/bpython/bpython/curtsiesfrontend/repl.py", line 1858, in reevaluate
    self.on_enter(new_code=new_code)
  File "/Users/tomb/bpython/bpython/curtsiesfrontend/repl.py", line 875, in on_enter
    self.push(self.current_line, insert_into_history=new_code)
  File "/Users/tomb/bpython/bpython/curtsiesfrontend/repl.py", line 1177, in push
    self.coderunner.load_code(code_to_run)
  File "/Users/tomb/bpython/bpython/curtsiesfrontend/coderunner.py", line 116, in load_code
    assert self.source is None, (
AssertionError: you shouldn't load code when some is already running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.