Mercurial > hgrepos > Python > libs > ConfigMix
view docs/changes.rst @ 654:0d6673d06c2c
Add support for using "tomllib" (in Python's stdlib since 3.11) and "tomli" TOML packages.
They are preferred if they are found to be installed.
But note that the declared dependency for the "toml" extra nevertheless
is the "toml" package. Because it is available for all supported Python
versions.
So use Python 3.11+ or install "tomli" manually if you want to use the
alternate packages.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 19 May 2022 22:10:59 +0200 |
| parents | be6ef72c55d5 |
| children |
line wrap: on
line source
.. -*- coding: utf-8; mode: rst; -*- ========= Changes ========= All major changes over the versions are listed here. For breaking changes have a look at :ref:`api-changes`, they are listed there in detail. .. include:: ../CHANGES.txt .. _api-changes: 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 :py:meth:`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 :py:mod:`configmix` into the :py:mod:`configmix.constants` module. 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 :mod:`fnmatch` style are associated with file-mode strings. These file-mode strings are associated with loader functions separately via the mapping :py:data:`configmix.mode_loaders`. + :py:func:`configmix.set_assoc`, :py:func:`configmix.get_assoc`, :py:func:`configmix.clear_assoc` and :py:func:`configmix.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 associating :mod:`fnmatch` style filename patterns to file-mode strings. Previously they associated loader functions directly. + :py:func:`configmix.set_assoc` now requires a :mod:`fnmatch` style 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 the :mod:`fnmatch` style pattern and the corresponding loader callable. 0.6 --- - :py:func:`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 :py:func:`configmix.safe_merge` has *not* changed. - The default file encoding when reading INI style files with :py:func:`configmix.ini.load` is now "UTF-8". Previously it was undefined and therefore dependent on the user's locale.
