88a0720c6788ca8ac745e6a768f0287135ee5090
BaseDict._get_dict_or_value() recursively unwraps nested benedict values with no cycle detection, so assigning a benedict into its own nested descendant a second time recurses forever and crashes with RecursionError. Track ids of mappings currently being unwrapped and raise a clear ValueError as soon as a self-reference is detected, instead of recursing into unrelated, equally unprotected traversal code until the interpreter stack overflows.
Description
My contributions to fabiocaccamo/python-benedict: 2 commits, 1 merged PRs
35 KiB
0 Stars
1 Watchers
0 Forks
Languages
Python
100%