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
'config.ProviderOf(storage.IDataManager,class)'.
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):
http://cvs.eby-sarna.com/PEAK/src/peak/config/config_components.py.diff?r1=1.58&r2=1.59
http://cvs.eby-sarna.com/PEAK/src/peak/config/tests/__init__.py.diff?r1=1.22&r2=1.23
http://cvs.eby-sarna.com/PEAK/src/peak/storage/api.py.diff?r1=1.5&r2=1.6
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