Skip to content

Commit 1eb9955

Browse files
committed
Merge pull request #7994 from jreback/pytables_api
COMPAT: change pytables to use 3.0.0 API (GH7990)
2 parents dd635ed + 16b3492 commit 1eb9955

File tree

9 files changed

+61
-91
lines changed

9 files changed

+61
-91
lines changed

ci/requirements-2.7.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ numpy==1.8.1
55
cython==0.19.1
66
bottleneck==0.6.0
77
numexpr==2.2.2
8-
tables==2.3.1
8+
tables==3.0.0
99
matplotlib==1.3.1
1010
openpyxl==1.6.2
1111
xlsxwriter==0.4.6

doc/source/install.rst

+12-11
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Installing pandas
2626
Trying out pandas, no installation required!
2727
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2828

29-
The easiest way to start experimenting with pandas doesn't involve installing
29+
The easiest way to start experimenting with pandas doesn't involve installing
3030
pandas at all.
3131

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

38-
Installing pandas with Anaconda
38+
Installing pandas with Anaconda
3939
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4040

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

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

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

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

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

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

100100
conda create -n name_of_my_env python
101-
101+
102102
This will create a minimal environment with only Python installed in it.
103103
To put your self inside this environment run::
104104

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

109109
activate name_of_my_env
110110

111-
The final step required is to install pandas. This can be done with the
111+
The final step required is to install pandas. This can be done with the
112112
following command::
113113

114114
conda install pandas
@@ -143,7 +143,7 @@ pandas can be installed via pip from
143143
pip install pandas
144144

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

149149
Installing using your Linux distribution's package manager.
@@ -259,6 +259,7 @@ Recommended Dependencies
259259

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

263264
* `bottleneck <http://berkeleyanalytics.com/bottleneck>`__: for accelerating certain types of ``nan``
264265
evaluations. ``bottleneck`` uses specialized cython routines to achieve large speedups.
@@ -277,7 +278,7 @@ Optional Dependencies
277278
* `Cython <http://www.cython.org>`__: Only necessary to build development
278279
version. Version 0.17.1 or higher.
279280
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions
280-
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage
281+
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage. Version 3.0.0 or higher required.
281282
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 0.8.1 or higher recommended.
282283
* `matplotlib <http://matplotlib.sourceforge.net/>`__: for plotting
283284
* `statsmodels <http://statsmodels.sourceforge.net/>`__

doc/source/io.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -2199,12 +2199,9 @@ the high performance HDF5 format using the excellent `PyTables
21992199
<http://www.pytables.org/>`__ library. See the :ref:`cookbook <cookbook.hdf>`
22002200
for some advanced strategies
22012201

2202-
.. note::
2202+
.. warning::
22032203

2204-
``PyTables`` 3.0.0 was recently released to enable support for Python 3.
2205-
pandas should be fully compatible (and previously written stores should be
2206-
backwards compatible) with all ``PyTables`` >= 2.3. For ``python >= 3.2``,
2207-
``pandas >= 0.12.0`` is required for compatibility.
2204+
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).
22082205

22092206
.. ipython:: python
22102207
:suppress:

doc/source/v0.15.0.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ users upgrade to this version.
1111

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

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

pandas/computation/eval.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ def _check_engine(engine):
4242
"if 'numexpr' is not installed")
4343
else:
4444
ne_version = numexpr.__version__
45-
if ne_version < LooseVersion('2.0'):
45+
if ne_version < LooseVersion('2.1'):
4646
raise ImportError("'numexpr' version is %s, "
47-
"must be >= 2.0" % ne_version)
47+
"must be >= 2.1" % ne_version)
4848

4949

5050
def _check_parser(parser):

pandas/computation/expressions.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313

1414
try:
1515
import numexpr as ne
16-
_NUMEXPR_INSTALLED = ne.__version__ >= LooseVersion('2.0')
16+
ver = ne.__version__
17+
_NUMEXPR_INSTALLED = ver >= LooseVersion('2.1')
18+
if not _NUMEXPR_INSTALLED:
19+
warnings.warn("The installed version of numexpr {ver} is not supported "
20+
"in pandas and will be not be used".format(ver=ver), UserWarning)
21+
1722
except ImportError: # pragma: no cover
1823
_NUMEXPR_INSTALLED = False
1924

pandas/computation/tests/test_eval.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def _is_py3_complex_incompat(result, expected):
8181

8282
_good_arith_ops = com.difference(_arith_ops_syms, _special_case_arith_ops_syms)
8383

84-
8584
class TestEvalNumexprPandas(tm.TestCase):
8685

8786
@classmethod
@@ -1515,9 +1514,9 @@ def testit():
15151514
except ImportError:
15161515
raise nose.SkipTest("no numexpr")
15171516
else:
1518-
if ne.__version__ < LooseVersion('2.0'):
1517+
if ne.__version__ < LooseVersion('2.1'):
15191518
with tm.assertRaisesRegexp(ImportError, "'numexpr' version is "
1520-
".+, must be >= 2.0"):
1519+
".+, must be >= 2.1"):
15211520
testit()
15221521
else:
15231522
testit()

0 commit comments

Comments
 (0)