As @Mariatta pointed out in #8881 (comment) , we might be able to replace lazyproperty with cached_property that is new in Python 3.8. We also need to figure out the best way to support this for Python<=3.7 or wait until our Python minversion is 3.8.