|
|
Changed, Enhanced, or Newly Deprecated Features |
Changed, Enhanced, or Newly Deprecated Features |
|
|
|
- 'naming.IName' is now derived from 'binding.IComponentKey', so names and |
|
addresses must now support the 'findComponent()' method. All PEAK name and |
|
address types provide support for this. |
|
|
|
- The 'lookup()' method of 'binding.IComponentKey' is now called |
|
'findComponent()', to better distinguish it from 'lookup()' in |
|
'naming.IBasicContext', which does something very different. |
|
|
|
- 'binding.bindTo()' and 'binding.bindSequence()' now pre-adapt their |
|
arguments to 'IComponentKey', to speed lookups at runtime, and to ensure |
|
that errors due to an unusable parameter type occur at class creation time |
|
instead of waiting until lookup time. |
|
|
|
- The following 'binding' forms are now deprecated, and will go away before |
|
0.5 beta is released: |
|
|
|
'bindToProperty(x,y)' -- use 'bindTo(PropertyName(x),default=y)' |
|
|
|
'bindToParent()' -- use 'bindTo("..")' |
|
|
|
'bindToSelf()' -- use 'bindTo(".")' |
|
|
|
'bindToUtilities()' -- no replacement; let me know if you're using this. |
|
|
|
- There's a new 'peak.storage.files' module, with handy classes like |
|
'EditableFile'. 'EditableFile' is a class that lets you edit the contents |
|
of a file "in place", with atomic replacement of the original at transaction |
|
commit. If the transaction is aborted, the original file is left unchanged. |
|
|
|
- 'peak.running.scheduler.UntwistedReactor' now supports a configuration |
|
property ('peak.running.reactor.checkInterval') to determine how long it |
|
should run 'select()' calls for, when there are no scheduled tasks. |
|
|
|
- 'peak.running.scheduler.UntwistedReactor' now supports using a "signal |
|
manager" component (via the 'peak.running.signalManager' property) to |
|
process signals while a 'run()' loop is in progress. Signal managers can |
|
also be added or removed at any time via the new 'peak.util.signal_stack' |
|
module. |
|
|
|
- 'peak.running.commands.AbstractCommand' now offers a '_run()' method that |
|
can be overridden in subclasses, instead of 'run()'. If you override the |
|
new '_run()' method instead, you get the advantage of automatic handling |
|
for invocation errors and 'SystemExit' exceptions, provided for you by the |
|
'run()' method. |
|
|
|
- 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 one or more classes, 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. |
|
|
|
- It's now possible to extend .ini file parsing with custom section types, |
|
and PEAK defines its own built-in section types using this extension |
|
mechanism. Custom section types must include at least one space, (e.g. |
|
'[My Section]') or they will be treated as a plain property name. |
|
See the 'peak.config.iniFile.sectionParsers' section in 'peak.ini' for |
|
more details, along with the 'config.ISettingParser' and 'config.IIniParser' |
|
interfaces. |
|
|
|
- When creating a 'PropertyName()', it's now possible to force conversion of |
|
invalid characters to '_', using the 'PropertyName.fromString()' |
|
constructor. (Note that the input must be a plain-ASCII string.) Unless |
|
you request that wildcards ('?' and '*') be kept, they will also be |
|
converted to '_' characters. This can be convenient for converting things |
|
like filenames or text that might contain spaces, to property names. |
|
|
|
- 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. |
|
|
|
- The 'EigenRegistry' class has been moved from 'peak.util.EigenData' to |
|
'peak.config.registries', as it hasn't really been useful outside PEAK for |
|
a while now. |
|
|
- .ini files now support "smart property" objects ('config.ISmartProperty'). |
- .ini files now support "smart property" objects ('config.ISmartProperty'). |
If a property rule defined in an .ini file evaluates at runtime to an object |
If a property rule defined in an .ini file evaluates at runtime to an object |
that implements 'ISmartProperty', the object will be given a chance to |
that implements 'ISmartProperty', the object will be given a chance to |
|
|
Corrected Problems |
Corrected Problems |
|
|
|
- The logging system would raise an error if a log message with no arguments |
|
contained a '%' sign. |
|
|
- There was a typo in peak.naming.arithmetic that caused homogeneous non-URL |
- There was a typo in peak.naming.arithmetic that caused homogeneous non-URL |
name subtraction to fail. |
name subtraction to fail. |
|
|