This reverts commit dc4eb2fc5e. It was
added in a large PR (#71893) by @fridh, where he already predicted some of
the changes would have to be reverted. This is an obvious one, it breaks
python 2.7 compatibility, as that needs 5.x of jupyter_console.