E&S CVS Commit: PEAK - There is now a 'storage.DMFor(class)' function that returns a configuration

pje at eby-sarna.com pje at eby-sarna.com
Sat Aug 2 08:11:00 EDT 2003

Module Name:	PEAK
Committed By:	pje
Date:		Sat Aug  2 12:10:28 UTC 2003

Modified Files:
	PEAK/src/peak/config: config_components.py
	PEAK/src/peak/config/tests: __init__.py
	PEAK/src/peak/storage: api.py

Log Message:
There is now a 'storage.DMFor(class)' function that returns a configuration
key for registering or looking up data managers by class.  You can use the
returned key in a binding's 'offerAs' list, or as the target of a
'bindTo()' or 'lookupComponent()'.  The key is constructed using

You can now register utilities that are keyed by the combination of an
interface and at least one class, using 'config.ProviderOf(iface,*classes)'
as a configuration key.  Providers are registered under an '(iface,klass)'
tuple for each specified class, and looked up using the MRO order of the
class specified for lookup.  In other words, searching for a provider will
find a provider for the requested class, or one of its base classes, with
precedence given to the more-specific provider.  This is primarily intended
for services like data managers and Specialists, as in 'storage.DMFor()'.

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

To generate a diff of this commit:
cvs rdiff -r1.58 -r1.59 PEAK/src/peak/config/config_components.py
cvs rdiff -r1.22 -r1.23 PEAK/src/peak/config/tests/__init__.py
cvs rdiff -r1.5 -r1.6 PEAK/src/peak/storage/api.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