question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MNT: Replace lazyproperty with cached_property in Python 3.8

See original GitHub issue

As @Mariatta pointed out in https://github.com/astropy/astropy/pull/8881#issuecomment-513956394 , we might be able to replace lazyproperty with 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.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

6reactions
mhvkcommented, Jul 22, 2019

Hmm, from a quick look, cached_property does not have the ability to have a setter or deleter - I definitely use the latter in my code. But perhaps we can upstream our implementations for those.

1reaction
mhvkcommented, Sep 3, 2021

Indeed, though as discussed above, we have to be really careful, since the behaviour is rather different. Definitely not a search-and-replace!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python's new `functools.cached_property` bug or limitation?
I've been using a similar lazyprop decorator based on Beazley's cookbook (code below), but when I replace by the builtin, I get problems....
Read more >
Issue 43468: functools.cached_property incorrectly locks the ...
I've been giving thought to implementing the locking on the instance or per instance instead, and there are bad and worse ideas like...
Read more >
Package List — Spack 0.20.0.dev0 documentation
Rather than try to climb an ever-growing mountain, ACPID now lets YOU ... A package universe and a request to install, remove, or...
Read more >
Source Packages in "jammy", Subsection misc
... azure-data-lake-store-python (0.0.52-1) [universe]; azure-functions-devops-build (0.0.22-5) ... docker-systemctl-replacement (1.4.4181-1.1) [universe] ...
Read more >
Compare Packages Between Distributions
azure-cosmos-table-python 1.0.5+git20191025-5 ... bison-doc 1:3.8.2+repack-1 bist 0.5.2-1.2 bit-babbler 0.8 ... docker-systemctl-replacement 1.4.4181-1.1
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found