From f3a4409a14048f7cade7cf226ed0b2e126123229 2017-03-02 13:19:34 From: Thomas Kluyver Date: 2017-03-02 13:19:34 Subject: [PATCH] Attempt at fixing assertion from reverse search Trying to fix gh-10014, though I can't reproduce the problem to test it. PR against 5.x because I think this is only needed for Python 2. --- diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index f551fd4..b3ebcd2 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -239,7 +239,7 @@ class TerminalInteractiveShell(InteractiveShell): # Ignore blank lines and consecutive duplicates cell = cell.rstrip() if cell and (cell != last_cell): - history.append(cell) + history.append(cast_unicode_py2(cell)) last_cell = cell self._style = self._make_style_from_name_or_cls(self.highlighting_style)