xhochy / fletcher

Pandas ExtensionDType/Array backed by Apache Arrow

Home Page:https://fletcher.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyArrow has no attribute duration

mrocklin opened this issue · comments

I suspect that we need to update the pyarrow minimum version in the conda-forge recipe. Things work if I also update pyarrow.

(live) mrocklin@carbon-7:~$ conda install -c conda-forge fletcher
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.
In [1]: import fletcher                                                                                               
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-405c154a937e> in <module>
----> 1 import fletcher

~/miniconda/envs/live/lib/python3.8/site-packages/fletcher/__init__.py in <module>
      1 import pkg_resources
      2 
----> 3 from .base import (
      4     FletcherBaseArray,
      5     FletcherBaseDtype,

~/miniconda/envs/live/lib/python3.8/site-packages/fletcher/base.py in <module>
     61     # Use any list type here, only LIST is important
     62     pa.list_(pa.string()).id: list,
---> 63     pa.duration("ns").id: datetime.timedelta,
     64 }
     65 

AttributeError: module 'pyarrow' has no attribute 'duration'

In [2]: import pyarrow                                                                                                

In [3]: pyarrow.__version__                                                                                           
Out[3]: '0.15.1'

Thanks for finding this! We actually only test with the latest versions and also quite often use features from the latest versions, so we should be quite strict on them. Opened a PR over at conda-forge/fletcher-feedstock#8