[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

Serhiy Storchaka report at bugs.python.org
Tue Aug 3 12:05:14 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

> It should use "(id(instance), instance)" rather than just "instance" as the key.

It should use a dict with id(instance) as a key and instance as value. An instance can be non-hashable.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43468>
_______________________________________


More information about the Python-bugs-list mailing list