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

gh-101815: fix functools.cached_property key sharing doc warnings #101816

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

carljm
Copy link
Contributor

@carljm carljm commented Feb 10, 2023

@carljm
Copy link
Contributor Author

carljm commented Feb 10, 2023

Tbh I am not sure it even makes sense to mention the added memory usage from __dict__ access at all. It's a bit strange to mention that and then immediately recommend @cache as an alternative, which has a much higher likelihood of causing excessive memory use, since it creates an unbounded cache which indefinitely holds strong references to every instance the cached property is ever accessed on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

functools.cached_property doc warnings about key-sharing are obsolete
2 participants