From: Debian Python Team <team+python@tracker.debian.org>
Date: Sat, 5 Nov 2022 17:19:53 +0200
Subject: Be compatible with pandas 0.25

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/943925
Forwarded: not-needed (upstream have switched to pyarrow)
---
 feather/api.py               | 5 +++--
 feather/tests/test_reader.py | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/feather/api.py b/feather/api.py
index c7b4a21..6dca21f 100644
--- a/feather/api.py
+++ b/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)
 
diff --git a/feather/tests/test_reader.py b/feather/tests/test_reader.py
index 9bdd1b3..327b875 100644
--- a/feather/tests/test_reader.py
+++ b/feather/tests/test_reader.py
@@ -361,8 +361,8 @@ class TestFeatherReader(unittest.TestCase):
 
         # 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))
