From 87cf4a6f61fb5d58f85435f2c3ecb0f8ec6e4415 Mon Sep 17 00:00:00 2001 From: "Yang, Bo" Date: Tue, 30 Apr 2024 21:31:59 -0700 Subject: [PATCH] Allow for inheriting from proxy The code is copied from https://github.com/GrahamDumpleton/wrapt/blob/5c0997c0b5be36da5f621c3473c95f9efe14891e/src/wrapt/wrappers.py#L136-L138 --- src/lazy_object_proxy/simple.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lazy_object_proxy/simple.py b/src/lazy_object_proxy/simple.py index abf0587..990cd8a 100644 --- a/src/lazy_object_proxy/simple.py +++ b/src/lazy_object_proxy/simple.py @@ -1,4 +1,5 @@ import operator +import sys from .compat import string_types from .compat import with_metaclass @@ -257,3 +258,7 @@ def __reduce_ex__(self, protocol): from .utils import __await__ __aiter__, __anext__, __await__, __aenter__, __aexit__ # noqa + + if sys.hexversion >= 0x03070000: + def __mro_entries__(self, _): + return (self.__wrapped__,)