issue#6393 Fixed User unfriendly behavior of attributes.all when stored
Summary of Changes
-
Fixed Persistence Issue:
Resolved an issue where modifications to the attribute dictionary returned by.alldid not persist correctly for stored nodes. -
New Dictionary Wrapper -
_AttributesDict:
Introduced a custom dictionary wrapper that dynamically verifies a node’sis_storedstatus. If modifications are attempted on a stored node, aModificationNotAllowederror is raised to prevent unintended changes. -
New
get_dict()Method:
Implemented a method that returns a deep copy of the node’s attributes, ensuring users must utilize proper setter methods (set(), etc.) for modifications instead of modifying attributes directly. -
Enhanced Documentation & Warnings:
Updated documentation and warning messages on the.allproperty to guide users toward the correct API usage, reducing misuse and confusion. -
Backward Compatibility Maintained:
Ensured compatibility with existing implementations while deprecating direct modifications through.all, providing a smooth transition for users.
Closes #6393