[Zope-dev] 0.4.0 prerelease snapshot (was zpatterns-0.4 ?)
Phillip J. Eby
pje@telecommunity.com
Sat, 10 Jun 2000 20:17:27 -0500
By popular demand, I am releasing a development snapshot of version 0.4.0.
Please see the main ZPatterns download page.
This is EXTREMELY ALPHA and includes a fair amount of code that just got
written or debugged today. Actually, most of the stuff I wrote today got
exercised pretty well. I'm more concerned about whether I broke anything
that worked before in the process, as I haven't come up a way to regression
test this thing except manually. :(
Anyway... there are quite a few undone bits as yet, but the main things
are there. DataSkins, and Folders w/Customizer support, for example. Ty's
ExprGetter AttributeProvider, which is pretty cool, and my updates to it to
make it even cooler. :)
Some things that may not work right... DataSkins need to have their
_objectAdding()/_objectDeleting() methods called from
manage_afterAdd/manage_beforeDelete, and if you subclass ObjectManager or
CatalogAware or anything else with custom hooks for these methods, you may
break add/delete events, which are required for some things to work. This
might not affect you in the prerelease, because not much is wired to the
events yet. But they may break in the final release.
In general, you should assume that this release is dangerous. On various
occasions today, it has caused Zope to dump core. In each case, I found
and fixed the problems, which had to do with the new deep
acquisitional/transactional/computedattribute magic for DataSkins. There
is no guarantee, however, that I have fixed all such bugs.
I reserve the right to make incompatible changes between this release and
the final 0.4.0, that would require you to delete all prerelease-based
objects and start over. (I am doing my best to maintain transparent
upgradability from 0.3.0, however. But I won't be putting in data upgrade
code for interim releases.)
Last, but not least, the docs are even worse than usual for my releases,
and some of the newer objects have ugly, missing, or confusing interim
icons. So all in all, use at your own risk.
At 04:06 PM 6/7/00 +0300, Itamar Shtull-Trauring wrote:
>"Phillip J. Eby" wrote:
>
>> I'm shooting for release by the end of next week. Search plugins have not
>> been finished yet, but in any case they will NOT work with prior versions;
>> there is no place to plug them in, nor will any of the old code call
them. :)
>
>Could you maybe release a preliminary version in the beginnng of the week,
>even if it's not finished? I'd like to start designing a Product using the
>events-sending interfaces, and it'd be a real help if I could know even
>approximately what the interfaces looked like. Not that I'm rushing you or
>anything :)
Have a look at Agents.py in the new release. To have an object that
receives events, subclass the Agent class, and override:
def _getMementoFor(self,client):
def _objectChanged(self,client,memento):
def _objectDeleted(self,client,memento):
def _objectAdded(self,client):
as appropriate. getMemento should return a snapshot of any data you want
passed into the methods that take a "memento" parameter. Make sure your
memento contains only "immutables all the way down", since the object
you're watching ("client")might change anything that's mutable.
By the way, the final release of 0.4.0 should (time permitting) include an
"ExprNotifier" which can automatically translate the above events into
calls to arbitrary DTML expressions, including handling memento generation
for you by saving specified expressions executed against the object before
it changes.