You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copy protocol broken: deepcopy of any live descriptor raises; copy of any EasyList raises #271
Findings V-H3, V-H2, G-M3 in DEEP_ANALYSIS.md (parent #261).
DescriptorBase inherits SerializerComponent.__deepcopy__ (io/serializer_component.py:28-29), which does self.from_dict(self.as_dict())without skipping unique_name; reconstruction collides in the global map (map.py:166-167 raises ValueError: Object name ... already exists). So copy.deepcopy(param) always fails while copy.copy(param) works (__copy__ correctly skips unique_name). NewBase patched this for itself; DescriptorBase did not.
EasyList.to_dict() (easy_list.py:359) overrides NewBase.to_dict(skip=...) with an incompatible signature (Liskov violation); NewBase.__copy__ calls self.to_dict(skip=['unique_name']) -> TypeError for every EasyList.
__deepcopy__ also ignores memo, so shared children are duplicated instead of shared (broken deepcopy semantics for diamond graphs).
Fix: implement __deepcopy__ at the hierarchy root with skip=['unique_name'] + memo support; align EasyList.to_dict signature. Add copy/deepcopy round-trip tests for every descriptor and collection type.
Activity