Skip to content

[BUG] deepfreeze modifies the original dict #96

@kenodegard

Description

@kenodegard

Welcome! You should write in your Bug Report:

OS version (https://www.google.com/search?channel=fs&q=check+os+version&ie=utf-8&oe=utf-8):
macOS 14.3

Python3 version (python3 -V -V):
Python 3.12.2

Steps to reproduce:

  1. Create some nested dict and call deepfreeze on it.

Actual result (with the python stack trace if present):

>>> o = {'a': 1, 'nested': {'b': 2}}
>>> d = deepfreeze(o)
>>> d
frozendict.frozendict({'a': 1, 'nested': frozendict.frozendict({'b': 2})})
>>> o
{'a': 1, 'nested': frozendict.frozendict({'b': 2})}

I expected deepfreeze to leave the original object untouched.

Metadata

Metadata

Assignees

Labels

Effort: Loweasy taskNeeds: TestHey, it compiles! Ship it!Priority: HighA blocking bug or an important featureStatus: FixedNow it works!Type: DefectSomething works, but can work better

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions