Skip to content

Commit

Permalink
bump pytables to 3.5.1 pandas-dev#24839
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchenli committed Sep 27, 2020
1 parent 027f365 commit 098b32d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 36 deletions.
2 changes: 1 addition & 1 deletion doc/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ psycopg2 2.7 PostgreSQL engine for sqlalchemy
pyarrow 0.15.0 Parquet, ORC, and feather reading / writing
pymysql 0.7.11 MySQL engine for sqlalchemy
pyreadstat SPSS files (.sav) reading
pytables 3.4.4 HDF5 reading / writing
pytables 3.5.1 HDF5 reading / writing
pyxlsb 1.0.6 Reading for xlsb files
qtpy Clipboard I/O
s3fs 0.4.0 Amazon S3 access
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v1.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Optional libraries below the lowest tested version may still work, but are not c
+-----------------+-----------------+---------+
| pymysql | 0.7.11 | X |
+-----------------+-----------------+---------+
| pytables | 3.4.4 | X |
| pytables | 3.5.1 | X |
+-----------------+-----------------+---------+
| s3fs | 0.4.0 | |
+-----------------+-----------------+---------+
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/io/pytables/test_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import numpy as np
import pytest

import pandas.util._test_decorators as td

import pandas as pd
from pandas import DataFrame, Series
import pandas._testing as tm
from pandas.tests.io.pytables.common import ensure_clean_path, ensure_clean_store

from pandas.io.pytables import read_hdf

# GH10447


def test_complex_fixed(setup_path):
df = DataFrame(
Expand Down Expand Up @@ -62,7 +58,6 @@ def test_complex_table(setup_path):
tm.assert_frame_equal(df, reread)


@td.xfail_non_writeable
def test_complex_mixed_fixed(setup_path):
complex64 = np.array(
[1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j], dtype=np.complex64
Expand Down
15 changes: 1 addition & 14 deletions pandas/tests/io/pytables/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ def test_put_integer(self, setup_path):
df = DataFrame(np.random.randn(50, 100))
self._check_roundtrip(df, tm.assert_frame_equal, setup_path)

@td.xfail_non_writeable
def test_put_mixed_type(self, setup_path):
df = tm.makeTimeDataFrame()
df["obj1"] = "foo"
Expand Down Expand Up @@ -1518,9 +1517,7 @@ def test_to_hdf_with_min_itemsize(self, setup_path):
pd.read_hdf(path, "ss4"), pd.concat([df["B"], df2["B"]])
)

@pytest.mark.parametrize(
"format", [pytest.param("fixed", marks=td.xfail_non_writeable), "table"]
)
@pytest.mark.parametrize("format", ["fixed", "table"])
def test_to_hdf_errors(self, format, setup_path):

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

@td.xfail_non_writeable
def test_append_misc(self, setup_path):

with ensure_clean_store(setup_path) as store:
Expand Down Expand Up @@ -2164,7 +2160,6 @@ def test_unimplemented_dtypes_table_columns(self, setup_path):
with pytest.raises(TypeError):
store.append("df_unimplemented", df)

@td.xfail_non_writeable
@pytest.mark.skipif(
LooseVersion(np.__version__) == LooseVersion("1.15.0"),
reason=(
Expand Down Expand Up @@ -2399,7 +2394,6 @@ def test_float_index(self, setup_path):
s = Series(np.random.randn(10), index=index)
self._check_roundtrip(s, tm.assert_series_equal, path=setup_path)

@td.xfail_non_writeable
def test_tuple_index(self, setup_path):

# GH #492
Expand All @@ -2412,7 +2406,6 @@ def test_tuple_index(self, setup_path):
simplefilter("ignore", pd.errors.PerformanceWarning)
self._check_roundtrip(DF, tm.assert_frame_equal, path=setup_path)

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

Expand Down Expand Up @@ -2474,7 +2467,6 @@ def test_timeseries_preepoch(self, setup_path):
except OverflowError:
pytest.skip("known failer on some windows platforms")

@td.xfail_non_writeable
@pytest.mark.parametrize(
"compression", [False, pytest.param(True, marks=td.skip_if_windows_python_3)]
)
Expand Down Expand Up @@ -2508,7 +2500,6 @@ def test_frame(self, compression, setup_path):
# empty
self._check_roundtrip(df[:0], tm.assert_frame_equal, path=setup_path)

@td.xfail_non_writeable
def test_empty_series_frame(self, setup_path):
s0 = Series(dtype=object)
s1 = Series(name="myseries", dtype=object)
Expand All @@ -2522,7 +2513,6 @@ def test_empty_series_frame(self, setup_path):
self._check_roundtrip(df1, tm.assert_frame_equal, path=setup_path)
self._check_roundtrip(df2, tm.assert_frame_equal, path=setup_path)

@td.xfail_non_writeable
@pytest.mark.parametrize(
"dtype", [np.int64, np.float64, object, "m8[ns]", "M8[ns]"]
)
Expand Down Expand Up @@ -2608,7 +2598,6 @@ def test_store_series_name(self, setup_path):
recons = store["series"]
tm.assert_series_equal(recons, series)

@td.xfail_non_writeable
@pytest.mark.parametrize(
"compression", [False, pytest.param(True, marks=td.skip_if_windows_python_3)]
)
Expand Down Expand Up @@ -4176,7 +4165,6 @@ def test_pytables_native2_read(self, datapath, setup_path):
d1 = store["detector"]
assert isinstance(d1, DataFrame)

@td.xfail_non_writeable
def test_legacy_table_fixed_format_read_py2(self, datapath, setup_path):
# GH 24510
# legacy table with fixed format written in Python 2
Expand Down Expand Up @@ -4350,7 +4338,6 @@ def test_unicode_longer_encoded(self, setup_path):
result = store.get("df")
tm.assert_frame_equal(result, df)

@td.xfail_non_writeable
def test_store_datetime_mixed(self, setup_path):

df = DataFrame({"a": [1, 2, 3], "b": [1.0, 2.0, 3.0], "c": ["a", "b", "c"]})
Expand Down
15 changes: 0 additions & 15 deletions pandas/util/_test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,6 @@ def safe_import(mod_name: str, min_version: Optional[str] = None):
return False


# TODO:
# remove when gh-24839 is fixed.
# this affects numpy 1.16 and pytables 3.4.4
tables = safe_import("tables")
xfail_non_writeable = pytest.mark.xfail(
tables
and LooseVersion(np.__version__) >= LooseVersion("1.16")
and LooseVersion(tables.__version__) < LooseVersion("3.5.1"),
reason=(
"gh-25511, gh-24839. pytables needs a "
"release beyond 3.4.4 to support numpy 1.16.x"
),
)


def _skip_if_no_mpl():
mod = safe_import("matplotlib")
if mod:
Expand Down

0 comments on commit 098b32d

Please sign in to comment.