Skip to content

Commit 9628816

Browse files
authored
bump pytables to 3.5.1 #24839 (#36683)
1 parent 90a6135 commit 9628816

File tree

9 files changed

+10
-49
lines changed

9 files changed

+10
-49
lines changed

ci/deps/azure-37-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
- numexpr=2.6.8
2121
- numpy=1.16.5
2222
- openpyxl=2.6.0
23-
- pytables=3.4.4
23+
- pytables=3.5.1
2424
- python-dateutil=2.7.3
2525
- pytz=2017.3
2626
- pyarrow=0.15

ci/deps/travis-37-locale.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313

1414
# pandas dependencies
1515
- beautifulsoup4
16-
- blosc=1.14.3
16+
- blosc=1.15.0
1717
- python-blosc
1818
- fastparquet=0.3.2
1919
- html5lib
@@ -30,7 +30,7 @@ dependencies:
3030
- pyarrow>=0.17
3131
- psycopg2=2.7
3232
- pymysql=0.7.11
33-
- pytables
33+
- pytables>=3.5.1
3434
- python-dateutil
3535
- pytz
3636
- scipy

doc/source/getting_started/install.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ PyTables 3.4.4 HDF5-based reading / writing
266266
SQLAlchemy 1.2.8 SQL support for databases other than sqlite
267267
SciPy 1.12.0 Miscellaneous statistical functions
268268
xlsxwriter 1.0.2 Excel writing
269-
blosc 1.14.3 Compression for HDF5
269+
blosc 1.15.0 Compression for HDF5
270270
fsspec 0.7.4 Handling files aside from local and HTTP
271271
fastparquet 0.3.2 Parquet reading / writing
272272
gcsfs 0.6.0 Google Cloud Storage access
@@ -280,7 +280,7 @@ psycopg2 2.7 PostgreSQL engine for sqlalchemy
280280
pyarrow 0.15.0 Parquet, ORC, and feather reading / writing
281281
pymysql 0.7.11 MySQL engine for sqlalchemy
282282
pyreadstat SPSS files (.sav) reading
283-
pytables 3.4.4 HDF5 reading / writing
283+
pytables 3.5.1 HDF5 reading / writing
284284
pyxlsb 1.0.6 Reading for xlsb files
285285
qtpy Clipboard I/O
286286
s3fs 0.4.0 Amazon S3 access

doc/source/whatsnew/v1.2.0.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Optional libraries below the lowest tested version may still work, but are not c
181181
+-----------------+-----------------+---------+
182182
| pymysql | 0.7.11 | X |
183183
+-----------------+-----------------+---------+
184-
| pytables | 3.4.4 | X |
184+
| pytables | 3.5.1 | X |
185185
+-----------------+-----------------+---------+
186186
| s3fs | 0.4.0 | |
187187
+-----------------+-----------------+---------+
@@ -331,6 +331,7 @@ I/O
331331
- Bug in :func:`LongTableBuilder.middle_separator` was duplicating LaTeX longtable entries in the List of Tables of a LaTeX document (:issue:`34360`)
332332
- Bug in :meth:`read_csv` with ``engine='python'`` truncating data if multiple items present in first row and first element started with BOM (:issue:`36343`)
333333
- Removed ``private_key`` and ``verbose`` from :func:`read_gbq` as they are no longer supported in ``pandas-gbq`` (:issue:`34654`, :issue:`30200`)
334+
- Bumped minimum pytables version to 3.5.1 to avoid a ``ValueError`` in :meth:`read_hdf` (:issue:`24839`)
334335

335336
Plotting
336337
^^^^^^^^

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ dependencies:
100100
- python-snappy # required by pyarrow
101101

102102
- pyqt>=5.9.2 # pandas.read_clipboard
103-
- pytables>=3.4.4 # pandas.read_hdf, DataFrame.to_hdf
103+
- pytables>=3.5.1 # pandas.read_hdf, DataFrame.to_hdf
104104
- s3fs>=0.4.0 # file IO when using 's3://...' path
105105
- fsspec>=0.7.4 # for generic remote file operations
106106
- gcsfs>=0.6.0 # file IO when using 'gcs://...' path

pandas/tests/io/pytables/test_complex.py

-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
import numpy as np
44
import pytest
55

6-
import pandas.util._test_decorators as td
7-
86
import pandas as pd
97
from pandas import DataFrame, Series
108
import pandas._testing as tm
119
from pandas.tests.io.pytables.common import ensure_clean_path, ensure_clean_store
1210

1311
from pandas.io.pytables import read_hdf
1412

15-
# GH10447
16-
1713

1814
def test_complex_fixed(setup_path):
1915
df = DataFrame(
@@ -62,7 +58,6 @@ def test_complex_table(setup_path):
6258
tm.assert_frame_equal(df, reread)
6359

6460

65-
@td.xfail_non_writeable
6661
def test_complex_mixed_fixed(setup_path):
6762
complex64 = np.array(
6863
[1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j], dtype=np.complex64

pandas/tests/io/pytables/test_store.py

+1-21
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,6 @@ def test_put_integer(self, setup_path):
909909
df = DataFrame(np.random.randn(50, 100))
910910
self._check_roundtrip(df, tm.assert_frame_equal, setup_path)
911911

912-
@td.xfail_non_writeable
913912
def test_put_mixed_type(self, setup_path):
914913
df = tm.makeTimeDataFrame()
915914
df["obj1"] = "foo"
@@ -1518,9 +1517,7 @@ def test_to_hdf_with_min_itemsize(self, setup_path):
15181517
pd.read_hdf(path, "ss4"), pd.concat([df["B"], df2["B"]])
15191518
)
15201519

1521-
@pytest.mark.parametrize(
1522-
"format", [pytest.param("fixed", marks=td.xfail_non_writeable), "table"]
1523-
)
1520+
@pytest.mark.parametrize("format", ["fixed", "table"])
15241521
def test_to_hdf_errors(self, format, setup_path):
15251522

15261523
data = ["\ud800foo"]
@@ -1956,7 +1953,6 @@ def test_pass_spec_to_storer(self, setup_path):
19561953
with pytest.raises(TypeError):
19571954
store.select("df", where=[("columns=A")])
19581955

1959-
@td.xfail_non_writeable
19601956
def test_append_misc(self, setup_path):
19611957

19621958
with ensure_clean_store(setup_path) as store:
@@ -2164,14 +2160,6 @@ def test_unimplemented_dtypes_table_columns(self, setup_path):
21642160
with pytest.raises(TypeError):
21652161
store.append("df_unimplemented", df)
21662162

2167-
@td.xfail_non_writeable
2168-
@pytest.mark.skipif(
2169-
LooseVersion(np.__version__) == LooseVersion("1.15.0"),
2170-
reason=(
2171-
"Skipping pytables test when numpy version is "
2172-
"exactly equal to 1.15.0: gh-22098"
2173-
),
2174-
)
21752163
def test_calendar_roundtrip_issue(self, setup_path):
21762164

21772165
# 8591
@@ -2405,7 +2393,6 @@ def test_float_index(self, setup_path):
24052393
s = Series(np.random.randn(10), index=index)
24062394
self._check_roundtrip(s, tm.assert_series_equal, path=setup_path)
24072395

2408-
@td.xfail_non_writeable
24092396
def test_tuple_index(self, setup_path):
24102397

24112398
# GH #492
@@ -2418,7 +2405,6 @@ def test_tuple_index(self, setup_path):
24182405
simplefilter("ignore", pd.errors.PerformanceWarning)
24192406
self._check_roundtrip(DF, tm.assert_frame_equal, path=setup_path)
24202407

2421-
@td.xfail_non_writeable
24222408
@pytest.mark.filterwarnings("ignore::pandas.errors.PerformanceWarning")
24232409
def test_index_types(self, setup_path):
24242410

@@ -2480,7 +2466,6 @@ def test_timeseries_preepoch(self, setup_path):
24802466
except OverflowError:
24812467
pytest.skip("known failer on some windows platforms")
24822468

2483-
@td.xfail_non_writeable
24842469
@pytest.mark.parametrize(
24852470
"compression", [False, pytest.param(True, marks=td.skip_if_windows_python_3)]
24862471
)
@@ -2514,7 +2499,6 @@ def test_frame(self, compression, setup_path):
25142499
# empty
25152500
self._check_roundtrip(df[:0], tm.assert_frame_equal, path=setup_path)
25162501

2517-
@td.xfail_non_writeable
25182502
def test_empty_series_frame(self, setup_path):
25192503
s0 = Series(dtype=object)
25202504
s1 = Series(name="myseries", dtype=object)
@@ -2528,7 +2512,6 @@ def test_empty_series_frame(self, setup_path):
25282512
self._check_roundtrip(df1, tm.assert_frame_equal, path=setup_path)
25292513
self._check_roundtrip(df2, tm.assert_frame_equal, path=setup_path)
25302514

2531-
@td.xfail_non_writeable
25322515
@pytest.mark.parametrize(
25332516
"dtype", [np.int64, np.float64, object, "m8[ns]", "M8[ns]"]
25342517
)
@@ -2614,7 +2597,6 @@ def test_store_series_name(self, setup_path):
26142597
recons = store["series"]
26152598
tm.assert_series_equal(recons, series)
26162599

2617-
@td.xfail_non_writeable
26182600
@pytest.mark.parametrize(
26192601
"compression", [False, pytest.param(True, marks=td.skip_if_windows_python_3)]
26202602
)
@@ -4182,7 +4164,6 @@ def test_pytables_native2_read(self, datapath, setup_path):
41824164
d1 = store["detector"]
41834165
assert isinstance(d1, DataFrame)
41844166

4185-
@td.xfail_non_writeable
41864167
def test_legacy_table_fixed_format_read_py2(self, datapath, setup_path):
41874168
# GH 24510
41884169
# legacy table with fixed format written in Python 2
@@ -4356,7 +4337,6 @@ def test_unicode_longer_encoded(self, setup_path):
43564337
result = store.get("df")
43574338
tm.assert_frame_equal(result, df)
43584339

4359-
@td.xfail_non_writeable
43604340
def test_store_datetime_mixed(self, setup_path):
43614341

43624342
df = DataFrame({"a": [1, 2, 3], "b": [1.0, 2.0, 3.0], "c": ["a", "b", "c"]})

pandas/util/_test_decorators.py

-15
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,6 @@ def safe_import(mod_name: str, min_version: Optional[str] = None):
7575
return False
7676

7777

78-
# TODO:
79-
# remove when gh-24839 is fixed.
80-
# this affects numpy 1.16 and pytables 3.4.4
81-
tables = safe_import("tables")
82-
xfail_non_writeable = pytest.mark.xfail(
83-
tables
84-
and LooseVersion(np.__version__) >= LooseVersion("1.16")
85-
and LooseVersion(tables.__version__) < LooseVersion("3.5.1"),
86-
reason=(
87-
"gh-25511, gh-24839. pytables needs a "
88-
"release beyond 3.4.4 to support numpy 1.16.x"
89-
),
90-
)
91-
92-
9378
def _skip_if_no_mpl():
9479
mod = safe_import("matplotlib")
9580
if mod:

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fastparquet>=0.3.2
6767
pyarrow>=0.15.0
6868
python-snappy
6969
pyqt5>=5.9.2
70-
tables>=3.4.4
70+
tables>=3.5.1
7171
s3fs>=0.4.0
7272
fsspec>=0.7.4
7373
gcsfs>=0.6.0

0 commit comments

Comments
 (0)