From 64713ce2861cdb9819c01d46c45b14ee6413fd89 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 22 Aug 2025 11:40:53 +0200 Subject: [PATCH] Not all things have a __dict__, skip update for now if the case --- src/spatch/backend_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spatch/backend_system.py b/src/spatch/backend_system.py index 147225f..87f3989 100644 --- a/src/spatch/backend_system.py +++ b/src/spatch/backend_system.py @@ -920,7 +920,7 @@ def new_func(*args, **kwargs): new_func.__kwdefaults__ = self.__kwdefaults__ = getattr(func, "__kwdefaults__", None) new_func.__annotations__ = self.__annotations__ = getattr(func, "__annotations__", {}) new_func.__type_params__ = self.__type_params__ = getattr(func, "__type_params__", ()) - new_func.__dict__.update(func.__dict__) + new_func.__dict__.update(getattr(func, "__dict__", {})) # self.__dict__.update(func.__dict__) # Don't clobber self.__dict__; too risky! self.__wrapped__ = func new_func.__wrapped__ = self