-
-
Notifications
You must be signed in to change notification settings - Fork 290
Remove @cached
decorator and CACHE_MANAGER
#2072
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
Remove @cached
decorator and CACHE_MANAGER
#2072
Conversation
Use `@cached_property` from the stdlib
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2072 +/- ##
==========================================
- Coverage 92.82% 92.78% -0.05%
==========================================
Files 95 94 -1
Lines 11066 11043 -23
==========================================
- Hits 10272 10246 -26
- Misses 794 797 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing !
I'm wondering if this should go in 2.15.2 |
I removed |
Ha ok, we're using it elsewhere too. I thought it was only used in astroid and replaced by a proper cache on the fly. Make sense ! |
Type of Changes
Description
See discussion in #1780, much of the remaining leaking was due to having an inferior version of the stdlib's
@cached_property
. There's no reason to maintain a poorer version ourselves.Closes #1780
Benchmark
From the script linked here, I now see:
While "Dicts INC" isn't perfect (isn't 0), I think we've finished all the work we've identified so far, and I'm okay closing the linked issue.