[Zope3-dev] possible bug in catalog code

2005-07-07 Thread Martijn Faassen
Hi there, in zope.app.catalog.attribute, there's the following functionality: def index_doc(self, docid, object): if self.interface is not None: object = self.interface(object, None) if object is None: return None value =

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Hi there, in zope.app.catalog.attribute, there's the following functionality: def index_doc(self, docid, object): if self.interface is not None: object = self.interface(object, None) if object is None: return None

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Martijn Faassen
Jim Fulton wrote: [snip] It would only be safe to use None as a BTree key if all of the keys used were None, which wouldn't be very interesting. :) It'd also make sense if you didn't do a range query, right? I.e. you're just looking for (None, None). I realize though that queries with None

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Jim Fulton wrote: [snip] It would only be safe to use None as a BTree key if all of the keys used were None, which wouldn't be very interesting. :) It'd also make sense if you didn't do a range query, right? I.e. you're just looking for (None, None). I realize though

[Zope3-dev] announcing cxoracleda initial release 0.1

2005-07-07 Thread Bernd Dorn
Hi Community I wrote an Oracle Database Adapter for Zope 3 which uses the cx_Oracle libraries. I used the mysqldba http://svn.zope.org/mysqldbda/trunk/ as a template. This version is not that much tested and can be seen as an experimental case-study. But it might be usefull as an example on

[Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Martijn Faassen
Hi there, We just noticed that some objects were not being cataloged correctly. After a lot of debugging, we noticed the following: The IntId utility wouldn't find the unique id for an object when a modified event was sent. As a result, it wasn't being indexed. We figured out that there

RE: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Roger Ineichen
Hi Martijn and Jim Behalf Of Martijn Faassen Sent: Thursday, July 07, 2005 2:22 PM To: zope3-dev (E-mail) Subject: [Zope3-dev] interaction between LocationProxy and IIntId utility Hi there, [..] Finally with some help from Stephan Richter giving us the clue that this __name__ and

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Tim Peters
[Jim Fulton] | ... AFAICT, Python still makes no guarantee wrt comparison of of objects of different types over time: That's true, and in particular the relative (wrt objects of non-None types) ordering of None _has_ changed across CPython releases. The Total Ordering and Persistence section

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Hi there, We just noticed that some objects were not being cataloged correctly. After a lot of debugging, we noticed the following: The IntId utility wouldn't find the unique id for an object when a modified event was sent. As a result, it wasn't being indexed. We

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Martijn Faassen
Jim Fulton wrote: Martijn Faassen wrote: [snip] What is stored in the ZODB are LocationProxy wrapped objects. I think you mean ContainedProxy objects. Yes, I imagine so. The location proxy wrappers get a unique id reference in the IntId utility, not the objects themselves. Now when you

[Zope3-dev] small problem in zc.page?

2005-07-07 Thread Martijn Faassen
Hi there, First of all, zc.page's form machinery is holding up pretty well so far, thanks! I did notice what might be a small problem though -- when using a zc.page EditForm in the Zope 3.1 beta, I get the following error when submitting it: TypeError: ('Could not adapt',

[Zope3-dev] actions and subclasses in zc.page

2005-07-07 Thread Martijn Faassen
Hi there, I noticed another possible oddness with zc.page. When I subclass form.PageEditForm, I normally get an 'edit' action provided with it, as the baseclass defines this. If I however add my own actions in the subclass, like this: @form.action(Another) def handle_another_action(self,

Re: [Zope3-dev] small problem in zc.page?

2005-07-07 Thread Martijn Faassen
Christian Theune wrote: [snip] I'm actually interested in what the plans/needs for zc.page are to move into core. Maybe I/we can spend some time on bug fixing ... Even if not in the core, it'd already help if this wasn't a one-time snapshot but a SVN repository where we can check in.

Re: [Zope3-dev] small problem in zc.page?

2005-07-07 Thread Christian Theune
Am Donnerstag, den 07.07.2005, 19:23 +0200 schrieb Martijn Faassen: Even if not in the core, it'd already help if this wasn't a one-time snapshot but a SVN repository where we can check in. ack. -- gocept gmbh co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - [EMAIL

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Martijn Faassen wrote: Jim Fulton wrote: ... - Implement ILocation in your content objects. This is the simplest course. It sounds like, for your application, the content objects should know about their locations, since you want them to be able to generate events that contain location

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Roger Ineichen wrote: Hi Martijn and Jim Behalf Of Martijn Faassen Sent: Thursday, July 07, 2005 2:22 PM To: zope3-dev (E-mail) Subject: [Zope3-dev] interaction between LocationProxy and IIntId utility Hi there, [..] Finally with some help from Stephan Richter giving us the clue that

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Jim Fulton
Jim Fulton wrote: Martijn Faassen wrote: ... If an object doesn't participate in the location framework, then we have to create a second object that provides location, the ContainedProxy. There are really two distinct objects. You want the intid to point to the proxy, so you get the

Re: [Zope3-dev] interaction between LocationProxy and IIntId utility

2005-07-07 Thread Benji York
Jim Fulton wrote: We don't want to *require* objects to provide ILocation. I don't know what the right answer is here. I'll think about it. I'd love some good suggestions. Perhaps an ILocation adapter that would keep the __name__ and __parent__ information in a separate place (attribute

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Dieter Maurer
Jim Fulton wrote at 2005-7-7 06:55 -0400: ... [Martijn] The following sequence I think leads to trouble: value = getattr(object, self.field_name, None) if value is None: return None as this means attributes that do exist and have the value None would never

Re: [Zope3-dev] possible bug in catalog code

2005-07-07 Thread Tim Peters
[Dieter Maurer] The current Python falls back to order by type name and than by id. Except that in current CPython releases, None is an exception to that, like class C(object): ... pass c = C() None c # None is less than c True type(None).__name__ type(c).__name__ # although its type

Re: [Zope3-dev] small problem in zc.page?

2005-07-07 Thread Martijn Faassen
Jim Fulton wrote: Martijn Faassen wrote: Christian Theune wrote: [snip] I'm actually interested in what the plans/needs for zc.page are to move into core. Maybe I/we can spend some time on bug fixing ... Even if not in the core, it'd already help if this wasn't a one-time snapshot but a

[Zope3-dev] Re: interaction between LocationProxy and IIntId utility

2005-07-07 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: Martijn Faassen wrote: Jim Fulton wrote: ... - Implement ILocation in your content objects. This is the simplest course. It sounds like, for your application, the content objects should know about their locations, since