E&S CVS Commit: pylib - Refactored to eliminate use of 'parents' tuple-chain and replace with

pje at eby-sarna.com pje at eby-sarna.com
Sat Dec 29 23:34:00 EST 2001


Module Name:	pylib
Committed By:	pje
Date:		Sun Dec 30 04:33:35 UTC 2001

Modified Files:
	pylib/TW: Builders.py Components.py Interfaces.py
	pylib/TW/Database: DataModel.py

Log Message:
Refactored to eliminate use of 'parents' tuple-chain and replace with
weak references.  Also, updated main Interfaces file to follow the new
"selfless" style of interface documentation.

Backward Incompatibilities:

* The IBuilder and IParentBuilder interfaces have changed.  If you
have implemented builder classes of your own, you must change them to
conform to the new API.  This means removing the 'parents=()' parameters,
and using self.getParent() to get your parent object.  If you created a
builder that doesn't subclass a TransWarp "builtin" builder, you will also
have to implement some new methods (such as getParent()).  See IBuilder
and AbstractBuilder for details.

* SimplePostProcessor now passes itself into calls on its targets, rather
than a 'parents' chain.  You must update any of your uses of
SimplePostProcessor to reflect this.  (See this change's diff for
TW.Database.DataModel to see an example of how to update such a usage.)

Note that this is just phase 1 of a major refactoring effort.  See the
TransWarp mailing list for details, and feel free to use the
LAST_CHANCE_FOR_OLD_API tag to avoid this and the coming refactorings.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/pylib/TW/Builders.py.diff?r1=1.21&r2=1.22
http://cvs.eby-sarna.com/pylib/TW/Components.py.diff?r1=1.32&r2=1.33
http://cvs.eby-sarna.com/pylib/TW/Interfaces.py.diff?r1=1.7&r2=1.8
http://cvs.eby-sarna.com/pylib/TW/Database/DataModel.py.diff?r1=1.5&r2=1.6

To generate a diff of this commit:
cvs rdiff -r1.21 -r1.22 pylib/TW/Builders.py
cvs rdiff -r1.32 -r1.33 pylib/TW/Components.py
cvs rdiff -r1.7 -r1.8 pylib/TW/Interfaces.py
cvs rdiff -r1.5 -r1.6 pylib/TW/Database/DataModel.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