[issue43468] functools.cached_property locking is plain wrong.

2021-03-12 Thread Antti Haapala
Antti Haapala added the comment: I've been giving thought to implementing the locking on the instance or per instance instead, and there are bad and worse ideas like inserting per (instance, descriptor) into the instance `__dict__`, guarded by the per-descriptor lock; using a per-descriptor

[issue43468] functools.cached_property locking is plain wrong.

2021-03-11 Thread Antti Haapala
Antti Haapala added the comment: Django was going to replace their cached_property by the standard library one https://code.djangoproject.com/ticket/30949 -- ___ Python tracker _

[issue43468] functools.cached_property locking is plain wrong.

2021-03-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue43468] functools.cached_property locking is plain wrong.

2021-03-10 Thread Antti Haapala
New submission from Antti Haapala : The locking on functools.cached_property (https://github.com/python/cpython/blob/87f649a409da9d99682e78a55a83fc43225a8729/Lib/functools.py#L934) as it was written is completely undesirable for I/O bound values, parallel processing. Instead of protecting the