[Subversion] / PEAK / src / peak / config / registries.py |
No default branch
Bookmark a link to HEAD:
(view)
(download)
(as text)
Change all adapter factories to use only a single argument.
Plugins have landed! * Added 'binding.PluginKeys' and 'binding.PluginsFor'. These are component keys that can be used to 'Obtain' plugins registered within a property namespace. 'PluginKeys' obtains a list of the plugins' configuration keys, while 'PluginsFor' obtains a list of the actual plugins. * Replaced 'peak.config.registries.EigenRegistry' with 'peak.config.registries.ImmutableConfig'. The only use we had for 'EigenRegistry' was to keep track of 'offerAs' settings within classes, and it didn't need all the extra complexity of eigenstate management. The new, more-specialized class is shorter, simpler, and easier to use.
MAJOR API REFACTORING for 'peak.config', to support iterating over configuration keys, 'n2' navigability of properties, and much more. Many APIs are now DEPRECATED or renamed; please see CHANGES.txt for a complete description. A few highlights: - 'config.lookup()' replaces 'findUtility' and 'getProperty' - 'config.iterValues()' replaces 'findUtilities' - 'config.iterKeys()' finds keys in a specific namespace - NEW: 'config.parentProviding()' and 'config.parentsProviding()' APIs to find parent components that support a protocol. - NEW: You can now use 'peak n2 config:' to explore the default property namespace. For example 'ls -l peak.naming.schemes' will list all defined naming schemes. Please see CHANGES.txt for the list of deprecated or removed APIs.
Added 'config.MultiKey()' and 'config.UnionOf()' configuration key classes, to generalize existing specialty keys such as 'ProviderOf' and 'FactoryFor'. (The latter two are now defined in terms of the former two.) Also, made classes and types usable as configuration keys. This was needed for the above generalization, but also makes many other class-lookup concepts possible. (Note that there may be some slight changes to the effective registration and lookup order of these and other configuration keys as of this change, as there were some previous errors and/or ambiguities to the lookup order that were not covered by the test suite.)
Clean up __repr__'s for bindings, for convenient use of help() and other documentation tools.
It's now possible to declare an attribute as offering a wildcard property; such lookups now follow the same rules as other wildcard property lookups. The 'config.IConfigKey' interface has been changed to cleanly support implied keys at both registration and lookup time, so you can implement your own key types that work the way interfaces or property names do for configuration lookups. I also moved the 'EigenRegistry' class from 'peak.util.EigenData' to 'peak.config.registries', as it hasn't really been useful outside PEAK for a while now.
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |