From 473e511b57a880f42bbc36ff9c6fdf5c3b89dfaa Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 4 Feb 2019 15:36:58 -0600 Subject: [PATCH 1/4] CLN: Remove ipython 2.x compat --- doc/source/whatsnew/v0.25.0.rst | 18 ++++++++++++++++ pandas/core/frame.py | 17 --------------- pandas/io/formats/console.py | 38 --------------------------------- 3 files changed, 18 insertions(+), 55 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 09626be713c4f..a4722d5f8e1c5 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -28,6 +28,24 @@ Other Enhancements Backwards incompatible API changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Pandas 0.24.0 includes a number of API breaking changes. + +.. _whatsnew_0240.api_breaking.deps: + +Increased minimum versions for dependencies +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +We have updated our minimum supported versions of dependencies (:issue:`25036`). +If installed, we now require: + ++-----------------+-----------------+----------+ +| Package | Minimum Version | Required | ++=================+=================+==========+ +| IPython | 3.0.0 | | ++-----------------+-----------------+----------+ + + + .. _whatsnew_0250.api.other: Other API Changes diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 152d2741e1788..4c1b34f993662 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -17,7 +17,6 @@ import itertools import sys import warnings -from distutils.version import LooseVersion from textwrap import dedent import numpy as np @@ -641,22 +640,6 @@ def _repr_html_(self): Mainly for IPython notebook. """ - # qtconsole doesn't report its line width, and also - # behaves badly when outputting an HTML table - # that doesn't fit the window, so disable it. - # XXX: In IPython 3.x and above, the Qt console will not attempt to - # display HTML, so this check can be removed when support for - # IPython 2.x is no longer needed. - try: - import IPython - except ImportError: - pass - else: - if LooseVersion(IPython.__version__) < LooseVersion('3.0'): - if console.in_qtconsole(): - # 'HTML output is disabled in QtConsole' - return None - if self._info_repr(): buf = StringIO(u("")) self.info(buf=buf) diff --git a/pandas/io/formats/console.py b/pandas/io/formats/console.py index d5ef9f61bc132..ad63b3efdd832 100644 --- a/pandas/io/formats/console.py +++ b/pandas/io/formats/console.py @@ -108,44 +108,6 @@ def check_main(): return check_main() -def in_qtconsole(): - """ - check if we're inside an IPython qtconsole - - .. deprecated:: 0.14.1 - This is no longer needed, or working, in IPython 3 and above. - """ - try: - ip = get_ipython() # noqa - front_end = ( - ip.config.get('KernelApp', {}).get('parent_appname', "") or - ip.config.get('IPKernelApp', {}).get('parent_appname', "")) - if 'qtconsole' in front_end.lower(): - return True - except NameError: - return False - return False - - -def in_ipnb(): - """ - check if we're inside an IPython Notebook - - .. deprecated:: 0.14.1 - This is no longer needed, or working, in IPython 3 and above. - """ - try: - ip = get_ipython() # noqa - front_end = ( - ip.config.get('KernelApp', {}).get('parent_appname', "") or - ip.config.get('IPKernelApp', {}).get('parent_appname', "")) - if 'notebook' in front_end.lower(): - return True - except NameError: - return False - return False - - def in_ipython_frontend(): """ check if we're inside an an IPython zmq frontend From 4fec75501fd1c3d525c485b8f02e8b6a213e1ed1 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 4 Feb 2019 15:40:46 -0600 Subject: [PATCH 2/4] trivial change to trigger asv --- asv_bench/benchmarks/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/asv_bench/benchmarks/__init__.py b/asv_bench/benchmarks/__init__.py index e69de29bb2d1d..eada147852fe1 100644 --- a/asv_bench/benchmarks/__init__.py +++ b/asv_bench/benchmarks/__init__.py @@ -0,0 +1 @@ +"""Pandas benchmarks.""" From d9c784d2b1598eb213aabd4a165547c78cc730ea Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 4 Feb 2019 15:50:02 -0600 Subject: [PATCH 3/4] Update v0.25.0.rst --- doc/source/whatsnew/v0.25.0.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index a4722d5f8e1c5..b101d10841042 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -28,9 +28,9 @@ Other Enhancements Backwards incompatible API changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Pandas 0.24.0 includes a number of API breaking changes. +Pandas 0.25.0 includes a number of API breaking changes. -.. _whatsnew_0240.api_breaking.deps: +.. _whatsnew_0250.api_breaking.deps: Increased minimum versions for dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 9d7870fc7c06519ce18e8fe7f36b289609d84a27 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 4 Feb 2019 20:43:44 -0600 Subject: [PATCH 4/4] revert whatsnew --- doc/source/whatsnew/v0.25.0.rst | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index b101d10841042..09626be713c4f 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -28,24 +28,6 @@ Other Enhancements Backwards incompatible API changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Pandas 0.25.0 includes a number of API breaking changes. - -.. _whatsnew_0250.api_breaking.deps: - -Increased minimum versions for dependencies -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We have updated our minimum supported versions of dependencies (:issue:`25036`). -If installed, we now require: - -+-----------------+-----------------+----------+ -| Package | Minimum Version | Required | -+=================+=================+==========+ -| IPython | 3.0.0 | | -+-----------------+-----------------+----------+ - - - .. _whatsnew_0250.api.other: Other API Changes