[Zope-dev] variables in zope (beginner question)
Hello, I the code below I want to be declare a variable 'tot_net_amt' and add 'net_amt' to it for each record returned. How can I: 1) declare the variable 2) add to it within the loop. Thanks. Is it in the Zope book? I'll read some more tonight. Thanks for your help. Mike Current Month Sales Order No. Net Amt. ___ 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] setPermissionDefault not working???
Hello everyone, Im writing to this list cause i talked with Andreas Jung and it told me to do so. Im having a problem with the method setPermissionDefault, as stated on issue 275 of the Zope collector, http://collector.zope.org/Zope/275, and Andreas told me that he was too busy to take a look at that, so im wondering if anyone is free to take this issue and solve it ASAP. The problem is that setPermissionDefault, when used from a simple Folder based python product is not working at all. There is a sample class attached to the collector issue which i have tested and confirmed not to work. thanx. []'s -- Sidnei da Silva X3ng Web Technology [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] Transaction Bugs
Thank you Kapil! This solved the problem I was having with any PostgreSQL ZDA and the exUserFolder product: now everthing works correctly. Ross P.S. The URL should be (note the extra 's'): http://www.zope.org/Members/k_vertigo/ShortStories/Transactions/ On Mon, Mar 11, 2002 at 05:17:18AM -0800, kapil thangavelu wrote: > I wrote some unittests to investigate some odd transaction > behavior i noticed while doing unittests of integrating non > sub transaction aware objects, and to insure proper txn behavior. > these tests test the transaction system independent of the rest > of the zodb and test failure modes as well. > > i've found a few bugs. > > if you're using a rdbms with zope, i would recommend > installing the modified TM.py in replace of the exiting TM.py at > lib/python/Shared/DC/ZRDB/TM.py. i would appreciate any > feedback from rdbms users who were previously experiencing > problems. > > if this does not solve your problem, and you believe its > the fault of the transaction system, please email me. i don't > use an rdbms with zope, but i'm happy to further investigate. > > cheers > > kapil thangavelu ___ 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] Transaction Bugs
I wrote some unittests to investigate some odd transaction behavior i noticed while doing unittests of integrating non sub transaction aware objects, and to insure proper txn behavior. these tests test the transaction system independent of the rest of the zodb and test failure modes as well. i've found a few bugs. 1. TM.py ignores calls to tpc_abort. this i believe is the likely cause of most of the rdbms integration problems that are referenced above as TM.py generally forms the integration point between db adapters and zope's transaction framework. if an error occurs in the two-phase-commit protocol, the database adapter will never recieve a finish/commit or abort message, and will therefore (due to how TM works) never be able to register again for a zope transaction. 2. A Non Sub Transaction aware object (including any TM derived object) that participates in a sub-transaction will recieve a tpc_finish message (which for TM derivatives calls _finish) as part of the subtransaction commit process. this means that if the outer transaction is latter aborted, there will be a loss data integrity. 3. As part of the commit process for a transaction involving subtransactions, any objects registered since the last subtransaction commit will be involved in an implicit subtransaction commit. if an error occurs during this implicit subtransaction, none of the objects registered previously to the last explicit subtransaction commit will recieve any messages. i'm not sure totally sure this is a bug since any calls to explicitly begin a new transaction should abort the objects that haven't recieved any transaction messages. in a zope setting this is done automatically, however standalone users should be aware of this. i've posted a modified TM.py to my zope.org member page that contains fixes/workarounds for problems 1 and 2. http://www.zope.org/Members/k_vertigo/ShortStories/Transaction/ in addition the unittests i've been using are posted there as well. i'll commit these changes to TM.py latter today, but have posted the above to zope.org for those who don't want to immediately upgrade. actual fixes for problems 2 and 3 i'll leave to ZC. if you're using a rdbms with zope, i would recommend installing the modified TM.py in replace of the exiting TM.py at lib/python/Shared/DC/ZRDB/TM.py. i would appreciate any feedback from rdbms users who were previously experiencing problems. if this does not solve your problem, and you believe its the fault of the transaction system, please email me. i don't use an rdbms with zope, but i'm happy to further investigate. cheers kapil thangavelu ___ 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] Help System Searches
Yes... that's actually a pretty reasonable idea! Thanks. - Original Message - From: "kapil thangavelu" <[EMAIL PROTECTED]> To: "Chris McDonough" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 11, 2002 7:08 AM Subject: Re: [Zope-dev] Help System Searches > would it make sense to make the help system still allow searching but do > storage in a mounted zodb ? > > cheers > > kapil > > > > On Saturday 09 March 2002 10:55 am, Chris McDonough wrote: > > > There is no way to fix this? What other problems are there with the > > > help system? > > > > Not that I can think of. Other problems with the help system are > > presentation, mostly. > > > > > Would it somehow be possible to make the helpsystem ignore versions? > > > > No, unfortunately. It uses the Catalog, which is based on ZODB, and it > > puts a Catalog instance into the main FileStorage, which is undoing and > > versioning. It then proceeds to do writes to the database when it > > appears that all you're doing is reading a pre-existing page. If you're > > in a version at the time, a set of objects will be written into the > > Catalog and into other places in instance space that have version. > > This is a bad pattern, and the only way to fix it is to prevent it from > > happening, which requires some helpsystem architectural changes that > > amount (IMHO) to a rewrite. > > > > - C > ___ 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] Help System Searches
would it make sense to make the help system still allow searching but do storage in a mounted zodb ? cheers kapil On Saturday 09 March 2002 10:55 am, Chris McDonough wrote: > > There is no way to fix this? What other problems are there with the > > help system? > > Not that I can think of. Other problems with the help system are > presentation, mostly. > > > Would it somehow be possible to make the helpsystem ignore versions? > > No, unfortunately. It uses the Catalog, which is based on ZODB, and it > puts a Catalog instance into the main FileStorage, which is undoing and > versioning. It then proceeds to do writes to the database when it > appears that all you're doing is reading a pre-existing page. If you're > in a version at the time, a set of objects will be written into the > Catalog and into other places in instance space that have version. > This is a bad pattern, and the only way to fix it is to prevent it from > happening, which requires some helpsystem architectural changes that > amount (IMHO) to a rewrite. > > - C ___ 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] Usage of try: .. except: .. in zope
On Sun, Mar 10, 2002 at 05:40:58PM -0500, Craeg K. Strong wrote: > Sorry, I am not answering your question > > but I was curious about your product. Have you thought about > restricting Folder contents based on type?That could be extremely > interesting. > It is also something that is on the list to be potentially incorporated > into Zope 2.6 > I definately have, that is, I'm considering filtering allowed metatypes. It won't be in my first release however. Ivo -- Drs. I.R. van der Wijk -=- Brouwersgracht 132 Amaze Internet Services V.O.F. 1013 HA Amsterdam, NL -=- Tel: +31-20-4688336 Linux/Web/Zope/SQL/MMBase Fax: +31-20-4688337 Network Solutions Web: http://www.amaze.nl/Consultancy Email: [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] User Folders
Chris Withers wrote: > Right now, I'd like to see the scope kept _tight_, just dealing with > authentication, no user metadata, that can wait for later. There is XUF, but I'm > not sure about the code quality and I think it tries to do too much. > > Of course, I could be wrong... Speaking as someone who's worked on parts of the code, I don't think you're wrong. XUF has issues that I'm not sure anyone really understands, though my recent "exploding user object" cache work got it to the point where it does seem to be stable on heavily-loaded systems. Yes, it does try to do too much, I think. Back before I figured out enough of XUF to fix the cache issues I played around a bit with a virginal pluggable user folder (right now it does not do much of anything, including authenticate, but it is a beginning.) I still have the code, and my boss would still like to see it brought to fruition. I do have quite a bit to say about the design of such an animal. It's something we need. > In any case, I'd be happy to monitor a discussion to build a solution to this (I > might even be persuaded to strike up a fishbowl process ;-) and get the finished > product done. I dunno if I could manage it for 2.6, but I'd certainly get it > done for 2.7... I held back on suggesting this because I'm not convinced I have the resources or the ability to bring this baby up on my own, and especially not in time for 2.6. But if others are interested in _contributing_, everyone can count me in too, I'm sure (although how much time I have to offer is up in the air as other projects are starting to pound on my door...) ___ 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] ZODB thread safety issue.
On Sun, 10 Mar 2002 11:52:24 +0100 (CET), Romain Slootmaekers <[EMAIL PROTECTED]> wrote: >This explains the problems we have with our system: >we have a multithreaded system where each thread iteratese over a set of >objects in the ZODB, and sees of something needs to be done... if so the >thread does it. Now since each thread gets its own version of the object. >our actions occur multiple times... I suggest one thread that scans the database. when it finds some work to be done it adds a specification of the work into a work queue. Seperate worker threads get thier work specification from the queue. Exactly how you store the work queue depends on other factors, but I suggest not in ZODB. 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 )
[Zope-dev] User Folders
"Johan Carlsson [Torped]" wrote: > > Or what I really want to know, is it safe to base my applications on ZP > and/or LM or is it > something I'm going to regret? You should be regretting it already ;-) LoginManager needs a replacement. I'd like to see a flexible and documented user and userfolder API for both Zope 2 and Zope 3. I think Zope 3 has this, I dunno about Zope 2. I'd also like to see a standard meta-user-folder. IE: providing the functionality that LoginManager does: the ability to check multiple authentication sources for user information. Right now, I'd like to see the scope kept _tight_, just dealing with authentication, no user metadata, that can wait for later. There is XUF, but I'm not sure about the code quality and I think it tries to do too much. Of course, I could be wrong... In any case, I'd be happy to monitor a discussion to build a solution to this (I might even be persuaded to strike up a fishbowl process ;-) and get the finished product done. I dunno if I could manage it for 2.6, but I'd certainly get it done for 2.7... Lemme know how I should proceed. cheers, Chris ___ 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] Multiple Database Connections Same Zsql method
The easiest way to do this is probably (As I think you are describing) put the ZSQL Method in a folder, and put one database connection in each sub-directory, and have all the database connectors with the same name. The problem with this will be that you will have to create a database connection in the folder with the ZSQL Method just so you can write the method (ZSQL Methods insist on giving you your database connection). Then you will have to delete the connection BEFORE you can use the others via acquisition. Not tested, but in theory it should work. Adrian... -- The difficulty of tactical maneuvering consists in turning the devious into the direct, and misfortune into gain. - Sun Tzu - Original Message - From: "senkr" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, March 09, 2002 12:10 AM Subject: [Zope-dev] Multiple Database Connections Same Zsql method Is it possible to iterate though multiple databases with the same zsql method? Have multple identical databases with different data. Want to maintain only one method. Can i do this in DTML or do I have to use pythonscripts? I guess what I want to do is to have the query in one folder, call it from another folder and pass the database connection info to it. Not sure how well this would work with multiple users though... Any advice is appreciated. ___ 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] The future of ZPatterns and LoginManager
--On 11 March 2002 07:24 +0100 "Johan Carlsson [Torped]" <[EMAIL PROTECTED]> wrote: > Hi everybody, > (I did ask this question to the ZPatterns list, but without any answer. > So I hope one better luck here.) > > I finally got the opportunity to use ZPatterns in a project > and am quite please with the result (after the mandatory wrestling :) > Anyway, I would like to use both ZPatterns again, as well as LoginManager, > but I feel somewhat of a doubt what they will be around in the future and > in Zope 3. So, are they? See http://lists.zope.org/pipermail/zope3-dev/2001-December/04.html Phillip writes: > You have no idea how long I've been hoping and praying that something > Zope 3-ish would appear and save me from having to continue supporting > ZPatterns. :) Paul -- The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK E-mail: [EMAIL PROTECTED] URL: http://www.bris.ac.uk/ ___ 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 )