Re: [Zope-dev] ConflictError

2003-03-28 Thread Dieter Maurer
Andre Schubert wrote at 2003-3-28 10:15 +0100:
 > i have a little problem with the following log-entry in my logfile.
 > 
 > 2003-03-28T10:09:18 INFO(0) ZODB conflict error at /foo/bar/tab_kopf (1 conflicts 
 > since startup at 2003-03-28T10:09:03).
 > 
 > After searching through several mailinglists i found that this
 > error seem to occur when using sessions, i'am right ?
 > But my problem is, that tab_kopf is a ImageFile defined in my Product.
 > 
 > tab_kopf = ImageFile('www/tab_kopf.gif',globals())
 > 
 > I dont understand how there could be a ConflictError on a Image ?
 > I hope someone could give me a tip whats going on.

Please file a feature request to "".
Zope should distinguish between "Write" and "Read conflict errors".
You can try the necessary modification yourself. Patch
for Zope 2.6.1 attached.

You probably see a "Database read conflict error".
It may happen for reading "foo", "bar" or "tab_kopf".
The patch will give you hints what object got this error.


Dieter

--- Zope/App/startup.py~	2003-02-28 16:59:25.0 +0100
+++ Zope/App/startup.py	2003-03-17 11:13:28.0 +0100
@@ -140,9 +140,9 @@
 global conflict_errors
 conflict_errors = conflict_errors + 1
 method_name = REQUEST.get('PATH_INFO', '')
-err = ('ZODB conflict error at %s '
+err = ('ZODB conflict error at %s: %s'
'(%s conflicts since startup at %s)')
-LOG(err % (method_name, conflict_errors, startup_time),
+LOG(err % (method_name, str(v), conflict_errors, startup_time),
 INFO, '')
 LOG('Conflict traceback', BLATHER, '', error=sys.exc_info())
 raise ZPublisher.Retry(t, v, traceback)


Re: [Zope-dev] Documenting products with epydoc

2003-03-28 Thread Dieter Maurer
Gilles Lenfant wrote at 2003-3-27 16:40 +0100:
 > I use to document my (non Zope) python packages using epydoc that's (IMHO)
 > the best python documentation tool (javadoc like great features).
 > 
 > http://epydoc.sourceforge.net/
 > 
 > Unfortunately, this does not work with Zope products (usual pydoc doesn't
 > too).
 > 
 > How can I make a fixure to get it working ? Did any of you succeed
 > documenting Zope products with epydoc ?

You may look at my "pydoc" patches.
Maybe, something similar allows you to use "epydoc", too.

  


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Call Product Constructor

2003-03-28 Thread Matt Ficken
This is the __init__.py of my product (ZID):

from ZIDProduct import ZID

def initialize ( context ):
  context.registerClass(
ZID,
constructors = (
  ZID.manage_addZIDForm,
  ZID.manage_addZID,
  ZID.manage_add_folder
)
  )

I want the constructor ZID.manage_add_folder to get called at the end of the 
initialize function. How do I do this?
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Let's have another bug day

2003-03-28 Thread Chris Withers
Leonardo Rochael Almeida wrote:
How about the next Wed after that (9/4)?
That works for me :-)

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] ConflictError

2003-03-28 Thread Leonardo Rochael Almeida
On Fri, 2003-03-28 at 06:15, Andre Schubert wrote:
> Hi all,
> 
> i have a little problem with the following log-entry in my logfile.
> 
> 2003-03-28T10:09:18 INFO(0) ZODB conflict error at /foo/bar/tab_kopf (1 conflicts 
> since startup at 2003-03-28T10:09:03).
> 
> After searching through several mailinglists i found that this
> error seem to occur when using sessions, i'am right ?
> But my problem is, that tab_kopf is a ImageFile defined in my Product.
> 
> tab_kopf = ImageFile('www/tab_kopf.gif',globals())
> 
> I dont understand how there could be a ConflictError on a Image ?
> I hope someone could give me a tip whats going on.

Conflict Errors are things that can happen during the normal course of a
Zope operation. They happen whenever a request tries to read or write an
object for the first time in a request (transaction) that started before
another request (transaction) that already modified such object. Zope
automatically restarts the conflicting transaction, so the only visible
effect is a little delay before the transaction finishes.

You should only worry if you're seeing a copious amount of such
messages, or if you are seeing these errors in the browser, which
happens after zope retries the transaction 3 times and still gets a
conflict error, in which case it gives up.

Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Let's have another bug day

2003-03-28 Thread Leonardo Rochael Almeida
On Thu, 2003-03-27 at 15:23, Brian Lloyd wrote:

> I just threw a date out there because someone had to :)
> 
> If there is one that would work better for the bulk of the 
> folks interested, pls do...

How about the next Wed after that (9/4)?

Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] ConflictError

2003-03-28 Thread Andre Schubert
Hi all,

i have a little problem with the following log-entry in my logfile.

2003-03-28T10:09:18 INFO(0) ZODB conflict error at /foo/bar/tab_kopf (1 conflicts 
since startup at 2003-03-28T10:09:03).

After searching through several mailinglists i found that this
error seem to occur when using sessions, i'am right ?
But my problem is, that tab_kopf is a ImageFile defined in my Product.

tab_kopf = ImageFile('www/tab_kopf.gif',globals())

I dont understand how there could be a ConflictError on a Image ?
I hope someone could give me a tip whats going on.

Thanks in advance, as

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: Documenting products with epydoc

2003-03-28 Thread Yuppie
Hi Gilles!

Gilles Lenfant wrote:
Unfortunately, this does not work with Zope products (usual pydoc doesn't
too).
How can I make a fixure to get it working ? Did any of you succeed
documenting Zope products with epydoc ?
Two weeks ago I wrote a patch for the cvs version of epydoc that works 
with Zope 2 ExtensionClasses. It's not released because there are still 
some bugs, but if you like I could send you the patch.

Cheers,

Yuppie



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )