Release Notes¶
Frigid 1.0 (2024-12-04)¶
Features¶
Add
Dictionaryclass providing completely immutable dictionaries that prevent any modification after creation. Supports standard dictionary operations like key lookup, iteration, and views.Add
ValidatorDictionaryclass that validates entries during creation using a supplied predicate function. The validator receives both key and value and must return a boolean indicating validity.Add set operations for dictionaries:
Union operation (
|) combines two dictionaries while preventing key conflictsIntersection operation (
&) creates new dictionaries either by matching key-value pairs with another mapping or by filtering keys with a set
Add
Namespaceclass providing a completely immutable alternative totypes.SimpleNamespace. All attributes must be set during initialization and cannot be modified afterward.Add
Moduleclass andreclassify_modulesfunction for creating and converting to immutable modules. This prevents runtime modification of module attributes, helping ensure interface stability.Add
Objectbase class for creating objects with immutable attributes. Derived classes must set attributes in__init__before callingsuper().__init__().Add
@immutabledecorator for making existing classes immutable after initialization. Compatible with most classes except those defining their own__setattr__or__delattr__methods.Add metaclasses for creating classes with immutable class attributes:
Classfor standard classesABCFactoryfor abstract base classesProtocolClassfor protocol classes
Add qualified aliases in
qaliasesmodule with “Immutable” prefix for all core classes, helping avoid namespace conflicts.Add comprehensive type annotations and
py.typedfile for static type checking support.
Supported Platforms¶
Add support for CPython 3.10 to 3.13.
Add support for PyPy 3.10.