Skip to content

COMPAT: change pytables to use 3.0.0 API (GH7990) #7994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/requirements-2.7.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ numpy==1.8.1
cython==0.19.1
bottleneck==0.6.0
numexpr==2.2.2
tables==2.3.1
tables==3.0.0
matplotlib==1.3.1
openpyxl==1.6.2
xlsxwriter==0.4.6
Expand Down
23 changes: 12 additions & 11 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Installing pandas
Trying out pandas, no installation required!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The easiest way to start experimenting with pandas doesn't involve installing
The easiest way to start experimenting with pandas doesn't involve installing
pandas at all.

`Wakari <https://wakari.io>`__ is a free service that provides a hosted
Expand All @@ -35,10 +35,10 @@ pandas at all.
Simply create an account, and have access to pandas from within your brower via
an `IPython Notebook <http://ipython.org/notebook.html>`__ in a few minutes.

Installing pandas with Anaconda
Installing pandas with Anaconda
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Installing pandas and the rest of the `NumPy <http://www.numpy.org/>`__ and
Installing pandas and the rest of the `NumPy <http://www.numpy.org/>`__ and
`SciPy <http://www.scipy.org/>`__ stack can be a little
difficult for inexperienced users.

Expand All @@ -57,8 +57,8 @@ anything else, and without needing to wait for any software to be compiled.
Installation instructions for `Anaconda <http://docs.continuum.io/anaconda/>`__
`can be found here <http://docs.continuum.io/anaconda/install.html>`__.

A full list of the packages available as part of the
`Anaconda <http://docs.continuum.io/anaconda/>`__ distribution
A full list of the packages available as part of the
`Anaconda <http://docs.continuum.io/anaconda/>`__ distribution
`can be found here <http://docs.continuum.io/anaconda/pkg-docs.html>`__.

An additional advantage of installing with Anaconda is that you don't require
Expand All @@ -78,7 +78,7 @@ If you want to have more control on which packages, or have a limited internet
bandwidth, then installing pandas with
`Miniconda <http://conda.pydata.org/miniconda.html>`__ may be a better solution.

`Conda <http://conda.pydata.org/docs/>`__ is the package manager that the
`Conda <http://conda.pydata.org/docs/>`__ is the package manager that the
`Anaconda <http://docs.continuum.io/anaconda/>`__ distribution is built upon.
It is a package manager that is both cross-platform and language agnostic
(it can play a similar role to a pip and virtualenv combination).
Expand All @@ -90,15 +90,15 @@ minimal self contained Python installation, and then use the
First you will need `Conda <http://conda.pydata.org/docs/>`__ to be installed and
downloading and running the `Miniconda
<http://conda.pydata.org/miniconda.html>`__
will do this for you. The installer
will do this for you. The installer
`can be found here <http://conda.pydata.org/miniconda.html>`__

The next step is to create a new conda environment (these are analogous to a
virtualenv but they also allow you to specify precisely which Python version
to install also). Run the following commands from a terminal window::

conda create -n name_of_my_env python

This will create a minimal environment with only Python installed in it.
To put your self inside this environment run::

Expand All @@ -108,7 +108,7 @@ On Windows the command is::

activate name_of_my_env

The final step required is to install pandas. This can be done with the
The final step required is to install pandas. This can be done with the
following command::

conda install pandas
Expand Down Expand Up @@ -143,7 +143,7 @@ pandas can be installed via pip from
pip install pandas

This will likely require the installation of a number of dependencies,
including NumPy, will require a compiler to compile required bits of code,
including NumPy, will require a compiler to compile required bits of code,
and can take a few minutes to complete.

Installing using your Linux distribution's package manager.
Expand Down Expand Up @@ -259,6 +259,7 @@ Recommended Dependencies

* `numexpr <http://code.google.com/p/numexpr/>`__: for accelerating certain numerical operations.
``numexpr`` uses multiple cores as well as smart chunking and caching to achieve large speedups.
If installed, must be Version 2.1 or higher.

* `bottleneck <http://berkeleyanalytics.com/bottleneck>`__: for accelerating certain types of ``nan``
evaluations. ``bottleneck`` uses specialized cython routines to achieve large speedups.
Expand All @@ -277,7 +278,7 @@ Optional Dependencies
* `Cython <http://www.cython.org>`__: Only necessary to build development
version. Version 0.17.1 or higher.
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage. Version 3.0.0 or higher required.
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 0.8.1 or higher recommended.
* `matplotlib <http://matplotlib.sourceforge.net/>`__: for plotting
* `statsmodels <http://statsmodels.sourceforge.net/>`__
Expand Down
7 changes: 2 additions & 5 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2199,12 +2199,9 @@ the high performance HDF5 format using the excellent `PyTables
<http://www.pytables.org/>`__ library. See the :ref:`cookbook <cookbook.hdf>`
for some advanced strategies

.. note::
.. warning::

``PyTables`` 3.0.0 was recently released to enable support for Python 3.
pandas should be fully compatible (and previously written stores should be
backwards compatible) with all ``PyTables`` >= 2.3. For ``python >= 3.2``,
``pandas >= 0.12.0`` is required for compatibility.
As of version 0.15.0, pandas requires ``PyTables`` >= 3.0.0. Stores written with prior versions of pandas / ``PyTables`` >= 2.3 are fully compatible (this was the previous minimum ``PyTables`` required version).

.. ipython:: python
:suppress:
Expand Down
3 changes: 2 additions & 1 deletion doc/source/v0.15.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ users upgrade to this version.

- The ``Categorical`` type was integrated as a first-class pandas type, see :ref:`here <whatsnew_0150.cat>`
- Internal refactoring of the ``Index`` class to no longer sub-class ``ndarray``, see :ref:`Internal Refactoring <whatsnew_0150.refactoring>`
- New datetimelike properties accessor ``.dt`` for Series, see :ref:`Dateimelike Properties <whatsnew_0150.dt>`
- New datetimelike properties accessor ``.dt`` for Series, see :ref:`Datetimelike Properties <whatsnew_0150.dt>`
- dropping support for ``PyTables`` less than version 3.0.0, and ``numexpr`` less than version 2.1 (:issue:`7990`)

- :ref:`Other Enhancements <whatsnew_0150.enhancements>`

Expand Down
4 changes: 2 additions & 2 deletions pandas/computation/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def _check_engine(engine):
"if 'numexpr' is not installed")
else:
ne_version = numexpr.__version__
if ne_version < LooseVersion('2.0'):
if ne_version < LooseVersion('2.1'):
raise ImportError("'numexpr' version is %s, "
"must be >= 2.0" % ne_version)
"must be >= 2.1" % ne_version)


def _check_parser(parser):
Expand Down
7 changes: 6 additions & 1 deletion pandas/computation/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@

try:
import numexpr as ne
_NUMEXPR_INSTALLED = ne.__version__ >= LooseVersion('2.0')
ver = ne.__version__
_NUMEXPR_INSTALLED = ver >= LooseVersion('2.1')
if not _NUMEXPR_INSTALLED:
warnings.warn("The installed version of numexpr {ver} is not supported "
"in pandas and will be not be used".format(ver=ver), UserWarning)

except ImportError: # pragma: no cover
_NUMEXPR_INSTALLED = False

Expand Down
5 changes: 2 additions & 3 deletions pandas/computation/tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def _is_py3_complex_incompat(result, expected):

_good_arith_ops = com.difference(_arith_ops_syms, _special_case_arith_ops_syms)


class TestEvalNumexprPandas(tm.TestCase):

@classmethod
Expand Down Expand Up @@ -1515,9 +1514,9 @@ def testit():
except ImportError:
raise nose.SkipTest("no numexpr")
else:
if ne.__version__ < LooseVersion('2.0'):
if ne.__version__ < LooseVersion('2.1'):
with tm.assertRaisesRegexp(ImportError, "'numexpr' version is "
".+, must be >= 2.0"):
".+, must be >= 2.1"):
testit()
else:
testit()
Expand Down
Loading