From a79b110e051bfa1bfca7b0571e0a682ecdb7165e 2011-03-13 12:51:49 From: Thomas Kluyver Date: 2011-03-13 12:51:49 Subject: [PATCH] Fix zmq request code for Python < 2.6.5 --- diff --git a/IPython/zmq/ipkernel.py b/IPython/zmq/ipkernel.py index 7460bb2..232685a 100755 --- a/IPython/zmq/ipkernel.py +++ b/IPython/zmq/ipkernel.py @@ -309,8 +309,12 @@ class Kernel(Configurable): logger.debug(msg) def history_tail_request(self, ident, parent): - # parent['content'] should contain keys "n", "raw" and "output" - hist = self.shell.history_manager.get_hist_tail(**parent['content']) + # We need to pull these out, as passing **kwargs doesn't work with + # unicode keys before Python 2.6.5. + n = parent['content']['n'] + raw = parent['content']['raw'] + output = parent['content']['output'] + hist = self.shell.history_manager.get_hist_tail(n, raw=raw, output=output) content = {'history' : list(hist)} msg = self.session.send(self.reply_socket, 'history_tail_reply', content, parent, ident)