From 30e7e49f01856146fff157c1726f3ce2de4d463f Mon Sep 17 00:00:00 2001 From: Maximilien Colange Date: Wed, 3 Jan 2024 05:34:05 +0100 Subject: [PATCH] WIP refix #198 --- patsy/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patsy/util.py b/patsy/util.py index 71d0404..d25f969 100644 --- a/patsy/util.py +++ b/patsy/util.py @@ -53,7 +53,7 @@ import warnings with warnings.catch_warnings(record=True) as w: _pandas_is_categorical_dtype(int) - if len(w) > 0 and issubclass(w[-1].category, FutureWarning): + if len(w) > 0 and issubclass(w[-1].category, (DeprecationWarning, FutureWarning)): _pandas_is_categorical_dtype = None else: _pandas_is_categorical_dtype = lambda x: isinstance(x, pandas.CategoricalDType)