8000 gh-85160: Reduce memory usage of `singledispatchmethod` when owner instances cannot be weakref'd by AlexWaygood · Pull Request #107706 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-85160: Reduce memory usage of singledispatchmethod when owner instances cannot be weakref'd #107706

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

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-85160: Reduce memory usage of singledispatchmethod when instance…
…s cannot be weakref'd
  • Loading branch information
AlexWaygood committed Aug 7, 2023
commit bfce05c281b571211e5acb7bec9d50f9969a37af
1 change: 1 addition & 0 deletions Lib/functools.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ def __get__(self, obj, cls=None):
_method = self._method_cache[obj]
except TypeError:
self._all_weakrefable_instances = False
del self._method_cache
except KeyError:
pass
else:
Expand Down
0