zmievsa / cached_classproperty

cached_property for class properties instead of instance properties
MIT License
7 stars 3 forks source link

Add `cached_staticproperty` and fix `cached_classproperty` in subclasses (fix #1) #3

Closed Atry closed 11 months ago

Atry commented 11 months ago

This PR is stacked on top of #2, and it takes care of the case where the owner is a subclass of where the property is defined by putting the cached value in a WeakKeyDictionary, so that this property would not prevent subclass from being garbage collected.

This PR should fix #1.

Atry commented 11 months ago

@Ovsyanka83 Could you review this PR, please?

zmievsa commented 11 months ago

Big Thanks! I have been too busy and this entire thread has gotten too low in my todolist. Approved. Let's see how tests run