Issues with Self-Referential Benedicts
Maintainers usually reply within 3 days
@fabiocaccamo is already working on this.
Since Jul 21, 2026.
Assessment
This issue has not been assessed yet.
Description
Python version
3.10.13
Package version
0.38.0
Current behavior (bug description)
The Benedict API would be extremely useful for storing and manipulating deeply nested, self-referential data-structures. However, self-referential benedicts sometimes work and sometimes don't.
This works:
from benedict import benedict
test = benedict(keyattr_enabled=True, keyattr_dynamic=True)
test.a.b.c = test
This does not:
from benedict import benedict
test = benedict(keyattr_enabled=True, keyattr_dynamic=True)
test.a.b.c = test
test.a.b.d.e = test
In Jupyter, the latter often leads to kernel crashes or RecursionErrors. It seems that __setitem__ is getting stuck in an infinite loop in traverse.py.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 63
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fabiocaccamo/python-benedict
-
Frozen dict cannot use flatten, unflatten, subset or filterPossibly taken @itzzdev09 claimed this 8 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 78/100
fabiocaccamo/python-benedict#613 ·
Maintainers usually reply within 3 days
-
Take over the BeneDict name on PyPIMay be free again @fabiocaccamo claimed this 688 days ago, and no pull request is open. Openenhancement
fabiocaccamo/python-benedict#458 · 2 comments · 2 reactions · 1 assignee ·
Maintainers usually reply within 3 days
-
Add possibility to use `requests-html` when calling `from_html` method.May be free again @fabiocaccamo claimed this 822 days ago, and no pull request is open. Openenhancement
fabiocaccamo/python-benedict#425 · 1 assignee ·
Maintainers usually reply within 3 days
-
Wildcard support for renamingPossibly taken @fabiocaccamo claimed this 1489 days ago. Openenhancement
fabiocaccamo/python-benedict#113 · 12 comments · 1 reaction · 1 assignee ·
Maintainers usually reply within 3 days
-
Add `xpath` support.May be free again @fabiocaccamo claimed this 1835 days ago, and no pull request is open. Openenhancement
fabiocaccamo/python-benedict#67 · 3 comments · 1 assignee ·
Maintainers usually reply within 3 days
All issues in fabiocaccamo/python-benedict
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
521xueweihan/HelloGitHub#3924 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
wilbowes/EchoMuse#869 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 72/100
EclipseFdn/open-vsx.org#14043 ·
Maintainers usually reply within 1 day
-
test: TestServeUntilStale races the server's close against the client's sendall (BrokenPipeError under load)Possibly taken @evoludigit claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 89/100
Maintainers usually reply within 1 day