astropy / astropy/astropy

MNT: Replace lazyproperty with cached_property in Python 3.8

Open
#9,036 16 comments 0 reactions 0 assignees View on GitHub
needs-discussion Refactoring utils zzz :zzz: Python3.8
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 18h
Merged PRs (30d)
74

Description

As @Mariatta pointed out in https://github.com/astropy/astropy/pull/8881#issuecomment-513956394 , we might be able to replace `lazyproperty` with [cached_property](https://docs.python.org/3.8/library/functools.html?highlight=cached_property#functools.cached_property) that is new in Python 3.8. We also need to figure out the best way to support this for Python<=3.7 or wait until our Python minversion is 3.8.

Contributor guide

Open the contributing guide

Research direction

Review PR #8881 and the Python 3.8 functools.cached_property documentation first. Determine how support for Python <=3.7 should work, or whether the project should wait until Python 3.8 is the minimum version. Done means an agreed replacement strategy that covers the supported Python versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.