# HG changeset patch # User Franz Glasner # Date 1556906680 -7200 # Node ID 46c7d872db83aeeab7814af6285e0f8ade249fb2 # Parent 8af600d0e5c0d92c14c15e62d62612642679b829 Changelog: note the latest refactorings diff -r 8af600d0e5c0 -r 46c7d872db83 CHANGES.txt --- a/CHANGES.txt Fri May 03 19:59:21 2019 +0200 +++ b/CHANGES.txt Fri May 03 20:04:40 2019 +0200 @@ -19,27 +19,38 @@ .. change:: :tags: breaking - The public functions to manage file extensions to file modes have - been renamed to :py:func:`configmix.set_assoc`, - :py:func:`configmix.get_assoc`, :py:func:`clear_assoc`, + Additional or alternative loaders can be installed by changing + the :py:data:`configmix.mode_loaders` dictionary directly. + + .. change:: + :tags: breaking + + The public functions to associate filename extensions to filemodes + have been renamed to :py:func:`configmix.set_assoc`, + :py:func:`configmix.get_assoc`, + :py:func:`configmix.clear_assoc`, :py:func:`configmix.get_default_assoc`. + The filemodes must be keys in the :py:data:`configmix.mode_loaders` + dictionary. + .. change:: :tags: breaking, feature The associations from filename extensions to parsers are :py:mod:`fnmatch` style patterns now. - Calling :py:func:`configmix.set_assoc` prepends to the currently - defined associations and therefore gets the highest priority. + Calling :py:func:`configmix.set_assoc` by default prepends to + the currently defined associations and therefore gets the + highest priority. Appending is possible also. .. change:: :tags: feature - :py:func:`configmix.load` and :py:func:`configmix.safe_load` got a - keyword argument `defaults` that allow the provision of an already - existing default configuration wheter all additional configuration - settings are merged into. + :py:func:`configmix.load` and :py:func:`configmix.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. .. changelog:: diff -r 8af600d0e5c0 -r 46c7d872db83 doc/changes.rst --- a/doc/changes.rst Fri May 03 19:59:21 2019 +0200 +++ b/doc/changes.rst Fri May 03 20:04:40 2019 +0200 @@ -1,4 +1,4 @@ -.. -*- coding: utf-8 -*- +.. -*- coding: utf-8; mode: rst; -*- ========= Changes @@ -19,11 +19,24 @@ 0.7 --- -- :py:func:`configmix.set_loader` 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. +- A major overhowl 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. + + + :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. + + + :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