Ivo van der Wijk wrote:
On 6/16/05, Jim Fulton <[EMAIL PROTECTED]> wrote:

Ivo van der Wijk wrote:

On 6/14/05, Jim Fulton <[EMAIL PROTECTED]> wrote:

In preparation for the 3.1 release, I made these packages (as
well as zope.app.observable and zope.app.schema) optional and thus
configured vie package includes.  If you have an instance that
uses these, you will need to add package includes for these.

I somewhat missed it - cubic started to work without much errors (the
catalog simply stopped working)

After fixing things/ adding includes, I ran into an old issue again (I
have clean Zope3 svn checkout at this moment, no additional
hacks/workarounds anymore):

 File "/home/ivo/Projects/Zope3/Zope3-svn/src/zope/app/security/adapter.py",
line 88, in __call__    adapter = self.factory(*args)
line 41, in __init__
   raise zope.app.keyreference.interfaces.NotYet(object)
NotYet: <zope.app.workflow.stateful.definition.State object at 0xb3bd076c>

The IntId utility can't handle these exceptions. The following diff
fixes things (for me, at least)

Yes, but I worry that this could hide bugs.

You have an object that could potentially be registered, but
can't be yet because we can't get the database yet.  It is being added.
Later, when it has a database, it won't be added again and so won't be
registered.  This will lead to mysterous bugs where objects that should
be cataloged won't be.

I guess somehow Zope3 is trying to assign an id to workflow state
definitions too early. I can't "retry" this from my code myself (my
request will simply crash with the trace above), the real fix would
probably to make sure that these definitions can get IKeyReferenced,
but this is beyond my knowledge.

I've tried to explicitly _p_jar.add these objects in the past, but
this fails with recent Zope3 versions.

It shouldn't.  Perhaps you could provide some more specific information.

The fact that you can't get key references for persistent objects is a real
pain.  I've thought a lot about that, but haven't come up with a good solution.
(Phillip Eby suggested using GUIDs at one point.  I've always been a bit
suspicious of GUIDs myself.)  One technique that has worked fairly well
for us has been to use savepoints. One interesting side effect of a savepoint
is that new objects get their database and oid set.


Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to