[Subversion] / PEAK / src / peak / core.py |
No default branch
Bookmark a link to HEAD:
(view)
(download)
(as text)
Make the 'dispatch' package a primitive part of 'peak.core', so we can use 'dispatch.as()', 'dispatch.when()', 'dispatch.SimpleGeneric', etc.
Add more aggressive caching to 'config.Namespace()'. Add 'findLocation()' to 'web.ITraversalContext' (without an implementation, as yet).
Fix import circularity between peak.core and peak.config.interfaces that caused problems if the latter was imported before the former.
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.)
Added 'peak.core' as a minimal subset of 'peak.api'. 'peak.core' offers only "core" API packages and primitives, not the full set of available framework APIs. 'peak.api' will continue to expand as frameworks are added, but 'peak.core' will stay as small as practical. ('peak.exceptions' may in fact end up being removed from 'peak.core', or at least renamed.) Also, added 'peak.util.symbol' module, to contain 'NOT_GIVEN', 'NOT_FOUND', and the 'Symbol' class used to create them.
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |