- Add
merge
function to combine multiple mappings into a singleConfiguration
. - Enable the use of the binary or / union operator on
Configuration
instances, analogous to a builtindict
(e.g.config = defaults | overrides
).
- Add
unwrap
function to the public API, unwrapping aConfiguration
object into a plaindict
(note that references are not resolved and will remain references in the result). - Change string-representations (result of
repr()
) ofConfiguration
andConfigurationSequence
to be more like builtin types.
- Add system-wide
.../name/name.yaml
paths to the default load order, aiding in the use configuration directories (e.g. in containerized setups). - Ensure non-confidence values can be dumped, enabling dumping of arbitrary bits of configuration.
- Avoid checking for existence of files, try to open them instead.
- Fix dumping / serialization issues by unwrapping complex wrapper types to their simple counterparts during initialization of
Configuration
.
- Use named loggers, default
confidence.*
library loggers to silence as described in the docs. - Resolve references in sequences.
- Parse values of environment variables as YAML values (e.g.
NAME_KEY=yes
will result inkey
beingTrue
). - Add INFO-level logging of files and environment variables being used to load configuration.
- Remove configurable key separator, hardcode the default.
- Rename enumeration values (like
Locality.USER
) to be upper case. - Add
dump
,dumpf
anddumps
functions to dumpConfiguration
instances to YAML format.
- Add type hints to confidence.
- Add human-readable
repr
s toConfiguration
andConfigurationSequence
. - Make
ConfigurationSequence
more list-like by enabling addition operator (configured_sequence + [1, 2, 3]
or(1, 2, 3) + configured_sequence
).
- Auto-wrap configured sequences to enable 'list-of-dicts' style configuration while retaining
Configuration
functionality.
- Restrict reference pattern to make a nested pattern work.
- Make
Configuration
instances picklable.
- Fix resolving references during loading when sources passed to
Configuration
areConfiguration
instances themselves.
- Add
Missing
policy to control what to do with unconfigured keys on attribute access. - Split single-file module into multi-module package (user-facing names importable from
confidence
package). - Raise errors when merging / splitting non-
str
type keys, avoiding issues with confusing and broken access patterns.
- Enable referencing keys from values.
- Enable customizing load order for
load_name
throughloaders
andLocality
(default behaviour remains unchanged).
- Warn about attribute access to configuration keys that collide with
Configuration
members.
- Enable escaping underscores in environment variables (
NAME_FOO__BAR
results inconfig.foo_bar
). - Use
yaml.safe_load
to avoid security issues withyaml.load
. - Raise
AttributeError
when attempting to set a non-protected attribute on aConfiguration
instance.
- Enable ignoring missing files in
loadf
. - Fix crashes when reading empty or comment-only yaml files.
- Read files from XDG-specified directories.
- Read files form system-wide and user-local directories specified in environment variables
PROGRAMDATA
,APPDATA
andLOCALAPPDATA
(in that order). - Read files from
/Library/Preferences
and~/Library/Preferences
.
- Expand user dirs for arguments to
loadf
, including values forEXAMPLE_CONFIG_FILE
environment variables.
- Initial release.