- Added support for the JSON5 file format.
- Added caching to default factory calls.
- Fixed
Manager.all()
behavior for patterns with default vales.
- Updated
Manager.get()
to handle default values in pattern arguments.
- Added a
sync()
utility to map arbitrary objects to the filesystem.
- Fixed the
mypy
plugin to support newer versions.
- Fixed missing default value for
target_object
in container converters.
- Added support for Python 3.11.
- Updated
Manager.get()
to be more flexible with positional arguments. - Added support for passing
frozen=True
to the underlyingdataclass
. - Added
py.typed
to tell type checkers thatdatafiles
has types.
- Dropped support for Python 3.7.
- Fixed handling of invalid YAML files in manager methods.
- Fixed exception when
Union[int, float]
orUnion[str, ...]
is used.
- Fixed exception when
TypedDict
is used, but schema is not yet supported.
- Added support for accessing
Dict
keys as attributes. - Added a proper
repr()
implementation forauto()
datafiles. - Added support for "thawing" objects upon exiting the
frozen()
context manager.
- Added support for paths relative to the user's home directory.
- Added a
frozen()
context manager to temporarily disable file updates.
- Fixed handling of
OSError
when trying to determine a models path.
- Added support for Python 3.10's builtin optional types (e.g.
int | None
). - Fixed handling of commented blocks in YAML files.
- Fixed serialization for
list
ofdict
in YAML.
- Initial stable release.
- Fixed
ValueError
when loading enum values from TOML files.
- Fixed handling of no file extension to use YAML by default.
- Removed
auto_load
/auto_save
model options. - Removed
INDENT_YAML_BLOCKS
setting. - Removed
YAML_LIBRARY
setting. - Renamed
HIDE_TRACEBACK_IN_HOOKS
setting toHIDDEN_TRACEBACK
. - Renamed
MINIMIZE_LIST_DIFFS
settings toMINIMAL_DIFFS
.
- Renamed model option
auto_attr
toinfer
. - Deprecated
auto_load
/auto_save
model options in favor ofmanual
.
- Added support for filtering on nested attributes.
- Fixed loading of partially defined nested objects with optional attributes.
- Fixed handling of string annotations for extended types.
- Added support for generic types.
- Added support for sets.
- Updated default
attrs
to exclude computed properties, i.e.field(init=False)
. - Fixed automatic save when modifying nested dictionary values.
- Fixed initialization for non-compliant
None
default values.
- Added
_exclude
parameter toall()
andfilter()
manager methods to exclude certain objects from loading as a performance optimization. - Fixed handling of untyped
List
/Dict
annotations in Python 3.9. - Fixed
ValueError
when setting anOptional[<enum>]
toNone
.
- Fixed error message for
Dict
annotations lacking types.
- Added support to treat
Mapping
type annotations as dictionaries. - Fixed handling of default values for
dataclass
attributes. - Added
MINIMIZE_LIST_DIFFS
setting to control the semantic representation of empty lists.
- Added support for recursively matching arbitrary depth paths of files.
- Fixed
AttributeError
when attempting to load malformed YAML files.
- Fixed serialization of optional nested dataclasses with a value of
None
. - Fixed preservation of comments on nested dataclass attributes.
- Added support for using
enum.Enum
subclasses as type annotations.
- Fixed loading of
Missing
nested dataclasses attributes.
- Updated the
@datafile(...)
decorator to be used as a drop-in replacement for@dataclass(...)
. - Added support for loading unlimited levels of nested objects.
- Added a
YAML_LIBRARY
setting to control the underlying YAML library. - Fixed ORM methods to handle relative file patterns.
- Updated the
@datafile
decorator to be able to be called without parentheses to act as@dataclass
. - Updated YAML serialization to preserve quotation marks in files.
- Added a registration system for custom formatter classes.
- Fixed loading of missing attribute from disk for ORM methods.
- Added support for file patterns relative to the current directory.
- Removed unnecessary warning when loading objects.
- Added an
INDENT_YAML_BLOCKS
setting to optionally use the old serialization behavior. - Disabled initial file creation when
settings.HOOKS_ENABLED = False
is set.
- Fixed a
TypeError
when converting custom types withfrom __future__ import annotations
enabled.
- Fixed a
TypeError
when converting non-builtin attributes.
- Fixed ORM methods for datafiles with relative path patterns.
- Added plugin for
mypy
support. - Updated YAML format to indent lists.
- Added ORM method:
all()
- Added ORM method:
get_or_none()
. - Added ORM method:
get_or_create()
. - Added ORM method:
filter
.
- Added an option to automatically resave files after loading.
- Added an option to automatically reload files after saving.
- Added a registration system for custom converter classes.
- Added initial support for file inference via
auto(filename)
.
- Initial release.