handle newer versions of IPython and pdb