ipython/ipython — pull request #4713 by takluyver (2013-12-18 20:46:17+00:00)
Title: Fix saving kernel history in Python 2

Supersedes & closes #4582.

Doing `%hist -f foo` from any of the two process frontends is currently broken on Python 2 because it expects to write unicode, but the raw history is stored as byte strings. This decodes the code at the `ipkernel` level, before it gets handled by any of the IPython internals.