Control: tags -1 patch
Control: severity -1 serious
(pandas 0.25 is now in unstable)

The attached fixes this bug.

(Though as both this upstream and pandas read_feather() have switched to pyarrow, in the longer term you might want to package that instead.)
Description: Be compatible with pandas 0.25

Author: Rebecca N. Palmer <rebecca_pal...@zoho.com>
Bug-Debian: https://bugs.debian.org/943925
Forwarded: not-needed (upstream have switched to pyarrow)

--- python-feather-format-0.3.1+dfsg1.orig/feather/api.py
+++ python-feather-format-0.3.1+dfsg1/feather/api.py
@@ -15,6 +15,7 @@
 import six
 from distutils.version import LooseVersion
 import pandas as pd
+import pandas.api.types
 from feather.compat import pdapi
 
 import feather.ext as ext
@@ -40,7 +41,7 @@ def write_dataframe(df, path):
         col = df.iloc[:, i]
 
         if pdapi.is_object_dtype(col):
-            inferred_type = pd.lib.infer_dtype(col)
+            inferred_type = pandas.api.types.infer_dtype(col)
             msg = ("cannot serialize column {n} "
                    "named {name} with dtype {dtype}".format(
                        n=i, name=name, dtype=inferred_type))
@@ -48,7 +49,7 @@ def write_dataframe(df, path):
             if inferred_type in ['mixed']:
 
                 # allow columns with nulls + an inferable type
-                inferred_type = pd.lib.infer_dtype(col[col.notnull()])
+                inferred_type = pandas.api.types.infer_dtype(col[col.notnull()])
                 if inferred_type in ['mixed']:
                     raise ValueError(msg)
 
--- python-feather-format-0.3.1+dfsg1.orig/feather/tests/test_reader.py
+++ python-feather-format-0.3.1+dfsg1/feather/tests/test_reader.py
@@ -361,8 +361,8 @@ class TestFeatherReader(unittest.TestCas
 
         # period
         df = pd.DataFrame({'a': pd.period_range('2013', freq='M', periods=3)})
-        self._assert_error_on_write(df, ValueError)
+        self._assert_error_on_write(df, (feather.FeatherError,ValueError))
 
         # non-strings
         df = pd.DataFrame({'a': ['a', 1, 2.0]})
-        self._assert_error_on_write(df, ValueError)
+        self._assert_error_on_write(df, (feather.FeatherError,ValueError))

Reply via email to