From ebc921dc244c781625b76921ba7fabff25afe9f9 Mon Sep 17 00:00:00 2001 From: Danilo Lessa Bernardineli Date: Thu, 21 Dec 2023 13:42:52 -0300 Subject: [PATCH] Remove MappingProxyType in favour of copy (#338) * rm mapping proxy type in favour of copy --- cadCAD/engine/simulation.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cadCAD/engine/simulation.py b/cadCAD/engine/simulation.py index 76d7d909..8837b84f 100644 --- a/cadCAD/engine/simulation.py +++ b/cadCAD/engine/simulation.py @@ -1,6 +1,5 @@ from typing import Any, Callable, Dict, List, Tuple -from copy import deepcopy -from types import MappingProxyType +from copy import deepcopy, copy from functools import reduce from funcy import curry # type: ignore @@ -161,7 +160,7 @@ def partial_state_update( if type(additional_objs) == dict: if additional_objs.get('deepcopy_off', False) == True: - last_in_obj = MappingProxyType(sL[-1]) + last_in_obj = copy(sL[-1]) if len(additional_objs) == 1: additional_objs = None # XXX: drop the additional objects if only used for deepcopy