Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New refgenconf requires python 3.8 #144

Open
nsheff opened this issue Oct 3, 2022 · 1 comment
Open

New refgenconf requires python 3.8 #144

nsheff opened this issue Oct 3, 2022 · 1 comment

Comments

@nsheff
Copy link
Contributor

nsheff commented Oct 3, 2022

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)

from functools import cached_property

@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?

nsheff added a commit that referenced this issue Oct 3, 2022
@stolarczyk
Copy link
Contributor

stolarczyk commented Oct 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants