refgenie / refgenconf

A Python object for standardized reference genome assets.
http://refgenie.databio.org
BSD 2-Clause "Simplified" License
3 stars 6 forks source link

New refgenconf requires python 3.8 #144

Open nsheff opened 1 year ago

nsheff commented 1 year ago
refgenconf/recipe.py:3: in <module>
    from functools import cached_property
E   ImportError: cannot import name 'cached_property' from 'functools' (/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/functools.py)

https://github.com/refgenie/refgenconf/blob/3f2ea03840b4e17b14dd57f0ae56109f40edf65f/refgenconf/recipe.py#L3

@stolarczyk Were you intending to make refgenconf depend on Python 3.8?

Or do you think of this as an optional thing that we should take out until 3.7 is deprecated?

stolarczyk commented 1 year ago

hmmm.. I don't remember what my intention was. But what you can do is:

  1. drop py3.7 support
  2. remove cached_property decorators to keep py3.7 support
  3. use @property in conjunction with @functools.lru_cache to keep py3.7 support

Since memoization is a "nice to have" feature I'd likely go for option 2.