Re: [Zope-dev] Interface for renderable component

2008-11-06 Thread Michael Howitz
Am 17.09.2008 um 01:57 schrieb Roger Ineichen:
[...]
 Could this package be called ``zope.browser`` then?

 +1 to this hot topic

 I like the idea to have a pure interface package
 for some basic (context, request) adapter components
 called views, browser pages or contentprovider etc.


Hi, is there any progress on this idea? Anyone who plans to implement  
it?


Yours sincerely,
-- 
Michael Howitz · [EMAIL PROTECTED] · software developer
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Will new release of zope3 include TSL/SSL in zope.sendmail

2008-11-06 Thread Jayarajan Jn
Hi ALL,

When will the next release of zope3 will be? will there be a zope3.4c2? By
the way i wish to know whether next release will include the latest release
of zope.sendmail which has TSL/SSL feature.

I have noticed that last release, zope3.4c01 was on 31 Jan  2008.

http://www.zope.org/Products/Zope3/3.4.0c1

And the zope.sendmail has trunked SSL/TLS feature on 19th Aug 2008.

http://svn.zope.org/zope.sendmail/trunk/src/zope/sendmail/mailer.py?rev=92747sortby=logview=log

So its obvious that zope3.4c01 don't have SSL/TLS feature in its
zope.sendmail. And i have seen some other many other fixes in the
zope.sendmail that enables it to work well with gmail and similar

So i hope we can see new zope.sendmail in the next release.

Regards,
jayaraj
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] [Zope3-Users] Will new release of zope3 include TSL/SSL in zope.sendmail

2008-11-06 Thread Andreas Jung

On 06.11.2008 10:31 Uhr, Jayarajan Jn wrote:

Hi ALL,

When will the next release of zope3 will be? will there be a zope3.4c2?
By the way i wish to know whether next release will include the latest
release of zope.sendmail which has TSL/SSL feature.

I have noticed that last release, zope3.4c01 was on 31 Jan 2008.

http://www.zope.org/Products/Zope3/3.4.0c1

And the zope.sendmail has trunked SSL/TLS feature on 19th Aug 2008.


You mean 2007!


http://svn.zope.org/zope.sendmail/trunk/src/zope/sendmail/mailer.py?rev=92747sortby=logview=log
http://svn.zope.org/zope.sendmail/trunk/src/zope/sendmail/mailer.py?rev=92747sortby=logview=log

So its obvious that zope3.4c01 don't have SSL/TLS feature in its
zope.sendmail. And i have seen some other many other fixes in the
zope.sendmail that enables it to work well with gmail and similar



Those changes should be at least in the latest zope.sendmail 3.5.X
releases. In the time of components and buildout you should be able to 
upgrade the zope.sendmail dependency easily yourself.


-aj
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] misterious btree issue

2008-11-06 Thread Adam GROSZER
Hello,

I've run into a misterious issue while evolving generations from an
old DB.

Quick fact is that it seems like a BTree kept an object reference to
an object which was deleted from it. I'll try to explain/dig into
below.

BTrees source is of revision 75706, running on win32, compiled with
mingw32.

The evolution is about totally removing a utility because it's source
will be ripped out in the next generation. It's in z3c.vocabulary.
The utility contains objects in BtreeContainers recursively.

Problem was that the loop at #kill ALL should have removed all object
references from IntIds.
For the first look it removed all, the loop at #clean intids never
found one (toremove was always empty).
All seemed fine, until the next generation came along and
tried to touch all objects in ZODB. (ZODB was packed first)
And *failed* on an instance of the utility. (source was gone)
Debugging that found utility with
http://www.zopelabs.com/cookbook/1114086617 clearly showed that 
it is still referenced by the IntIds.ids OIBTree, though impossible to
reach via IntIds.ids.keys() or IntIds.ids.values().

What helped was to recreate both IntId BTrees from scratch, like at
#recreate intid trees. That and packing made the utility finally go
away.

Anybody noticed something like this?

--
def evolve(context):
Evolve the ZODB.

- remove IVocabularyManager utilities


root = getRootFolder(context)

storage = context.connection._storage

for site in findObjectsProviding(root, interfaces.IRecruiterSite):
originalSite = hooks.getSite()
hooks.setSite(site)

sm = site.getSiteManager()
if sm['default'].has_key('vocabularyManager'):
vm = sm['default']['vocabularyManager']

##kill ALL
#remove all items from the utility to remove them from IntIds
for k,v in list(vm.items()):
for kk, vv in list(v.items()):
for kkk, vvv in list(vv.items()):
del vv[kkk]
del v[kk]
del vm[k]

sm.unregisterUtility(vm, IVocabularyManager, '')
del sm['default']['vocabularyManager']

if sm['default'].has_key('ids'):
#clean intids
iidutil = sm['default']['ids']
toremove = []
for id in iidutil:
obj = iidutil.getObject(id)
if not belowsite(obj, site):
toremove.append(obj)

if obj.__module__.startswith(z3c.vocabulary):
toremove.append(obj)

for k, id in iidutil.ids.items():
obj = iidutil.getObject(id)
if obj.__module__.startswith(z3c.vocabulary):
toremove.append(obj)
if k.object.__module__.startswith(z3c.vocabulary):
toremove.append(k.object)

for obj in toremove:
iidutil.unregister(obj)

#recreate intid trees:
#because it seems like sometimes some buckets or whatever
#reference objects once they are long gone
ids = iidutil.ids
refs = iidutil.refs
iidutil.ids = iidutil.family.OI.BTree()
iidutil.refs = iidutil.family.IO.BTree()

for k,v in ids.items():
iidutil.ids[k] = v

for k,v in refs.items():
iidutil.refs[k] = v

---
#next generation touching all objects
def evolve(context):
Evolve the ZODB.

storage = context.connection._storage

next_oid = None
while True:
oid, tid, data, next_oid = storage.record_iternext(next_oid)

modname, classname = get_pickle_metadata(data)

obj = context.connection.get(oid)
# Make sure that we tell all objects that they have been changed. Who
# cares whether it is true! :-)
obj._p_activate()
obj._p_changed = True

if next_oid is None:
break


-- 
Best regards,
 Adam GROSZER  mailto:[EMAIL PROTECTED]
--
Quote of the day:
When a deep injury is done us, we never recover until we forgive. 
- Alan Paton 

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 4 OK, 2 Failed

2008-11-06 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Wed Nov  5 12:00:00 2008 UTC to Thu Nov  6 12:00:00 2008 UTC.
There were 6 messages: 6 from Zope Tests.


Test failures
-

Subject: FAILED (failures=2) : Zope-trunk Python-2.4.5 : Linux
From: Zope Tests
Date: Wed Nov  5 20:39:55 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010434.html

Subject: FAILED (failures=2) : Zope-trunk Python-2.5.2 : Linux
From: Zope Tests
Date: Wed Nov  5 20:41:25 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010435.html


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.7 : Linux
From: Zope Tests
Date: Wed Nov  5 20:33:55 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010430.html

Subject: OK : Zope-2.9 Python-2.4.5 : Linux
From: Zope Tests
Date: Wed Nov  5 20:35:25 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010431.html

Subject: OK : Zope-2.10 Python-2.4.5 : Linux
From: Zope Tests
Date: Wed Nov  5 20:36:55 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010432.html

Subject: OK : Zope-2.11 Python-2.4.5 : Linux
From: Zope Tests
Date: Wed Nov  5 20:38:25 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010433.html

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] misterious btree issue

2008-11-06 Thread Jacob Holm
Hi Adam

Adam GROSZER wrote:
 Hello,

 I've run into a misterious issue while evolving generations from an
 old DB.

 Quick fact is that it seems like a BTree kept an object reference to
 an object which was deleted from it. 
[snip]

Yes, the BTree implementations we use may keep a reference to a deleted 
key. I think I have seen this documented somewhere but don't have the 
time to look it up now. It saves some bookkeeping to do it that way, and 
I think it also reduces the risk of conflict errors.

 What helped was to recreate both IntId BTrees from scratch, like at
 #recreate intid trees. That and packing made the utility finally go
 away.

 Anybody noticed something like this
Yes, I ran into this a few weeks ago when I needed to delete the code 
for an obsolete content type. IIRC you only really need to recreate the 
mapping from keyreferences to intids (the ids attribute of the default 
IIntIds utility).


Hope this helps

- Jacob
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Event for system shutdown?

2008-11-06 Thread Andreas Jung

Is there an event in Zope 3 indicating a Zope server shutdown?

Andreas

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] misterious btree issue

2008-11-06 Thread Jim Fulton

On Nov 6, 2008, at 8:14 AM, Jacob Holm wrote:

 Hi Adam

 Adam GROSZER wrote:
 Hello,

 I've run into a misterious issue while evolving generations from an
 old DB.

 Quick fact is that it seems like a BTree kept an object reference to
 an object which was deleted from it.
 [snip]

 Yes, the BTree implementations we use may keep a reference to a  
 deleted
 key. I think I have seen this documented somewhere but don't have the
 time to look it up now. It saves some bookkeeping to do it that way,  
 and
 I think it also reduces the risk of conflict errors.

In particular, it might have a reference to the key in an internal  
BTree node.
(I don't know this to be true, but I wouldn't be surprised if it was  
true.)
If this is the case, we can definitely fix it.

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] misterious btree issue

2008-11-06 Thread Tim Peters
[Jim Fulton]
 In particular, it might have a reference to the key in an internal
 BTree node.
 (I don't know this to be true, but I wouldn't be surprised if it was
 true.)

It was true when I was working on BTrees ... here, from


http://svn.zope.org/ZODB/trunk/src/BTrees/Development.txt?rev=85198view=markup

...
+ When a key is deleted, it's physically removed from the bucket
it's in, but
  this doesn't propagate back up the tree: since keys in interior nodes only
  serve to guide searches, it's OK-- and saves time --to leave
stale keys in
  interior nodes.
...

 If this is the case, we can definitely fix it.

Right, just delete that paragraph ;-)
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] misterious btree issue

2008-11-06 Thread Jim Fulton

On Nov 6, 2008, at 11:32 AM, Tim Peters wrote:

 [Jim Fulton]
 In particular, it might have a reference to the key in an internal
 BTree node.
 (I don't know this to be true, but I wouldn't be surprised if it was
 true.)

 It was true when I was working on BTrees ... here, from


 http://svn.zope.org/ZODB/trunk/src/BTrees/Development.txt?rev=85198view=markup

...
+ When a key is deleted, it's physically removed from the bucket
 it's in, but
  this doesn't propagate back up the tree: since keys in interior  
 nodes only
  serve to guide searches, it's OK-- and saves time --to leave
 stale keys in
  interior nodes.
...

 If this is the case, we can definitely fix it.

 Right, just delete that paragraph ;-)

:)

It would be great if someone (Adam?) created a launchpad issue to fix  
this.

If I get into the BTree code, which I may do to make sizes setable via  
class attributes, I'll look at fixing this.

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] misterious btree issue

2008-11-06 Thread Adam GROSZER
Hello Jim,

Does this fit?

https://bugs.launchpad.net/zope3/+bug/294788

Thursday, November 6, 2008, 6:14:34 PM, you wrote:

JF On Nov 6, 2008, at 11:32 AM, Tim Peters wrote:

 [Jim Fulton]
 In particular, it might have a reference to the key in an internal
 BTree node.
 (I don't know this to be true, but I wouldn't be surprised if it was
 true.)

 It was true when I was working on BTrees ... here, from


 http://svn.zope.org/ZODB/trunk/src/BTrees/Development.txt?rev=85198view=markup

...
+ When a key is deleted, it's physically removed from the bucket
 it's in, but
  this doesn't propagate back up the tree: since keys in interior  
 nodes only
  serve to guide searches, it's OK-- and saves time --to leave
 stale keys in
  interior nodes.
...

 If this is the case, we can definitely fix it.

 Right, just delete that paragraph ;-)

JF :)

JF It would be great if someone (Adam?) created a launchpad issue to fix
JF this.

JF If I get into the BTree code, which I may do to make sizes setable via
JF class attributes, I'll look at fixing this.

JF Jim

JF --
JF Jim Fulton
JF Zope Corporation



-- 
Best regards,
 Adam GROSZERmailto:[EMAIL PROTECTED]
--
Quote of the day:
When the wind is great, bow before it; when the wind is heavy, yield to it.

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] misterious btree issue

2008-11-06 Thread Jim Fulton

On Nov 6, 2008, at 1:06 PM, Adam GROSZER wrote:

 Hello Jim,

 Does this fit?

 https://bugs.launchpad.net/zope3/+bug/294788


Yup. Thanks!

Jim

--
Jim Fulton
Zope Corporation


___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] catalog performance: query plan

2008-11-06 Thread Lennart Regebro
On Mon, Oct 27, 2008 at 17:32, Alan Runyan [EMAIL PROTECTED] wrote:
 I agree with Tres.  A lot more can be done with Indexes and Catalog
 without caching.

 The most exiciting development in Catalog optimizations comes out
 Jarn.  Helge Tesdal (iirc) did a buncha work  at a RDBMS company when
 he was in college.  He has a protoype of a query plan for ZCatalog.

 http://www.jarn.com/blog/catalog-query-plan

 I would like to ask Roche and others to look at the Query Plan.

 Caching is a total PITA because invalidation machinery becomes
 overwhelming complex and unwieldly quickly in production.

I don't know very much about searching, but this definitely sounds
like a good idea. Also, especially when doing free text searching that
has large result sets, incremental searching is very beneficial. I
know Dieter Maurer has made a Zope2 implementation of this.

I would be interested in seeing a bunch of Gurus sit down at some
sprint and trying to come up with a catalog engine that is incremental
and uses query plans. There is no reason that would not be stupidly
fast. :) We can then make a new catalog that uses this engine but has
the same API as the old one, to ship with some future version of Zope,
say 2.12.

-- 
Lennart Regebro: Zope and Plone consulting.
http://www.colliberty.com/
+33 661 58 14 64
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )