E&S CVS Commit: PEAK - Re-factored utility search mechanism, and associated configuration rules.

pje at eby-sarna.com pje at eby-sarna.com
Sun Jul 14 17:29:01 EDT 2002

Module Name:	PEAK
Committed By:	pje
Date:		Sun Jul 14 21:28:58 UTC 2002

Modified Files:
	PEAK/src/peak/binding: components.py
	PEAK/src/peak/binding/tests: __init__.py
	PEAK/src/peak/naming: spi.py
	PEAK/src/peak/running/config: api.py config_components.py

Log Message:
Re-factored utility search mechanism, and associated configuration rules.
acquireUtility has been replaced with the functions binding.findUtility()
and binding.findUtilities().  The latter is a generator that yields in
hierarchical order all the utilities available for the requested interface.
This is more helpful in dealing with most utilities that need to be used as
a set.  Components now implement a simpler '_getUtility()' method that is
called by the find() functions.  Configuration rules have now been
adjusted to allow for getting a new default local configuration in the
absence of a root, and to force getLocal(getGlobal()) to return None (which
simplifies loop logic when traversing into configuration objects from
arbitrary components, as is done by findUtilities().)  And finally,
changed the naming.spi module to register a default provider for all the
interfaces it needs, and to use findUtilities() to iterate over factories.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.30 -r1.31 PEAK/src/peak/binding/components.py
cvs rdiff -r1.11 -r1.12 PEAK/src/peak/binding/tests/__init__.py
cvs rdiff -r1.20 -r1.21 PEAK/src/peak/naming/spi.py
cvs rdiff -r1.2 -r1.3 PEAK/src/peak/running/config/api.py
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/running/config/config_components.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list