Repository navigation
frozendict v2.5.0
What's Changed
Breaking changes
- Removed
frozendict.__deepcopy__.deepcopy()now always returns a copy, even if the frozendict is hashable. - Pure py:
|accepts onlydictandfrozendict, like the C Extension anddict.
Speed
- C Extension: freelists for frozendicts and keys make creating small frozendicts faster: the constructor,
set()anddelete(). - C Extension: frozendicts take less memory in some cases.
- Pure py: faster
set,setdefault,deleteand|. fd | {}andfrozendict() | fdnow returnfdimmediately.
Fixes
set,setdefault,deleteand|could return a frozendict not tracked by the GC, so its reference cycles were never collected.- Pure py:
deepcopy()of a recursive frozendict no longer raisesRecursionError. - Pure py:
dict | frozendictnow also works on Python 3.8 and earlier. fromkeys()with an empty iterable now returns the empty singleton.- Fixed crashes, reference leaks and missing error checks in the C Extension. Also fixed
from frozendict import *, the signature ofsetin the stub, and the silent fallback to pure py when the C Extension fails to load, which now emits a warning. Thanks to @devdanzin for the audit. - Typing: fixed
items,keys,values,__ror__andsetdefault(key).
by @Marco-Sulla in #120
Other Fixes
- Use built-in Self type in
__init__.pyiwhen available by @adriengcql in #114 - Fix C extension build for unsupported Python versions by @jvulgan in #117
- Recursively freeze fallback object attributes by @muneikh in #118
New Contributors
- @adriengcql made their first contribution in #114
- @jvulgan made their first contribution in #117
- @muneikh made their first contribution in #118
Full Changelog: v2.4.7...v2.5.0