Package: repoze.configuration
repoze.configuration READMErepoze.configurationis a package that software developers can use
as a configuration system.  It allows the use ofYAMLas a
configuration language.  Application-defined “directives” can be
plugged in torepoze.configurationusing one or more Python
setuptools entry points.  For example, you could make sense out of the
following YAML using repoze.configuration and a custom “appsettings”
directive:--- !appsettings
port_number = 8080
reload_templates = true

--- !include
filename = anotherfile.ymlPlease see docs/index.rst orhttp://docs.repoze.org/configurationfor more documentation.repoze.configuration Changelog0.8 (2012-03-29)This release is the last which will maintain support for Python 2.4 /
Python 2.5.Added support for continuous integration usingtoxandjenkins.Added ‘setup.py dev’ alias (runssetup.py developplus installsnoseandcoverage).Instances ofrepoze.configuration.context.Contextnow inherit
fromdict.  Previously, the context object was guaranteed to
have a subattr namedregistrywhich was presumed to be dictlike;
interpolation used this dictionary to resolve names.  This
“registry”, for interpolation purposes, is now assumed to be the
context itself.  A property alias namedregistryhas been added
to the context for bw compat.The declaration object’sregistryproperty is now deprecated;
insteaddeclaration.contextshould be used directly.Added a class,repoze.configuration.imperative.ImperativeConfig,
which allows a configuration object to offer an imperative API that is
based on directives that are discoverable as entry points.0.7 (2010-02-24)Allowrepoze.configuration.context.Contextconstructor to take
arbitrary keyword arguments.  These kw arguments are added to the
instance__dict__of the result context object.The return value ofrepoze.configuration.context.Context.executeis no longer theregistryattribute of the context object; it is
insteadNone.  Theregistryobject is no longer “special”.0.6 (2009-12-30)Whencontext.actionwas called with aNonediscriminator
(the default), it would conflict with other actions that did not
supply a discriminator either.If arepoze.configuration.directiveentry point name begins with
the characters ‘tag:’, treat the name as a YAML tag URI.  YAML tag
URIs can be aliased at the top of YAML files to shorter!bang!names via a YAML %TAG directive (seeYAML global tag prefix
documentation.The intent is to encourage directive writers to register both a
“short name” (a word) and a tag URI for the same entry point
function.  Doing so means that a config file writer can optionally
use a tag URI (!<tag:repoze.org,2009:pypes/server>) in place of
a “short name” (!server) when the short version can’t be used
due to a conflict between two directives in separate packages that
share the same short name.For example, an application might register bothserver = pypes.deploy.directives:serverandtag:repoze.org,2009:pypes/server = pypes.deploy.directives:serverin arepoze.configuration.directivesection withinsetup.py.  A
config file that used the above entry points might equivalently use
any of the three below forms as necessary within a given YAML file:# tag alias
%TAG !pypes! tag:repoze.org,2009:pypes/

# short name
--- !server
name: main
port: 8082
host: 0.0.0.0

# rely on tag expansion from %TAG directive
--- !pypes!server
name: main
port: 8082
host: 0.0.0.0

# use literal tag URI
--- !<tag:repoze.org,2009:pypes/server>
name: main
port: 8082
host: 0.0.0.00.5 (2009-07-26)Add documentation about interpolation.Show only line numbers in error reports on console (previously both
line numbers and column numbers were reported, but the column
numbers seem to be meaningless in most debugging scenarios).Fix an off by one error in line number reporting in errors.Interpolation variables now try to use the registry first, but fall
back to “stack” values; the most important of which is%(here)s;
this interpolation variable can be used in any config file.  It will
be the absolute path to the parent directory of the configuration
file in which it was declared.  Any stack variable will be
overridden permanently (for interpolation purposes) by a registry
variable.0.4 (2009-07-25)Totally backwards incompatible.Instead of accepting “context”, “structure” and “node”, directives
now accept “declaration” objects.  A declaration object has most of
the methods that used to be supplied by the “context”, and some new
ones.  The docs have been updated.0.3 (2009-07-24)Backwards incompatibility: directives must now accept three
arguments: context, structure, and node (previously they had only
accepted context and structure).errormethod added to context.Make discriminator conflict detection actually work.Show actual lines from conflicting files when possible during a
discriminator conflict.Ignore import errors when trying to resolve entry point loads.Add apopvaluemethod to the context; it works likegetvalueexcept it pops the value out of the structure supplied instead of
just getting it.It was not possible to resolve the single dot.using
repoze.configuration.context.Context.resolve to the current package.Using a Python %(interpolation)s marker in any string value allows
you to replace values in strings.  For example, using “%(here)s” in
a string value would attempt to resolve the name “here” from the
registry as a key.Use pyyaml’s SafeLoader rather than Loader: we don’t really need to
be able to construct arbitrary Python objects.0.2 (2009-07-13)Trying to read any directive section that wasn’t a YAML mapping
caused a TypeError (e.g.construct_scalar takes no argument 'deep').0.1 (2009-06-22)Initial release.