On 06.11.20 00:37, Diane Trout wrote: > On Thu, 2020-11-05 at 14:59 -0800, Diane Trout wrote: >> On Thu, 2020-11-05 at 21:08 +0100, Andreas Tille wrote: >>> Control: tags -1 help >>> >>> Hi Diane and Steffen, >>> >>> I fixed the Build-Depends in this package which leads to the >>> effect that >>> >>> a) the Build-time test is run >>> b) shows the same errors as the autopkgtest >> I went ahead and filed an upstream bug asking for any advice about >> the >> unexpected warning. >> >> https://github.com/theislab/anndata/issues/443 > I discovered anndata is having trouble with the version of pandas we're > shipping. This patch fixes the test failure, though I thought I'd ask > upstream if they want to do this, or be more accepting of warnings. > (I'm not sure which versions of pandas they want to support). > > Should we wait for upstream or just go ahead and add the patches to our > packaging?
Nice work! Thank you for spotting that. As much as I want anndata to be ready, IIRC it is mostly for bcbio and there are also some other packages still pending. I hence suggest to strengthen our ties with upstream and wait for a new release. Best, Steffen > --- anndata/_core/anndata.py 2020-11-05 12:23:54.976471806 -0800 > +++ /run/schroot/mount/unstable-amd64-sbuild-6f63c09f-36e0-4302-9409- > 6689c5b05354/build/python-anndata-exfcES/python-anndata- > 0.7.4+ds/anndata/_core/anndata.py 2020-11-05 15:28:33.517496264 > -0800 > @@ -19,5 +19,5 @@ > from numpy import ma > import pandas as pd > -from pandas.api.types import is_string_dtype, is_categorical > +from pandas.api.types import is_string_dtype, is_categorical_dtype > from scipy import sparse > from scipy.sparse import issparse > @@ -1089,8 +1089,8 @@ > > def _remove_unused_categories(self, df_full, df_sub, uns): > - from pandas.api.types import is_categorical > + from pandas.api.types import is_categorical_dtype > > for k in df_full: > - if not is_categorical(df_full[k]): > + if not is_categorical_dtype(df_full[k]): > continue > all_categories = df_full[k].cat.categories > @@ -1190,5 +1190,5 @@ > key > for key in df.columns > - if is_string_dtype(df[key]) and not > is_categorical(df[key]) > + if is_string_dtype(df[key]) and not > is_categorical_dtype(df[key]) > ] > for key in string_cols: >

