Re: [Zope-dev] forking of the mailing list
On Tue, 24 Apr 2001 15:15:01 -0700, Andy McKay [EMAIL PROTECTED] wrote: There was a discussion on [EMAIL PROTECTED] about forking of the mailing list. Would there be any support behind a seperate ZPatterns list? There seem to be lots of users and lots of questions that arent of interest to people who dont use ZPatterns (like me). I dont use ZPatterns, and regularly ignore whole ZPattern-related threads. However I value the fact that an occasional a subject line catches my eye, and I have a chance to learn something new. I might not be using ZPatterns today, but that doesnt mean that it is wholly irrelevant to me. This morning (for me) zope-dev had 87 new messages in 29 threads. Do people really find this to be too many? Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] deepcopy of file object
Chris Withers writes: ... copying ZODB objects ... I use the following function: def _clone(o): clone an object. Currently, a deep copy is used; maybe we should use a shallow copy instead. c= cPickle.loads(cPickle.dumps(o.aq_base,1)) c._p_oid= None return c Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [ZODB-Dev] External transaction integration bug in TM.py
Sorry I took so long to reply. Randall F. Kern wrote: [Originally sent to zope-dev, but belongs here] I'm CCing zope-dev, since you posted there too. I may just be missing something obvious here, but it seems like there is a hole in ZODB.Transaction.Transaction.commit and Shared.DC.ZRDB.TM.TM, that can cause external transactions (those that use the TM mixin class, like psycopg) to be abandoned (never get committed or rolled back). Let's say somewhere around line 300 in Transaction.py (the call to j.commit(o, self)) we get an exception. Furthermore, let's say the TM derived database object has already been committed (the only effect of which is to move the DB into the jars mapping, since TM.tpc_begin() and TM.commit() both do nothing). The exception dumps us down to about line 353, where we call _p_jar.abort() on all the uncommitted objects (note: it's important that the database connection isn't in this list, because TM.abort() will rollback the transaction. the way we keep the db out of this list is by having it appear in objects _before_ the object that failed the commit). Next we reach line ~366, where we should unwind TPC for the jars that began it. What this means is calling tpc_abort() on each jar from the objects that were already committed (which includes the database). However, TM.tpc_abort() does nothing, leaving the external database transaction open. Does this make sense? Yup, fraid so. If this makes sense (i.e. seems bad :), does catching tpc_abort() in TM and calling TM.abort() seem like a valid fix? This change certainly seems to fix the problems. Yes. I think this is an improvement. Thanks. I'll check this in. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! Technical Director (888) 344-4332http://www.python.org Digital Creationshttp://www.digicool.com http://www.zope.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] pydoc for Zope - another great documentation finding tool
Great, Dieter! If anyone can post a link to some example output, please do. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] forking of the mailing list
There was a discussion on [EMAIL PROTECTED] about forking of the mailing list. Would there be any support behind a seperate ZPatterns list? There seem to be lots of users and lots of questions that arent of interest to people who dont use ZPatterns (like me). This morning (for me) zope-dev had 87 new messages in 29 threads. Do people really find this to be too many? Nope zope-dev is my favourite list for its low traffic and great posters. Just a suggestion that came up when the forking question came up on the zope list. Im happy the way it is... Cheers. -- Andy McKay. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Memory leak (2)
Just occured to me if Im leaking REQUEST it would be nice to see exactly which requests im leaking. But is that really covered by the -M logger, if a request fails to be closed in there does that really translate to a leaked request? I had a look in the code and it wasn't obvious to me Cheers. -- Andy McKay. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
RE: [Zope-dev] ZPatterns Design Issue
I generally follow this approach for long lists and reports, but the tree tag is a bit more tricky because you only have a simple data object without the context that a real object provides. A real object makes it a lot simpler if you recursively draw a hierarchy - doing it with simple data objects requires some thinking but thanks for pointing me in the right direction. Roché Just return the result directly. If the data is all from SQL, that's all you need to do. The catch is that you may have to structure your ZClass differently to allow it to be returned from an SQL method. The simplest thing, though, is to define your application API's so that methods which must return multiple objects in this fashion are returning sequences of simple data objects which do not provide the full semantics of the real objects. In essence, define the API as returning reporting data rather than objects. This is similar to the ZCatalog approach which returns dumb record objects, but can optionally retrieve the real object if needed. It is generally the best approach for report-like situations (such as use of the tree tag). ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] New Medusa release integrated into the trunk
Hi folks, I replaced the old Medusa code by a new up-to-date version of Medusa in the trunk. Please update your checkouts of the trunk using the -d option of get complete Medusa hierarchy. Andreas Jung Digital Creations ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] question: which user was the last to modify an object?
Hi all, The undo form shows interesting info about transactions, for example their modification times. It's easy to know the last time an object was modified with bobobase_modification_time. But, is there an easy way to get the name of the user that made the last modification of an object? thanks, jdavid ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] question: which user was the last to modify an object?
You might find the History mapping easier. Heres an example from way back: dtml-if manage_change_history dtml-in manage_change_history mapping dtml-if sequence-start dtml-var user_name /dtml-if /dtml-in /dtml-if Would be easier in Python... Cheers. -- Andy McKay. - Original Message - From: Juan David Ibáñez Palomar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 25, 2001 9:42 AM Subject: [Zope-dev] question: which user was the last to modify an object? Hi all, The undo form shows interesting info about transactions, for example their modification times. It's easy to know the last time an object was modified with bobobase_modification_time. But, is there an easy way to get the name of the user that made the last modification of an object? thanks, jdavid ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Memory leak (2)
It's not covered by the data output into the -M log. Objects can leak without requests hanging or taking a long time. But you might be able to turn on profiling (set the PROFILE_PUBLISHER env var to a filename and restart Zope) on a *test* box (do not do it in production, it drastically effects performance), and look at the profile output. If the memory loss is severe, it might help to investigate the methods that have the largest ncalls value (the most frequently called methods). That said, there's no globally easy way to diagnose a memory leak. It's a matter of exclusion. Well there goes that idea. Forgot about profiling, thanks. -- Andy McKay. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] how can I fill to frames in on dtml-call ??
Hi there, I would like to fill two frames as a response to a user action. How can I do that? The situation is as follows: I have two database tables having a master-detail relationship. In a list I display records from the master table . When the user clicks on one of the entry I would like to fill a frame with some fileds of the record, an in a second frame a list with detailrecords. So how can I fill two frames as a response to a submit. Or is there a way that I can tell a python or dtml-method to send its output to a given target? I tried something like this: dtml-var masterForm dtml-call RESPONSE.setHeader('Window-target',URL1+'/top_right_frm') dtml-var listdetails but this writes everything into the same frame. thanks for your time Robert ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Splitter.c hack by Spisak; anyone have a Splitter.so?
Erik Enge wrote: Hola, please don't make me touch C or a ... erm... you know, one of those compiler-thingys. I don't like them. Does anyone have a nicely baked Splitter.c for Linux? The one that Spisak hacked to make it chew and swallow anything? If you have the Splitter.c file, you ought to be able to get a source distribution of Zope, delete the original Splitter.c, replace it with the new one, then run python wo_pcgi.py or python w_pcgi.py to set everything up. If you're running from the source distribution already, just replace Splitter.c, and run the appropriate wo?_pcgi.py to compile. -- Steve Alexander Software Engineer Cat-Box limited ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )