diff --git a/cement/core/foundation.py b/cement/core/foundation.py index b58dd9b1..8647fd8c 100644 --- a/cement/core/foundation.py +++ b/cement/core/foundation.py @@ -645,19 +645,19 @@ class CementApp(meta.MetaMixin): alternative_module_mapping = {} """ - EXPERIMENTAL FEATURE: This is an experimental feature added in Cement + EXPERIMENTAL FEATURE: This is an experimental feature added in Cement 2.9.x and may or may not be removed in future versions of Cement. Dictionary of alternative, **drop-in** replacement modules to use selectively throughout the application, framework, or - extensions. Developers can optionally use the - ``CementApp.__import__()`` method to import simple modules, and if + extensions. Developers can optionally use the + ``CementApp.__import__()`` method to import simple modules, and if that module exists in this mapping it will import the alternative library in it's place. - + This is a low-level feature, and may not produce the results you are - expecting. It's purpose is to allow the developer to replace specific - modules at a high level. Example: For an application wanting to use + expecting. It's purpose is to allow the developer to replace specific + modules at a high level. Example: For an application wanting to use ``ujson`` in place of ``json``, the developer could set the following: .. code-block:: python @@ -674,8 +674,8 @@ class CementApp(meta.MetaMixin): _json.dumps(data) - Obviously, the replacement - module **must be** a drop-in replace and function the same. + Obviously, the replacement module **must be** a drop-in replace and + function the same. """ def __init__(self, label=None, **kw): @@ -1429,7 +1429,7 @@ class CementApp(meta.MetaMixin): else: obj = mapping.get(obj, obj) _loaded = __import__(obj, globals(), locals(), [], 0) - + return _loaded def __enter__(self): diff --git a/cement/ext/ext_json.py b/cement/ext/ext_json.py index 4cf29ba5..87c915f1 100644 --- a/cement/ext/ext_json.py +++ b/cement/ext/ext_json.py @@ -16,8 +16,8 @@ Configuration This extension supports the following application metadata settings: - * ``CementApp.Meta.alternative_module_mapping`` - By using the alternative - module mapping feature, the developer can optionally replace the ``json`` + * ``CementApp.Meta.alternative_module_mapping`` - By using the alternative + module mapping feature, the developer can optionally replace the ``json`` module with another drop-in replacement module such as ``ujson``. Usage diff --git a/cement/ext/ext_json_configobj.py b/cement/ext/ext_json_configobj.py index 7f3aad33..e0d99bd6 100644 --- a/cement/ext/ext_json_configobj.py +++ b/cement/ext/ext_json_configobj.py @@ -15,8 +15,8 @@ Configuration This extension supports the following application metadata settings: - * ``CementApp.Meta.alternative_module_mapping`` - By using the alternative - module mapping feature, the developer can optionally replace the ``json`` + * ``CementApp.Meta.alternative_module_mapping`` - By using the alternative + module mapping feature, the developer can optionally replace the ``json`` module with another drop-in replacement module such as ``ujson``.