Fix #7282: Deprecation warning with IPython 2.0