Major API overhaul. Service classes now act like peak.binding.Singletons, in that the class itself is a proxy for the current instance. This eliminates the need for two names to refer to the "same" object. Settings are now created with decorators, the module is peak.context instead of peak.util.context, and many many other changes. And there are still more to come, but mostly additions and some tweaks to how the App context works.
import sys suites = [] if sys.version>='2.4': suites.append('README.txt') if sys.version>='2.5': suites.append('Contextual.txt') #XXX suites.append('context.txt') suites.append('context_tests.txt') try: sorted = sorted except NameError: def sorted(seq,key=None): if key: d = [(key(v),v) for v in seq] else: d = list(seq) d.sort() if key: return [v[1] for v in d] return d def additional_tests(): import doctest import __future__ globs = dict(sorted=sorted) if hasattr(__future__,'with_statement'): globs['with_statement'] = __future__.with_statement return doctest.DocFileSuite( #'README.txt', 'Contextual.txt', 'context.txt', 'context_tests.txt', optionflags=doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE, globs=globs, *suites )
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |