[Subversion] / PEAK / CHANGES.txt  

Diff of /PEAK/CHANGES.txt

Parent Directory | Revision Log

version 1372, Fri Aug 29 23:41:38 2003 UTC version 1403, Tue Sep 30 23:29:24 2003 UTC
Line 2 
Line 2 
   
  Changed, Enhanced, or Newly Deprecated Features   Changed, Enhanced, or Newly Deprecated Features
   
    - Added 'binding.Require', 'binding.Obtain', 'binding.Make', and
      'binding.Delegate'.  *ALL* other binding types are now DEPRECATED, and will
      go away before 0.5 beta is released:
   
      'requireBinding("info")' -- use 'Require("info")'
   
      'delegateTo("attr")' -- use 'Delegate("attr")'
   
      'New(type)' -- use 'Make(type)'
   
      'New("module.type")' -- use 'Make("module.type")'
   
      'bindTo(key)' -- use 'Obtain(key)'
   
      'Constant(value)' -- use 'Make(lambda: value)'
   
      'Acquire(key)' -- use 'Obtain(key, offerAs=[key])'
   
      'Copy(value)' -- use 'Make(lambda: <expr to copy value>)'
   
      'whenAssembled(func)' -- use 'Make(func, uponAssembly=True)'
   
      'bindSequence(key1,key2,...)' -- use 'Obtain([key1,key,...])'
   
      'bindToProperty(x,y)' -- use 'Obtain(PropertyName(x),default=y)'
   
      'bindToParent()' -- use 'Obtain("..")'
   
      'bindToSelf()'  -- use 'Obtain(".")'
   
      'bindToUtilities()' -- no replacement; let me know if you're using this.
   
      Note that 'Make' and 'Obtain' also support sequences of recipes and keys,
      and in those cases will produce a sequence of the results from those recipes
      or keys.  Also, 'Make' will accept no-argument and one-argument callables,
      where 'Once' always required three-argument functions.  This should make it
      a lot easier to write short binding functions.
   
      Also, note that the 'activateUponAssembly' keyword is now 'uponAssembly',
      and 'isVolatile' is now 'noCache'.  (The old names will work as keyword
      arguments until the alpha 4 development cycle begins.)  The
      'binding.IActiveDescriptor' interface also changed as a result of this.
      Last, but not least, a 'binding.IRecipe' interface was added, to support the
      new 'binding.Make' type.
   
   
    - Added a 'lockName' attribute to 'runnning.AdaptiveTask', and a 'LockURL'
      setting to its ZConfig schema.  This allows a lockfile URL to be specified
      for adaptive tasks that need exclusive access to some resource while
      running.
   
    - A list or tuple of 'IComponentKey' instances is now treated as a single
      component key, that returns a tuple of the values returned by each
      constituent component key.  This means that 'binding.Obtain()' and
      'lookupComponent()' can now accept a list or tuple of component keys.  This
      makes 'bindSequence()' obsolete, so 'bindSequence()' is now DEPRECATED.
      'binding.bindSequence(key1,key2,...)' can now be replaced with
      'binding.Obtain([key1,key,...])', and will produce the same results.
   
    - 'naming.IBasicContext.lookup()' and 'naming.lookup()' now accept a 'default'
      argument, similar to that used by 'lookupComponent()' and most other
      lookup-like APIs in PEAK.  This change was made so that component lookups
      don't need to rely on catching 'exceptions.NameNotFound' errors to tell them
      when to use the default value.  This could hide 'NameNotFound' errors that
      were actually from a broken component somewhere in the lookup process.  (In
      general, it's probably a bad idea to have an exception that's used for both
      control flow and real errors!)
   
    - Added new 'version' tool that automatically edits files to update version
      information in them.  Just execute the 'version' file in the main PEAK
      source directory.  (Use '--help' for help.)  You can use this tool with your
      own projects by creating 'version' and 'version.dat' files in your project
      directory, similar to the ones used by PEAK.  The 'version' file is a ZConfig
      file that describes your project's version numbering scheme(s), formats,
      and the files that need to be edited, while the 'version.dat' file contains
      the current version number values.  Source for the tool, including the
      configuration file schema, is in the 'peak.running.tools.version' package.
      (Error handling and documentation, alas, are still minimal.)
   
  - Added new 'Alias' command in 'peak.running.commands'.  An 'Alias' instance   - Added new 'Alias' command in 'peak.running.commands'.  An 'Alias' instance
    can be used as a 'peak.running.shortcut' property that expands to another     can be used as a 'peak.running.shortcut' property that expands to another
    command with arbitrary arguments inserted before the original command's     command with arbitrary arguments inserted before the original command's
Line 16 
Line 95 
    'findComponent()', to better distinguish it from 'lookup()' in     'findComponent()', to better distinguish it from 'lookup()' in
    'naming.IBasicContext', which does something very different.     'naming.IBasicContext', which does something very different.
   
  - 'binding.bindTo()' and 'binding.bindSequence()' now pre-adapt their   - 'binding.Obtain()' (formerly 'binding.bindTo()' and 'binding.bindSequence()')
    arguments to 'IComponentKey', to speed lookups at runtime, and to ensure     now pre-adapt their arguments to 'IComponentKey', to speed lookups at
    that errors due to an unusable parameter type occur at class creation time     runtime, and to ensure that errors due to an unusable parameter type occur
    instead of waiting until lookup time.     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   - There's a new 'peak.storage.files' module, with handy classes like
    'EditableFile'.  'EditableFile' is a class that lets you edit the contents     'EditableFile'.  'EditableFile' is a class that lets you edit the contents


Generate output suitable for use with a patch program
Legend:
Removed from v.1372  
changed lines
  Added in v.1403

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help