E&S CVS Commit: PEAK - Added transitive adaptation: declaring an adapter "AB" from A to B, and
pje at eby-sarna.com
pje at eby-sarna.com
Sun May 11 16:17:00 EDT 2003
Module Name: PEAK
Committed By: pje
Date: Sun May 11 20:16:11 UTC 2003
Modified Files:
PEAK: CHANGES.txt
PEAK/src/peak: interface.py
PEAK/src/peak/binding: once.py
PEAK/src/peak/model: features.py
PEAK/src/peak/running: commands.py
PEAK/src/peak/util: advice.py
Log Message:
Added transitive adaptation: declaring an adapter "AB" from A to B, and
"BC" from B to C, automatically implies adaptation from A to C via
BC(AB()). Used it to simplify the mechanism for adapting an IExecutable
to an ICmdLineAppFactory. Refactored some of the interface package's
initial kludges to cleaner mechanisms based on adaptation.
Learned some interesting things along the way... Classic classes don't
have __mro__, which made adapt() break on them. The technique I was using
in the hopes of suppressing unwanted TypeErrors suppressed wanted ones, and
meanwhile there weren't any unwanted ones in PEAK. Finally, Python 2.2
doesn't support 'super()' access to properties, and metamethods are
properties, so you have to use my new 'supermeta' to work around this when
you need to call a super() metamethod. This is supposed to be fixed in
Python 2.3, but not backported 2.2 because Guido considers it a "feature".
Ah well.
To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/CHANGES.txt.diff?r1=1.34&r2=1.35
http://cvs.eby-sarna.com/PEAK/src/peak/interface.py.diff?r1=1.7&r2=1.8
http://cvs.eby-sarna.com/PEAK/src/peak/binding/once.py.diff?r1=1.45&r2=1.46
http://cvs.eby-sarna.com/PEAK/src/peak/model/features.py.diff?r1=1.16&r2=1.17
http://cvs.eby-sarna.com/PEAK/src/peak/running/commands.py.diff?r1=1.18&r2=1.19
http://cvs.eby-sarna.com/PEAK/src/peak/util/advice.py.diff?r1=1.9&r2=1.10
To generate a diff of this commit:
cvs rdiff -r1.34 -r1.35 PEAK/CHANGES.txt
cvs rdiff -r1.7 -r1.8 PEAK/src/peak/interface.py
cvs rdiff -r1.45 -r1.46 PEAK/src/peak/binding/once.py
cvs rdiff -r1.16 -r1.17 PEAK/src/peak/model/features.py
cvs rdiff -r1.18 -r1.19 PEAK/src/peak/running/commands.py
cvs rdiff -r1.9 -r1.10 PEAK/src/peak/util/advice.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