E&S CVS Commit: PEAK - All 'peak.binding' APIs now only accept positional parameters for items

pje at eby-sarna.com pje at eby-sarna.com
Wed Jun 18 14:19:01 EDT 2003

Module Name:	PEAK
Committed By:	pje
Date:		Wed Jun 18 18:27:39 UTC 2003

Modified Files:
	PEAK/src/peak/binding: _once.c _once.pyx components.py once.py
	PEAK/src/peak/binding/tests: __init__.py

Log Message:
All 'peak.binding' APIs now only accept positional parameters for items
unique to that API.  Items common to multiple APIs (such as 'offerAs',
'doc', 'attrName', etc.) should now be supplied as keyword arguments.

Bindings also now automatically "suggest" the containing object as a parent
component for the contained object, whenever a value is assigned to them or
computed.  If a non-None 'adaptTo' is set on the binding, the value assigned
or computed will be adapted to the specified protocol before the parent
component is suggested.  'binding.New()' no longer relies on the
'IComponentFactory' interface, but instead uses the new adapt/suggest

Previously, parent components were only "suggested" when a binding was set
via component constructor keyword arguments.  Now, this is done at any time
bindings are set, but *not* for non-binding keyword arguments.  In other
words, ordinary attributes of a component do not receive "suggested parent"
notices, even when set via constructor keyword arguments.  If you want an
attribute to do this, you must define the attribute with the binding API;
e.g. via 'requireBinding()' or 'binding.Constant()'.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.49 -r1.50 PEAK/CHANGES.txt
cvs rdiff -r1.64 -r1.65 PEAK/TODO.txt
cvs rdiff -r1.9 -r1.10 PEAK/src/peak/binding/_once.c \
cvs rdiff -r1.120 -r1.121 PEAK/src/peak/binding/components.py
cvs rdiff -r1.54 -r1.55 PEAK/src/peak/binding/once.py
cvs rdiff -r1.34 -r1.35 PEAK/src/peak/binding/tests/__init__.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list