Changes¶
All major changes over the versions are listed here. For breaking changes have a look at Breaking Changes, they are listed there in detail.
Changelog¶
Pre-1.0 Series¶
unreleased¶
[doc] Build the PDF documentation with lualatex now.
[doc] Some documentation tweaks.
[bugfix,doc] Make the
intersphinx_mappingconfiguration variable compatible with Sphinx 8.[misc] Begin a (BSD-)Makefile with some build helpers
0.23.3 (2023-12-07)¶
[feature] Implement new method
copy_new_config_without()for simple cases.[bugfix,tests] Add missing test data file(s).
0.23.2 (2023-12-04)¶
[feature] Implement new method
extract_new_config().[test] Test fixes for the tests on Windows
0.23.1 (2023-10-31)¶
[bugfix,misc] Implement real proper conformance to PEP 491: Even is
Root-Is-Purelib: falsethe wheel package data subdirplatlibdictated installation intoplatlibpreviously.
0.23 (2023-10-30)¶
[feature] Allow new merge strategies for lists: extend or prepend instead of replace. This is implemented with a new optional parameter
merge_listsforconfigmix.load()orconfigmix.merge().[bugfix] Allow again the installation of the pure-Python version for Python < 3.7.
[test] Test fixes and enhancements
0.22 (2023-08-17)¶
[feature] Nested interpolation for filters.
[feature] Chaining filters can be done (and is indeed now the preferred way) with commas (
,) in addition to the pipe symbol (|).
0.21.4 (2023-06-14)¶
[feature] Implement a new
SYSvariable namespace withexecutable,prefix,base_prefixandplatformas current content.
0.21.3 (2023-06-12)¶
[bugfix] Fixed some format string errors in the YAML loader. These errors were only encountered in exception handlers.
[misc] The installer got now an extra “sasl” that requires
passlib. This package is needed by the filtersaslprep().[misc] Enhance compatibility with newer Python
setuptoolsorpip: Create a basicpyproject.toml.[doc] Document that jails now support references at their roots: they act like a symbolic link.
0.21.2 (2023-04-12)¶
[misc] Test with PyYAML 6.0.
0.21.1 (2022-06-03)¶
[feature] Enable indexed access to lists in the configuration using an access path string representation like
~NNN~[feature] Implement methods
configmix.config.Configuration.iter_jailed()andconfigmix.config._JailedConfiguration.iter_jailed()that yield properly jailed configurations for container items (for lists and dicts, no sets).[feature] Allow to enable and disable the internal caching
[feature] Add support for using
tomllib(in Python’s stdlib since 3.11) andtomliTOML packages. They are preferred if they are found to be installed.But note that the declared dependency for the
tomlextra nevertheless is thetomlpackage. Because it is available for all supported Python versions. So use Python 3.11+ or installtomlimanually if you want to use the alternate packages.[bugfix] For better consistency: use .getvarl_s() instead of .getvarl() in the implementation of __len__() in jailed configurations.
[bugfix] For better TOML compatibility open TOML files with
encoding="".
0.21 (2022-06-03)¶
YANKED because of release errors.
0.20.5 (2022-03-07)¶
[bugfix] The configuration value
{{::DEL::}}is not subject to interpolation any more. This fixes the handling of these deletion markers when merging configurations: sometimes they were tried to be interpolated – and this failed.[bugfix] The merge logic should never interpolate variables. But some parts of the merge logic did this unintentionally.
0.20.4 (2022-01-17)¶
[bugfix] In the C extension: make sure that a default is returned as-is and not as copy.
[misc] Bring the exception messages from the C extension more in-line with the Python implementation.
0.20.3 (2022-01-12)¶
[feature] Add some more functions to the optional C-extension module:
configmix.config.Configuration.getvarl_s()andconfigmix.config.Configuration.getvar().[feature] Some internal enhancements within the C-extension module.
0.20.2 (2022-01-11)¶
[bugfix] The source distribution archive file did not contain any of the __init__.py files because of a bogus entry in
MANIFEST.in.[feature] More speedsups by implementing
getvarl()andgetvar_s()within the C-extension also.
0.20.1 (2022-01-10)¶
[misc] Add an optional C-extension with some speedups to often used functions and methods. Also allow to cross-build this modules for Windows with LLVM-11 and Ninja on POSIX systems.
[misc] Some internal code refactoring. This also yields more consistency in interpreting the varname string arguments.
0.20 (2021-12-21)¶
[breaking] Removed some unused keyword arguments from methods – also public ones:
_lookupref()
[breaking] Change methodname from expand_variable() to
configmix.config.Configuration.interpolate_variables()[misc] Improved overall performance by a factor of 0.25 to 0.3 using algorithmic changes.
[misc] Improved performance by internal caching.
[bugfix] Implement
values()anditems()that yield non-interpolated configuration values. This is needed now because attribute access now yields interpolated results.
0.19.2 (2021-12-16)¶
[feature] Implement “__len__()”-support for jailed configurations. Their container-like interface is now fairly complete.
0.19.1 (2021-12-15)¶
[feature] Jailed configuration support proper evaluation in boolean context
[feature] Proper iteration support for jailed configurations
[bugfix] Fixes for proper exception formatting in many cases
[bugfix] Proper “yield” support for older Python versions
[test] Test fixes and enhancements
0.19.1b1 (2021-12-14)¶
[feature] Attribute-style access also for jailed configurations
[bugfix} Make exception formatting robust when there is a single parameter for “%”-style formatting and the single parameter happend to be a tuple; now it is wrapped into a tuple.
0.19 (2021-12-10)¶
[breaking] [feature} Access to a configuration key using dict-level access now does variable interpolation
[feature] Simple dict-style access for jailed configuration
[feature] Optimized “__contains__()” implementation for jailed and unjailed configurations
0.18.1 (2021-12-10)¶
[feature] Proper “repr()” for jailed configurations
0.18.1b1 (2021-12-09)¶
[bugfix] Jailed configurations assumed that their “default” marker object is identical to the “default” marker object in the unjailed base configuration. This is not always true, especially if
rebind()is used.
0.18 (2021-12-02)¶
[feature] Allow empty variable names in some cases to get the root object of a configuration.
[feature] Allow to get sub-jails from an already jailed configuration.
[feature] Implement
getkeysl()andgetkeys()that return generators over all keys of a configuration value.
0.17 (2021-11-22)¶
[feature] Complete the set of configuration retrieval methods for the jailed configuration.
0.17b2 (2021-11-19)¶
[feature] All configuration objects carry a flag is_jail that allows to determine whether a configuration is jailed
[feature] Allow a jailed configuration to be rebound to another unjailed configuration
[feature} A public accessor property to the base configuration of a jailed configuration
0.17b1 (2021-11-19)¶
[feature] Jailed (aka “restricted” or “rooted”) configurations with
jailed()
0.16.1 (2021-11-10)¶
[feature] New access methods
getfirstvarl(),getfirstvarl_s(),getfirstintvarl_s()getfirstboolvarl_s(),getfirstfloatvarl_s()[feature] New access method
getfirstfloatvar_s()
0.16 (2021-07-11)¶
[feature] New access methods
getfirstvar(),getfirstvar_s(),getfirstintvar_s()andgetfirstboolvar_s()
0.15.1 (2021-07-09)¶
[bugfix] Handle the default keyword parameter in
configmix.config.Configuration.getvar()properly.
0.15 (2021-06-25)¶
0.14 (2021-05-10)¶
[breaking] [feature] Allowed quoting of variable and namespace names.
This is mostly important for variable names that contain
.,:or|but probably useful for characters like"` ``'and#also.[breaking] [misc] Moved some important public constants from
configmixinto theconfigmix.constantsmodule.[feature] Configuration tree references are implemented in the
refnamespace[feature] Implemented new access methods
configmix.config.Configuration.getvarl()andconfigmix.config.Configuration.getvarl_s()
0.13 (2021-04-21)¶
[feature] All YAML load functions got a new optional keyword strict to detect and prevent duplicate keys within a single YAML document.
The top-level load function also understands this flag and provides it to low-level-loaders that understand it.
0.12 (2020-12-07)¶
[feature] Provide an
AWSnamespace to retrieve some AWS instance metadata.
0.11 (2020-10-05)¶
[feature] Allow the deletion of key-value pairs while merging configurations.
This is done by recognizing and handling the special configuration value
{{::DEL::}}.
0.10 (2020-09-10)¶
[feature] Allow loading configuration files from directories when using the “<dir>” prefix in filenames.
Unknown filetypes within these directories are ignored automatically.
[feature] Implemented a function to delete an association:
configmix.del_assoc().
0.9 (2020-07-28)¶
[breaking] [feature] Do not set “root”, “self” and “here” variables any more. The old behaviour hindered proper automatic configuration on some PyPy configurations when using genapplib.
Only the INI-parser did set this variables automatically.
0.8.1 (2020-07-08)¶
[bugfix] Allow non-string keys when merging configurations.
0.8 (2020-07-08)¶
[breaking] [feature] Do not implicitely convert a configuration value to text if the value is the result of just a variable expansion.
0.7.4 (2020-05-21)¶
[feature] Implemented new namespace function
OS:nodeto return the node’s computername.[bugfix] The
OSnamespace lookup did not handle non-existing variables properly and ignored the default parameter.
0.7.3 (2020-05-13)¶
No code changes.
0.7.2 (2019-05-13)¶
[feature] Implemented a loader with key
-*-ignore-*-effectively ignores the contents of given file. No file extensions are by default associated with this loader.
0.7.1 (2019-05-10)¶
[feature]
configmix.load()andconfigmix.safe_load()got a new keyword argument extras that (if given) will be used as the last configuration dictionary to be merged into the configuration.This can be used to overwrite configuration file settings from commandline arguments.
[bugfix]
configmix.safe_load()did some preliminary unsafe merges from defaults and an extra additional unneeded merge.
0.7 (2019-05-06)¶
[breaking] Additional or alternative loaders can be installed by changing the
configmix.mode_loadersdictionary directly.[breaking] The public functions to associate filename extensions to filemodes have been renamed to
configmix.set_assoc(),configmix.get_assoc(),configmix.clear_assoc(),configmix.get_default_assoc().The filemodes must be keys in the
configmix.mode_loadersdictionary.[breaking] [feature] The associations from filename extensions to parsers are
fnmatchstyle patterns now.Calling
configmix.set_assoc()by default prepends to the currently defined associations and therefore gets the highest priority. Appending is possible also.[feature]
configmix.load()andconfigmix.safe_load()got a keyword argument defaults that allow the provision of an already existing default configuration into which all additional configuration settings are merged into.[feature] Added support for TOML style configuration files. This needs the external package
toml(from https://github.com/uiri/toml).
0.6 (2019-03-14)¶
[breaking] [feature] Reimplemented
configmix.safe_merge()to do a deepcopy of all source configurations when merging. Previously is was sort of a shallow copy.[breaking] [feature] The default file encoding when reading INI style files with
configmix.ini.load()is now “UTF-8”. Previously it was undefined and therefore dependent on the user’s locale.An encoding keyword argument can be specified explicitely now.
[breaking] [feature] Support comment-like key-value pairs with configuration keys starting with
__docor__comment.[misc] Use the filesystem encoding where appripriate.
[doc] Begin the documentation with Sphinx
[test] Begin formal unittests
[feature] Build a tree of configuration settings from INI files
[feature] Support JSON formatted files as configuration files also (suffix “.json”).
[feature] Allow custom configuration filename extensions and custom loaders that can handle custom configuration file syntax styles.
0.5 (2016-04-19)¶
[feature]] First really used release.
Breaking Changes¶
0.20¶
Removed some unneeded keyword arguments from methods – also public ones:
Configuration.expand_ref_uri()
Configuration.expand_if_reference()
Configuration._lookupref()
Change methodname from expand_variable() to
configmix.config.Configuration.interpolate_variables()
0.19¶
Dict-level access to a configuraiton now does variable interpolation
0.14¶
Allow quoting of variable and namespace names
Move some important public constants from
configmixinto theconfigmix.constantsmodule.
These are technically a breaking changes while the author does not believe that any of the current clients is affected by both changes.
0.9¶
Do not set “root”, “self” and “here” variables any more. This hinders proper automatic configuration on some PyPy configurations when using genapplib.
While technically a breaking change no known client is known to rely on the previous behaviour.
Any only the INI-parser did set this variables automatically.
0.8¶
Do not implicitely convert a configuration value to text if the value is the result of just a variable expansion.
While technically a breaking change no known client is known to rely on the previous behaviour.
0.7¶
A major overhaul of how filename extensions are associated with loaders has been done:
Filename extensions in
fnmatchstyle are associated with file-mode strings.These file-mode strings are associated with loader functions separately via the mapping
configmix.mode_loaders.configmix.set_assoc(),configmix.get_assoc(),configmix.clear_assoc()andconfigmix.get_default_assoc()are the new names for the old set_loader(), get_loader(), clear_loader() and get_default_loader() functions. They are used for associatingfnmatchstyle filename patterns to file-mode strings. Previously they associated loader functions directly.configmix.set_assoc()now requires afnmatchstyle pattern instead of just a file extension string (i.e. a plain trailer). The previons dictionary with mapping from filename extensions to loader callables is now a list of tuples containing thefnmatchstyle pattern and the corresponding loader callable.
0.6¶
configmix.safe_merge()does now a deepcopy of all source configurations when merging. Changes in configuration instances afterwards will not be reflected in the merged configuration any more.The public signature of
configmix.safe_merge()has not changed.The default file encoding when reading INI style files with
configmix.ini.load()is now “UTF-8”. Previously it was undefined and therefore dependent on the user’s locale.