[Subversion] / PEAK / CHANGES.txt  

Revision 1113


Jump to revision:
Previous Next
Author: pje
Date: Tue May 13 00:26:48 2003 UTC (20 years, 11 months ago)

Log Message:

And so we bid a fond farewell to introspection as well.  'isImplementedBy'
is now a thing of the past.  Refactored anything that used it, to now
use adapt(), which has now opened up a lot of extension possibilities in
places that were previously not extensible without modifying PEAK core
code.  See below.  Also, the interface module has been refactored to support
'classProvides()' in a clean and kludge-free fashion, along with support for
faster adaptation of old and new-style classes (by caching lookups, and by
safely adding '__conform__' methods to classic classes), and the ability for
classes to manage their own "implements" information.  The core interface
code is now quite elegant in the way it uses its own adaptation system as
the basis for implementing adaptation.  :)

'binding.Acquire()' now accepts a 'default' value argument, and
'binding.New()' no longer accepts the 'bindToOwner' flag.

There is a new 'binding.IComponentKey' interface that is used to implement
'IComponent.lookupComponent()'.  Now you can implement this interface,
or create an adapter for it, in order to make an object usable as an
argument to 'binding.lookupComponent()' - and therefore usable as a key
for 'binding.bindTo()' or 'binding.bindToSequence()'.  Not that it's
necessarily very useful to do so; you're probably better off simply
creating a naming scheme.  But it might be useful for lookups done
in the context of classes, since naming schemes aren't usable there.
(It was actually added in order to factor out all the type testing that
'lookupComponent' used to do, so it doesn't matter if it's useful for
much else.)

PEAK has been refactored to avoid the use of 'isImplementedBy()' and
similar introspection, in favor of 'adapt()'.  As a result, some
'peak.naming' interfaces have changed.  This should not affect you
if you are only subclassing PEAK-provided naming components and not
implementing these interfaces "from scratch".  However, the various
'isAddress', 'isAddressClass', 'isResolver', and 'isName' APIs have
also been removed, as they were based on 'isImplementedBy()'.

The ability to use 'isImplementedBy()' with interfaces declared by PEAK is
REMOVED.  You can still use 'isImplementedBy()' with Zope interfaces, of
course, but we recommend you switch to 'adapt()', which will work with both
PEAK and Zope interfaces.

Changed paths:

Path Action Text Changes Prop Changes Diff to Previous
PEAK/CHANGES.txt modified X   (diff to previous)
PEAK/docs/core_tutorial/binding.tex modified X   (diff to previous)
PEAK/src/peak/api/__init__.py modified X   (diff to previous)
PEAK/src/peak/binding/components.py modified X   (diff to previous)
PEAK/src/peak/binding/interfaces.py modified X   (diff to previous)
PEAK/src/peak/binding/once.py modified X   (diff to previous)
PEAK/src/peak/config/interfaces.py modified X   (diff to previous)
PEAK/src/peak/interface.py modified X   (diff to previous)
PEAK/src/peak/model/elements.py modified X   (diff to previous)
PEAK/src/peak/naming/URL.py modified X   (diff to previous)
PEAK/src/peak/naming/contexts.py modified X   (diff to previous)
PEAK/src/peak/naming/interfaces.py modified X   (diff to previous)
PEAK/src/peak/naming/names.py modified X   (diff to previous)
PEAK/src/peak/naming/spi.py modified X   (diff to previous)
PEAK/src/peak/running/commands.py modified X   (diff to previous)

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help