Release Notes¶
Frigid 1.0 (2024-12-04)¶
Features¶
Add
Dictionary
class providing completely immutable dictionaries that prevent any modification after creation. Supports standard dictionary operations like key lookup, iteration, and views.Add
ValidatorDictionary
class 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
Namespace
class providing a completely immutable alternative totypes.SimpleNamespace
. All attributes must be set during initialization and cannot be modified afterward.Add
Module
class andreclassify_modules
function for creating and converting to immutable modules. This prevents runtime modification of module attributes, helping ensure interface stability.Add
Object
base class for creating objects with immutable attributes. Derived classes must set attributes in__init__
before callingsuper().__init__()
.Add
@immutable
decorator 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:
Class
for standard classesABCFactory
for abstract base classesProtocolClass
for protocol classes
Add qualified aliases in
qaliases
module with “Immutable” prefix for all core classes, helping avoid namespace conflicts.Add comprehensive type annotations and
py.typed
file for static type checking support.
Supported Platforms¶
Add support for CPython 3.10 to 3.13.
Add support for PyPy 3.10.