[Zope-dev] ZODB optimization
I'm wondering, is the ZODB easily 'fragmented' or .. un-optimized ? If so, are there any tools/functions that will 'unfragment' / optimize it? Does the 'pack database' in the Administration menu do this? If so, it could be a Good Thing (tm) to have separate optimize and packing (history deletion etc.) functions (buttons). Is there any way to make an object not keep history on itself or on contained objects ? -Morten ___ 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] Mail and zope
> Is there anyway to get a hold off the message-id of e-mail sent through > the sendmail tag? As far as I can see, there isn't any generation of a message-id in the MailHost product. If you want to get a hold of the message-id, the right thing would probably be to generate it yourself, and adding it in the header field of the message you're sending.. I.e., something like this (untested): To: From: [EMAIL PROTECTED] Message-ID: Although using a message-id generated from one of the python library modules would be a better way of doing it.. HTH. -Morten ___ 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] Turning acquisition off[Zope-dev] Turning acquisition off
Hi guys, Does anyone know how to disable acqusition ? That is, with a simple method, and not disabling the Acqusition class, something like self.aq_disabled('attribute') . Thanks. -Morten ___ 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] objectIds -- accesible for everyone -- why?
If you type in http://www.zope.org/Members/objectIds you get a list of all Members. Although it is a useful feature.. ;) .. I can't really see why objectIds should be available for everyone, at any given time. Is this a bug or a feature? -Morten ___ 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] Implementing a URL path resolver
Hi guys, I've been tinkling with a function that does what REQUEST.resolve_url does, except without it relying on having a REQUEST instance available. That is, just resolving the path itself, something like this: path ÿstring.split(relative_url, '/') path ÿfilter(None, path) new_path ÿ'%s' % path[0] path ÿpath[1:] for element in path: new_path ÿnew_path + "['%s']" % element return eval("self%s" % new_path) Now, neither []- or .-like evaluation of the path works.. Any ideas? Cheers, Morten ___ 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] Permission problems
Hi guys, I've been struggling with some permission problems, and I'd appreciate some help... Being that I don't know too much about permissions (yet!), solving this issue is hard (and security _is_ hard); so I'll just point you to the problem: http://www.zope.org/Members/morphex/AddressBook/address_book-1.0.0-permission_problems.tar.gz Just read about the SecurityClass stuff in AccessControl, but can't quite gripe that either. Anyone care to enlighten a security newbie? :-) Thanks, Morten ___ 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] Sessions, ConflictError and emails
Hi, I have a site which is based on Zope and Plone, where users can shop around (shopping cart is stored in SESSION objects) and a separate part of the site (backend, Plone) where newsletters and such can be sent out. I have a problem however with duplicate emails being sent out to the subscribers, and this is most likely due to conflict errors being raised.. The event.log file says: 2008-02-18T21:05:23 INFO ZPublisher.Conflict ConflictError at /VirtualHostBase/http/www.site:80/VirtualHostRoot/levanger/plone/site_newsletter/nyhetsbrev-130208/testSendToMe: database conflict error (oid 0x92aa, class BTrees._OOBTree.OOBTree, serial this txn started with 0x0373d8eef99cf5bb 2008-02-18 21:02:58.503076, serial currently committed 0x0373d8f1624479aa 2008-02-18 21:05:23.031441) (58 conflicts (0 unresolved) since startup at Thu Jan 24 17:34:08 2008) Now, those errors aren't a big deal in themselves, but it is a problem when the system sends out duplicate mail messages to lots of visitors. I've seen some blurbs about deferring sending emails until the transaction has been completed, and I just discovered zope.sendmail which is said to defer sending emails until the transaction has succeeded. Is zope.sendmail a good choice? Will it work with Zope 2.9.8? Thanks, Morten ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Re: Sessions, ConflictError and emails
Laurence, thanks for the tip, exactly what I needed to know. :-) -Morten On Tue, 19 Feb 2008 10:30:29 +, Laurence Rowe <[EMAIL PROTECTED]> wrote: > See the discussion on plone-dev a while ago, "link integrity checking > will make Plone 3.0 broken and dangerous". Worth trying with 2.9.8 at > least. > > Laurence > > > > --On 18. August 2007 21:03:43 +0200 Andreas Jung > <[EMAIL PROTECTED]> wrote: > > > > > > > --On 23. Juli 2007 08:53:32 +0200 Wichert Akkerman > <[EMAIL PROTECTED]> > > wrote: > > > >> Previously Andreas Jung wrote: > >>> Having SecureMailhost as a replacement for MailHost would have been a > >>> nice addition to the Zope core..but you choose to go with your own > >>> implementation :-> > >> > >> If possible I want to try and move Plone 3.5 to zope.sendmail, which > >> seems to be much cleaner than all the > >> MailHost/SecureMailHost/DropMailHost/etc. products combined. > >> > >> > > > > There is now TransactionalMailHost (on top of zope.sendmail) > > > > <http://svn.zope.org/Products.TransactionalMailHost/> > > > > providing transaction-aware Mailhost support + support for TLS/SSL > > (like in SecureMailHost - however it requires yet an unofficial > > zope.sendmail branch). I think this should make most Mailhost > > excrescences > > obsolete. If there is some functionalty missing I would be happy to > add it > > (if it makes sense). > > > > In addition the same functionality + asynchronous mail delivery (similar > to Maildrophost but without having an external process) will be > available as part of the standard Zope MailHost implementation in Zope > 2.11. > > Andreas > > ___ > Zope-Dev maillist - Zope-Dev@zope.org > 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 maillist - Zope-Dev@zope.org 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] ZODB optimization
[Jim Fulton] | Packing does two things: | | - It removed records for objects that are no longer referenced | (as of the pack time), or, IOW, it doesm garbage collection. That surely explains the enourmous size the Data.fs file can have! -Morten ___ 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] Is this a ZClass/Propertysheet bug?
> Is this behavior correct? See http://www.zope.org/Members/paulabrams/howto_deleteundeadzclassprops for help. It is not a bug per se, Python (upon which ZOPE is based) is built this way, i.e. if you create a class with certain attributes, every instance will keep those attributes, even if they are deleted from the class itself, and new instances that are instansiated from the now modified class will not. -Morten ___ 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] Is this a ZClass/Propertysheet bug?
On Fri, 6 Oct 2000, Morten W. Petersen wrote: > It is not a bug per se, Python (upon which ZOPE is based) is built this > way, i.e. if you create a class with certain attributes, every instance > will keep those attributes, even if they are deleted from the class > itself, and new instances that are instansiated from the now modified > class will not. Context got mixed up, please disregard. -Morten ___ 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] LoginManager and ZPatterns
I've been fiddling a bit with the LoginManager; but can't seem to make it work. The product versions are ZPatterns 0.3.0 and LoginManager 0.8.6. (Downgraded the ZPatterns product because the LoginManager couldn't find a class named .. SheetProviderContainer, I think). When adding a LoginManager object, it raises a TypeError exception, on line 313 in PlugIns.py, saying that a keyword parameter was redefined. I've also been looking around for some useful documentation and searched the mailing-lists.. Anyone had success with these two products, and would care to share a howto? Thanks in advance. -Morten ___ 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] Getting all objectIds, recursively (ZODB)
Is there a method available that'll return a nested list of ids (or something similar) of the current object? -Morten ___ 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] Getting all objectIds, recursively (ZODB)
[Erik Enge] | On 15 Oct 2000, Morten W. Petersen wrote: | | > Is there a method available that'll return a nested list of ids (or | > something similar) of the current object? | | "current object"? You probably mean objects? No, the current (containing) object. | Couldn't you do that with getParentNode().id? Then I'd get the parent of the current object, wouldn't I? An example to elaborate: ZOPE tmp folder_a folder_b item_a Now, if I'm in the context of tmp, I'd like to have a method that will return this list: ['tmp', ['folder_a',[]], ['folder_b',[ 'item_a',[]] ] ] Anyhow, I got a tip to read the ZDOM.py file.. thanks. =) -Morten ___ 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] LoginManager and ZPatterns
[Phillip J. Eby] | 0.8.6 won't work with 0.3.0 ZPatterns, IIRC. I'm pretty positive it | requires one of the 0.4.x releases, but I'm not positive which one. You | might be better off with the latest (current) releases of both. Okay, I tried different ZPattern versions against the most recent LoginManager (0.8.7a1) and 0.4.2a2 worked! | If that still doesn't work for you, Ty is very close to releasing an 0.8.8 | LM, and I'm about as close to releasing 0.4.3 ZPatterns. Both will be | beta-quality releases, which is to say better than anything we've put out | on either product so far. :) 0.4.3 ZPatterns will even have some | documentation in it. :) I expect that we will make our releases some time | during this coming week. I'm looking forward to it. Especially some documentation. =) Thanks. -Morten ___ 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] Can't add object
I'm developing ZopeGUM (http://www.zope.org/Members/morphex/ZopeGUM), and I have a small problem: Adding a NewsMessageIndicator within a NewsGroupFolder doesn't work. When adding a NewsMessageIndicator, the first time around it just halts after pressing the 'Add' button; the second time it takes the entire Zope process down, without any indication in the debug output (stdout when starting Zope from the command line). Debug information: Zope version: Zope 2.2.2 (source release, python 1.5.2, linux2) Python version: 1.5.2 (#1, Mar 11 2000, 13:03:53) [GCC 2.95.2 19991024 (release)] System Platform: linux2 Process ID: 2808 (4101) Running for: 12 min 8 sec Any ideas? Regards, Morten ___ 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] Excluding meta_types
When I'm building a class which inherits from the OFS.Folder.Folder, how do I exlude the meta_types it brings with it (if it's there they come from). In other words, if I have a class, with meta_type 'MessageFilterFolder', which should only be able to contain instances of meta_type 'MessageFilter', what do I do (i.e. exlude all the other meta_types)? Thanks in advance. -Morten ___ 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] Using the Zope debugger (authenticating)
How do I authenticate myself when using the Zope debugger? (I've seen this before I think, but I couldn't find it) Thanks. -Morten ___ 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] Excluding meta_types
[[EMAIL PROTECTED]] | btw how is GUM going? It's ZopeGUM now.. =) It's coming along; I'm planning on releasing a stable version of it available within a week. (CVS will be available soon from SourceForge). -Morten ___ 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] Adding ZCatalog capability for a (Python) product, and using it.
Is there any documentation that explains this? Or, maybe some *understandable* and *well-written* product? Thanks. -Morten ___ 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] Getting all objects matching a given meta_type and more
I've managed using the ZCatalog now. However, I have a small problem: When I instansiate a ZCatalog at the root of a tree, and search for all objects matching a given meta-type, all the objects in the entire tree are returned. Is there a way to instruct the ZCatalog instance that it should only return objects from within a certin part of the tree, without instansiating a new ZCatalog instance in the given subtree? I.e.: Zope Catalog (meta-type ZCatalog) Folder1 Folder2 Object1 (meta-type test) Folder3 Object2 (meta-type test) Folder4 Object3 (meta-type test) FolderA FolderB ObjectA (meta-type test) FolderC ObjectB (meta-type test) FolderD ObjectC (meta-type test) Now, is there a way I can tell the ZCatalog instance at the root folder to only return the objects mathing meta-type test in thee FolderA folder? Thanks in advance. -Morten ___ 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] Compiling of the DynPersist module (ZPatterns)
After compiling the DynPerist module, I try to import it in the Python interpreter: """ morten@slakka:/usr/local/Zope/lib/python/Products/ZPatterns > gcc -o DynPersist.so -c DynPersist.c -I../../ZODB -I../../../Components/ExtensionClass -I/usr/include/python1.5 morten@slakka:/usr/local/Zope/lib/python/Products/ZPatterns > python Python 1.5.2 (#1, Mar 11 2000, 13:03:53) [GCC 2.95.2 19991024 (release)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import DynPersist Traceback (innermost last): File "", line 1, in ? ImportError: ./DynPersist.so: ELF file's phentsize not the expected size >>> """ Any ideas what I'm doing wrong (is it maybe the compiler)? Thanks in advance. -Morten ___ 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] Using the monitor_client
When using the monitor_client, I do this: -- Start monitor_client usage python monitor_client.py localhost 8099 Enter Password: warning: unhandled connect event Python 1.5.2 (#1, Mar 11 2000, 13:03:53) [GCC 2.95.2 19991024 (release)] Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam Welcome to >>> import Zope >>> app=Zope.app() >>> app.addDTMLMethod Traceback (innermost last): File "/usr/local/Zope/ZServer/medusa/monitor.py", line 94, in found_terminator result = eval (co, self.local_env) File "", line 0, in ? AttributeError: addDTMLMethod >>> app.manage_addDTMLMEthod Traceback (innermost last): File "/usr/local/Zope/ZServer/medusa/monitor.py", line 94, in found_terminator result = eval (co, self.local_env) File "", line 0, in ? AttributeError: manage_addDTMLMEthod >>> app.manage_addDTMLMethod >>> app.manage_addDTMLMethod('tester','tester','tester') '' >>> app._p_jar.sync() >>> get_transaction().commit() >>> warning: unhandled close event closed. morten@slakka:/usr/local/Zope/ZServer/medusa > -- End monitor_client usage However, when I enter the management screen of the Zope instance, no DTMLMethod called tester is listed.. (I used http://www.zope.org/Documentation/Misc/DEBUGGING.txt as a guide..) Can anyone see what I'm doing wrong? Thanks in advance. -Morten ___ 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] Using the monitor_client
[Yves-Eric Martin] | - Zope.app() gives you a *copy* of the *real* application object. | - app._p_jar.sync() reloads your copy with the real (losing your changes) Ah, there it is; sync discards the changes made from the monitor, and then reloads... An extra thanks for the thorough (not-very-newbie-like) explanation, much appreciated! =) -Morten ___ 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] Passing namespace to method
How do I construct a method of an object, so that whenever that method is called, the current namespace is passed with it? I.e.: class myclass: [...] def myfunc(self, context): if context['sequence-index'] == 10: raise 'sequence-index is %s' % \ context['sequence-index'] called from DTML, like so: will raise an exception if sequence-index is 10 or more? Specifically, the reason I want this function is that I feel using is a bit tedious (and ugly!) in the long run.. If this isn't implemented, where would the right place to implement it be? -Morten ___ 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] Segmentation fault when adding new objects
I'm having trouble with the adding of new objects; specifically it's adding of rfc822_address objects (contained within the ZopeGUM distribution, http://www.zope.org/Members/morphex/ZopeGUM). I haven't really got a clue what's wrong, have any of you? -- Start debugging session > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(244)index_object() -> old = d.has_key pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(245)index_object() -> last = None pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(253)index_object() -> src = self.getLexicon(self._lexicon).Splitter(k) pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(186)getLexicon() -> def getLexicon(self, vocab_id): pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(192)getLexicon() -> """ pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(193)getLexicon() -> if type(vocab_id) is not type(""): pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(196)getLexicon() -> vocab = getattr(self, vocab_id) pdb> > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(197)getLexicon() -> return vocab.lexicon pdb> --Return-- > /usr/local/Zope/lib/python/SearchIndex/UnTextIndex.py(197)getLexicon()->89f3e28> -> return vocab.lexicon pdb> > /usr/local/Zope/lib/python/SearchIndex/GlobbingLexicon.py(242)Splitter() -> def Splitter(self, astring, words=None): pdb> > /usr/local/Zope/lib/python/SearchIndex/GlobbingLexicon.py(243)Splitter() -> """ wrap the splitter """ pdb> > /usr/local/Zope/lib/python/SearchIndex/GlobbingLexicon.py(248)Splitter() -> return Splitter(astring) pdb> --Return-- Segmentation fault morten@slakka:/usr/local/Zope/lib/python > -- End debugging session -Morten ___ 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] DynPersist for Windows, ZPatterns 0.4.3b1 and Zope 2.2.x
[Phillip J. Eby] | I uploaded the beta 2 release on October 31, but it has strangely | disappeared from Zope.org, along with changes I made to other items that | evening, so I have uploaded it again today. The DynPersist you posted | should still work, since there were no changes to DynPersist.c in beta 2. Same thing happened to me; WRT to objects disappearing. I think somebody said something about ZODB-reset, rollback, or something. -Morten ___ 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] how do i check if it is an array
[Veiko Schnabel] | how do i check out if any of my fields are arrays or strings | is there a function like php: is_array() I can't think of any clean way to do this; zope developers, why isn't the type() function available from DTML? On the other hand, you can explicitly cast all your form fields to be sequence-like objects (in other words, an array), by doing this: HTH. -Morten ___ 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] unbuffered html from external method
[Andy McKay] | Is it possible to print unbuffered html output to the user from an external | method. It looks to me like I can't, output occurs upon the return and I | cant see a way of getting around that. Try hacking the BaseResponse, located in lib/python/ZPublisher. (implement the flush method, add some logic here and there to handle responses that are flushed). Or maybe just override the RESPONSE class, and use RESPONSE.stdout .. -Morten ___ 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] A way to check what products are installed?
Is there a clean way to do this (preferrably from both Python and DTML) ? Thanks. -Morten ___ 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] strange error on first load of zope page
[Toby Sargeant] | It seems perfectly reasonable to me that you can't pickle a module, but what | I'm having trouble understanding is why zope is trying to. Can anyone suggest | a way that I could try and track down why this is happening? My guess is that you've got a packaged module, in the same directory as your external method. I.e., if your external module does an 'import somemodule', and you've got a 'module.py'-file and a 'module'-directory, you'll get this error.. (because python loads package-like modules first). HTH. -Morten ___ 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: objectIds accessiblilty & and a proposal
[Brian Lloyd] | This comes up often enough that I'm inclined to do | something about it for 2.3. I propose that objectIds | (and objectValues) will not be directly accessible | via the Web in 2.3. For xml-rpc applications, it should | be a simple enough task to create a Python Script (or | even a DTML Method) that *is* Web accessible to relay | that information if it is needed. | | Thoughts? This sounds like a good idea. -Morten ___ 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] 'Subclassing' another product
I think I read somewhere that it was, from version 2.2 of Zope, possible to 'subclass' products. Is this just somebody janking my chain, or is it actually possible? If it is possible, would someone care to explain? Thanks. -Morten ___ 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] Loginmanager and local roles
Using LoginManager, I can't seem to map local roles to users that are stored in LoginManager instances. I.e.: if this acl_users is a LoginManager /a/b/c/acl_users then any object in /a/b/c/d will not show any of the users stored in the nearest acl_users object in the local roles management menu.. Any suggestions? -Morten ___ 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] Loginmanager and local roles
[Morten W. Petersen] | Any suggestions? Found the problem. There needs to be a method called user_names in the acl_users folder, which returns all the user ids: """ self user_ids = self.UserSource.getPersistentItemIDs() user_ids2 = [] for id in user_ids: user_ids2.append(id) return user_ids2 """ (Can't understand why I had to use an additional list though). Cheers. -Morten ___ 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] A groupware package for zope
[Magnus Heino] | I'd appreciate to be able to download some code from zope.org :-) Uhmm. Yeah. http://www.zope.org/Members/morphex/ZopeGUM -- guess you don't know about the /Product and search facilities.. ;) Cheers, Morten ___ 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] A groupware package for zope
For the last couple of months I've been working on a groupware package for Zope, named ZopeGUM. It has reached version 0.1.63 now, and it's in steady progress. All the planned components, like messenger, address book, calendar, todos, etc. are there and working now; though it's definently not ready for a production enviroment yet. Anyways, just wanted to let you all know. (And yes, I do appreciate feedback. =) -Morten ___ 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] 'Subclassing' another product
[Steve Spicklemire] | does that help? Yep. Thanks & Cheers, Morten ___ 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] LoginManager and PTK
Hi guys, I previously posted a couple of functions that enables users to login at a lower level in the tree-structre than where the actual user folder is. I.e., a user could enter username and password at /a and get redirected to /a/a/a/a/b (the acl_users folder would be located in /a/a/a/a). Now, there is a minor problem, because I can't seem to figure out how to login the user to the actual context /a/a/a/a, except maybe first redirecting the user to /a/a/a/a and then letting the user log in from there.. Any thoughts / ideas? And if you've got a completely different solution, I'd be glad to hear it. =) Thanks. -Morten ___ 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] ZCatalog and 'fuzzy logic'
On Tue, 9 Jan 2001, Steve Alexander wrote: > The other option for searching a TextIndex is to use extensions to the > NEAR and AND and OR operators that are currently supported. I guess it > all depends what you mean by "fuzzy matching". Well, to try to explain the problem: If I have 1.000.000 objects catalogued, all of the meta type Person, and I want to find all the instances matching the regexp-pattern '?Peter' on those objects' attribute firstname, and the regexp-pattern '???ne' on that objects' attribute lastname, how could I effectively implement that? I.e., is there a need to get down on the C level to get a reasonably fast search? Am I making any sense? Cheers, Morten ___ 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] ZCatalog and 'fuzzy logic'
Is there anyone who could try to give an estimate of how long it would take to add fuzzy logic (regexp-like) searching capability to the ZCatalog? And reasoning as to why would be appreciated. ;) -Morten ___ 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] ZCatalog and 'fuzzy logic'
> I do not think that "fuzzy logic" is strongly related to "regexp-like". > Anyway. > > Fuzzy searching often means "finding matches with characters omitted, > replaced or inserted". It seems I misunderstood the term fuzzy logic myself. Fuzzy logic means if I search for a word, for example 'programmer', it will return matches to the words 'program', 'programming','programmable' etc. I.e., it will somewhat intelligently return words that are similar in what they mean, using grammar rules (chopping off endings of words and making them match others). Hmm. Cheers, Morten ___ 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] Implementing a URL path resolver
[[EMAIL PROTECTED]] (Bug in the encoding of the message, MHA) | path = string.split(relative_url, '/') | path = filter(None, path) | new_path = '%s' % path[0] | path = path[1:] | | for element in path: | | new_path = new_path + "['%s']" % element | | return eval("self%s" % new_path) -Morten ___ 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] Implementing a URL path resolver
[Steve Alexander] | Have you seen the methods restrictedTraverse and unrestrictedTraverse in | lib/python/OFS/Traversable.py ? Exactly what I needed. Thank you. -Morten ___ 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] Calling HTMLFiles
Hi, I'm having difficulties calling an HTML file from python.. Here's the code: [...] from events import conflicting_events calendar_event_add_redirect = HTMLFile('calendar_event_add_redirect', globals()) manage_add_calendar_event_form = HTMLFile('calendar_event_add', globals()) conflicting_events_dialogue = HTMLFile('calendar_event_conflicting_events_dialogue', globals()) # These two expand into seconds expand_hour = lambda x: x * 60 * 60 expand_minute = lambda x: x * 60 def manage_add_calendar_event(self, title='', note='', alarm=0, start=0, end=0, priority=0, status=0, REQUEST=None, RESPONSE=None): "Add an instance of the calendar_event class." new_id = str(self.get_unique_id()) if REQUEST: alarm = expand_hour(REQUEST['alarm_hour']) + \ expand_minute(REQUEST['alarm_minute']) start = expand_hour(REQUEST['start_hour']) + \ expand_minute(REQUEST['start_minute']) end = expand_hour(REQUEST['end_hour']) + \ expand_minute(REQUEST['end_minute']) title = REQUEST['title'] note = REQUEST['note'] priority = REQUEST['priority'] status = REQUEST['status'] conflicting_events_ = self.check_timespan( self.getParentNode().getParentNode().id, self.getParentNode().id, self.id, start, end) if conflicting_events_: return conflicting_events_dialogue(self, REQUEST) [...] Now, if there are any conflicting events, the HTMLFile is returned, with some parameters passed along. What I'm wondering about is how can I pass the variables defined in the REQUEST so that they can be looked up with dtml-code in the conflicting_events_dialogue? And doing it without raising KeyErrors on DTMLMethod that are called from within the conflicting_events_dialogue? Thanks. -Morten ___ 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] AttributeError when adding ZClass product (PortalMembership)
Hi guys, I have a problem with a product. This product, let's call it product SuperSecret, adds a number of folderish objects to the new instance when it is created. Now, if we name the SuperSecret product instance for a, and the class instance that raises the AttributeError b, I will show you what happens: I am at the root folder of the Zope instace, and select the SuperSecret entry from the Products list. There I enter the relevant information, and submit the form. But then, the SuperProduct raises an exception when the manage_add_some_class function tries to add the new b instance to the a instance. (No exception is raised when the offending line which tries to access the Control_Panel via the b instance & acquisition is commented out). The manage method, which looks like this: def manage_add_b(self, id, description, REQUEST=None): "Add an instance of the b class." self._setObject(id, b(id, description)) #get_transaction().commit() Shared.utils.install_authentication_folder(self[id]) which calls an external function, which looks like this: def install_authentication_folder(container): container.Control_Panel.Products.PortalMembership.doInstall(folder=container, REQUEST={}) which raises an AttributeError that looks like this: Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: Control_Panel [...] File /home/morten/Zope/lib/python/Products/rs/rs.py, line 56, in manage_add_a File /home/morten/Zope/lib/python/Products/SuperSecret/a.py, line 168, in __init__ (Object: CatalogAware) File /home/morten/Zope/lib/python/Products/SuperSecret/b.py, line 61, in manage_add_b (Object: CatalogAware) File /home/morten/Zope/lib/python/Products/SuperSecret/Shared/utils.py, line 211, in install_authentication_folder (Object: CatalogAware) AttributeError: (see above) Now, I guess this could be because the new instance isn't aware of it's surroundings, but I've tried to manually commit the transaction (which could help?), but obviously didn't... =) I guess it could be a solution to call a number of methods after the product instance is added, but that's a bit too hackish for me. Any ideas? Thanks in advance, Morten ___ 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 to avoid ConflictErrors ?
Hi zopers, I'm having problems with a product I'm developing. The product is part of the ZopeGUM package, the GUM product. If you have a look in gum.py in that product, you can see a method named _retrieve_messages, which can at times store enourmous amounts of objects and data in one transaction. Now, if I access the GUM instance at the same time as this method is being called, I may either get a ConflictError raised in the page, or in the Zope debug output. I've read all the posts I could find regarding ConflictErrors, and they mention that careful programming could help in avoiding these exceptions. I'm assuming that this applies only to whenever two threads are trying to *modify* the same object; and frankly, I can't see where I'm modifying any objects, unless modifying one object, an rfc822_message instance in a message_container instance also somehow modifies the message_container. Any idea what I'm doing wrong? Thanks & cheers, Morten ___ 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] How to avoid ConflictErrors ?
[Chris Withers] | Please check that both rfc822_message and message_container subclass | Persistence.Persistent. They do. *ponder* -Morten ___ 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] LoginManager and ZPatterns
Hi fellow zopers, I don't know if it's a bug or feature, but whenever I try to access parental objects from a user object in python code, I can't seem to find anything. That is, whenever I call acl_users.getItem('user123').getParentNode() (the acl_users is a LoginManager instance) it returns None. But, if it's called from DTML, with exactly the same expression, it returns the containing object... Could someone shed some light on this? Thank you. -Morten ___ 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] ZClasses vs. Python Products
Hi peeps, I'm trying to figure out whether to continue work on an existing ZClass product, or rewrite it from scratch. I get a claustrophobic feeling working with ZClasses, and using Python products is more intuitive to me.. I've also seen several people (including guys from DC) refer to ZClass products as (paraphrasing) not-so-good and half-baked.. Anyways, would you care to help me list the pros and cons for ZClasses and Python products? The greatest features of ZClasses are, AFAICS: TTW editing, very good for interface designers Rapid prototyping Easiliy transferable products (If you think there's anything missing from that very short list, please share your thoughts..) And the greatest features of Python products is: Full control of *everything* Now, rapid prototyping in Python products can be achieved using products like mkzprod[1]. And, if there could be some facility to edit all DTML and image files related to a Python product TTW, (and maybe be able to 'subclass' or override these on a per product instance basis), I can't see any *good* reason to develop products with ZClasses. [1] mkzprod: http://www.zope.org/Members/eenge/mk-zprod Hoping for a good discussion.. Cheers, Morten BTW: I've basically made up my mind, and it'll be Python products. If I can make the DTML and images editable TTW that is... ___ 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] ZClasses vs. Python Products
On Sat, 3 Feb 2001, Steve Alexander wrote: > Sounds to me like your needs would best be served with two > related products: a TTW ZClass product and a Python Product. > Each ZClass is derived from an associated Python base class. > > You get to keep you flexibility, but also get the advantages > of TTW development when you need it. Ahah! That's a very good (and simple) solution. Thanks for the help! -Morten (who still wants to add HTMLFile and Image editing TTW for Python based products). ___ 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] Creating IMAP and SMTP services for Zope
Hi guys, I'm wondering about creating IMAP and SMTP services for Zope. Someone mentioned to me that extending (using?) the ZServer could be a Good Thing (tm). Could anyone point me in the right direction? Thanks. -Morten ___ 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] The field converters (:int, :text, etc.)
Hi guys, IIRC, there was some talk about modularizing the field converters (checkers) so that they could be easiliy modified and added to. Is there currently any efforts to solving this problem? If not, there's definently a need for it, IMO.. Thank you for your time. -Morten ___ 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] ValueChecker 0.0.1
Hi zopistas, I've managed to build a product called ValueChecker which when installed hooks into the prosessing of form input. It's basic at this point, a mere proof-of-concept, but I can think of so many uses! Cheers. :-) -Morten ___ 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] ThreadSafeCounter 0.0.1 released
Hi guys, There's a new product available, which enables unique ids in a given context, take a look at http://www.zope.org/Members/morphex/ThreadSafeCounter>. Cheers, Morten ___ 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] ThreadSafeCounter 0.0.1 released
[Chris Withers] | So would a counter such as: | | class PersistentCounter(Persistent): | | # create the counter | def __init__(self, value=0): | self._value = value | | # get the value of the counter without incrementing | def getValue(self): | return self._value | | # increment the counter when called, and return the new value | def __call__(self, number=1): | self._value = self._value + number | return self._value | | ...not be thread safe? I'm not sure whether the code above is thread safe or not. ThreadSafeCounter was made because I don't know enough about Zope internals to determine whether or not the counter would return unique values, nor do I know enough about threads to be completely sure that it would, every time. File locking is a simple concept, and easy to understand. As I've understood it, two threads serving requests have a copy each of the database, and only when changes are committed are they reflected in the database. Therefore, two requests created at the same time could get an identical copy and therefore and identical value. ..so, it basically boils down to the fact that it's simple to use file locking. Cheers, Morten ___ 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] LONGing for normal inetegers...
[Jon Franz] | I had this problem in the past and hacked the mysql DA to fix it, then | dicovered to my dismay I was using an out-of-date mysqlDA and it had already | been fixed... Which DA are you using? Using Python 2.0 could solve this problem, as longs are no longer rendered with the L suffix. HTH. -Morten ___ 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] ThreadSafeCounter 0.0.1 released
[Erik Enge] | What happens if you run this with ZEO? Will the file be kept «in | sync» with all ZEO Clients? Good point. I don't think so. It could be that it is kept in sync with one Zope instance "being responsible" and the others calling it via XML-RPC. Cheers, Morten ___ 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] ThreadSafeCounter 0.0.1 released
[Steve Alexander] | I'd thought the original point of ThreadSafeCounter was to provide | a simple sequential unique values generator, without causing | writes to the Data.fs. Yes, that was the original intent. But having one that's safe over multiple ZEO clients is a Very Good Thing (tm). :-) | You could look at using a MountableStorage that doesn't support | undo to get a similar benefit. This would also work with ZEO. | | Take a look in the Core Session Tracking product to see how | it is done there. | | Also, you may find Shane Hathaway's ExternalMount product useful. Thanks, much appreciated. -Morten ___ 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] ThreadSafeCounter 0.0.1 released
[Wolfgang Strobl] | Doesn't even install on Windows, because it imports and uses fcntl. | | >From the fcntl docs: "Availability: Unix". Well, the download page says "Platform: Generic UNIX-like", doesn't it? -Morten ___ 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] ThreadSafeCounter 0.0.1 released
[Wolfgang Strobl] | Well, yes. I wouldn't have expected that kind of platform | dependendy in products like AddressBook, though. Anyways, I'm looking into ways of making the threadsafe counter platform independent. Cheers, Morten ___ 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: ThreadSafeCounter
[Andy McKay] | I released FSPoll recently and was going to combine the two into one | FSCountThing with FSPoll and FSCounter subclassing of it, so maybe we could | co-operate on ThreadSafeCounter and FSCounter? The ideal solution would be to use an object that lives in the ZODB, I wonder if there is a way to keep the 'object history' empty? That is, keeping the counter 'packed' while retaining 'object history' information on all other objects. In any case, I think it's possible to implement a file-locking module, that locks the file using a .lock extension (writing the pid of the locking process to that file) or something like that.. Which should work on Linux and Windows (and most other OS') Should I toss up a Wiki? Cheers, Morten ___ 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] ThreadSafeCounter 0.0.1 released
[Erik Enge] | Forget it. My fault. *shame, shame* *chuckle* :-) -Morten ___ 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] Strange AttributeError in AccessControl/User.py
Hi guys, indeed a strange problem, anyone experienced this? Zope Error Zope has encountered an error while publishing this resource. AttributeError Sorry, a Zope error occurred. Traceback (innermost last): File /home/morten/Zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/morten/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/morten/Zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: CatalogAware) File /home/morten/Zope/lib/python/ZPublisher/Publish.py, line 162, in publish File /home/morten/Zope/lib/python/ZPublisher/BaseRequest.py, line 442, in traverse File /home/morten/Zope/lib/python/AccessControl/User.py, line 496, in validate (Object: RoleManager) File /home/morten/Zope/lib/python/AccessControl/User.py, line 231, in allowed AttributeError: aq_inContextOf Thanks. -Morten ___ 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] Getting the parent of a container in a Python Script
[Cyril Elkaim] |Hi all, Hia Cyril, [snip] | Aside from my problems Zope rocks really. Yes it does. And you can find usable information in $ZOPE_INSTANCE/lib/python/OFS/ZDOM.py . Hope this helps, Morten ___ 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] 2gb ZODB size limit
[Tim McLaughlin] | Is this true on windows too? I saw some mention of this limit be lifted, | but if so, in what version? It's not a problem on Windows, AFAIK. It's a problem with Linux, if you want to be able to use databases > 2GB in size on Linux, a kernel >= 2.4.0 is required. Hope this helps, Morten ___ 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] 2gb ZODB size limit
[Andy McKay] | Yes, you will hit this limit. Windows uses a 32 bit integer for file size... | No matter what MS says, Ive hit it on Win2k. Interesting. Are you sure the problem lies with Win2K and not Python or something else? Cheers, Morten ___ 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] 2gb ZODB size limit
[Erik Enge] | [Morten W. Petersen] | | | It's a problem with Linux, if you want to be able to use databases > | | 2GB in size on Linux, a kernel >= 2.4.0 is required. | | Nope. First, the limit is at file-level, not database-level (mind | you, a problem with the filesystem, not Linux per se). You can have | tons and tons of files, but noone of those can be over 2GB. FileStorage type database was implicit, as we're discussing ZODB, and that's one file per database. | Secondly, this is only true for the ext2 (and «lesser» filesystems). | ReiserFS does not have this limitation and I've heard that is supposed | to be shipped «batteries included» come 2.4.1. Sorry? Didn't I say kernel version 2.4.0 or greater? The 2GB problem (in ext2) is fixed there you know. ..and a side note for ReiserFS, I've had it mess up a filesystem completely, so much for 1 second recovery after a crash. ;-) BTW, there is a list called [EMAIL PROTECTED], for ZODB specific questions. Cheers, Morten ___ 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] 2gb ZODB size limit
[Erik Enge] | [Morten W. Petersen] | | | BTW, there is a list called [EMAIL PROTECTED], for ZODB specific | | questions. | | Actually, I think its called ZODB-Dev; [EMAIL PROTECTED] I stand corrected. Cheers, Morten ___ 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] ConflictErrors and how to handle them
Hi guys, I've been struggling with a problem, namely ConflictErrors. At times, a long-running process may add 100, 1000, 1 objects to a single folder. Under this process, several ConflictErrors may be raised, but they are captured, and the transaction committed again. Problem solved. However, the other side of the problem is that regular requests, from other users, may be be aborted, and as a result the user is presented with a Zope Error screen, which says ConflictError. If I've understood this correctly, it is because the ZODB connection is hosed, and innocent reads trigger ConflictErrors. So, I'm wondering about turning up the number of Exceptions each request may handle (it's 3 now, right?) and just hope that the exception isn't raised more than 10-20 times. Where can I increase the number of accepted exceptions per request? Any thoughts on the solution itself? Cheers, Morten ___ 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] REQUEST acting up and misplacing form elements in other
Hi zopers, I've been wondering what may be causing the REQUEST object to store form values in the other dictionary. Is this a new feature or simply a bug? Cheers, Morten ___ 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] Storing lots of big objects in containers
Hi guys, A product I'm currently developing has a rather big (in many ways) problem. A product instance may store many, (thousands) of big objects, ranging from 1-50 MB in size. Now, whenever the product instance is accessed, with say for example 100 objects with a size of 2MB each, Zope slows down to a crawl, and spends a lot of time loading (I assume) the objects from the ZODB, even though only 10 objects are actually accessed. ..I can't really use any external storages, as the reason for bringing these objects into the ZODB was to structure them and make then indexable by ZCatalog. And there's probably no time for ZPatterns. Someone suggested using BTreeFolder, but the documentation and examples for it are rather scarce. Does anyone know of products that make a good example use of BTreeFolder? Would BTreeFolder work for this? Are there better alternatives? Thank you for your time, Morten ___ 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] Minor typos/changes to ZCatalog.
[Steve Alexander] | But it's not just characters. A field index indexes an object, and uses | the overloaded comparison operators for that object to put it in an | appropriate place. So, you can index DateTime objects, tuples, strings, | numbers, floats... Could a field index succesfully handle the example you posted some time ago, storing the relative path of each object? -Morten ___ 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] Storing lots of big objects in containers
[Erik Enge] | Can't you just subclass the BTree Folder as you would with OFS.Folder? | | I think you might be confusing the Zope BTree implementation with the | BTree Folder Product? I've tried subclassing BTreeFolder, but then, whenever the object is accessed, zope falls flat on its face. :-\ Tried again, now this error is raised: """ Zope Error Zope has encountered an error while publishing this resource. TypeError Sorry, a Zope error occurred. Traceback (innermost last): File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/morten/Zope-2.3.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: CatalogAware) File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: retrieve_messages) File /home/morten/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: retrieve_messages) File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 579, in retrieve_messages (Object: CatalogAware) File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 655, in _retrieve_messages (Object: CatalogAware) File /home/morten/Zope-2.2.4-src/lib/python/Products/GUM/gum.py, line 986, in drop_message (Object: CatalogAware) File /home/morten/Zope/lib/python/Products/RFC822Message/util.py, line 86, in store_message (Object: CatalogAware) File /home/morten/Zope/lib/python/Products/RFC822Message/rfc822_message.py, line 66, in manage_add_rfc822_message (Object: CatalogAware) File /home/morten/Zope-2.3.0-src/lib/python/OFS/ObjectManager.py, line 285, in _setObject (Object: CatalogAware) File /home/morten/Zope/lib/python/Products/BTreeFolder/BTreeFolder.py, line 187, in _setOb (Object: CatalogAware) TypeError: object does not support item assignment """ *sound of headscratching* -Morten ___ 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] ZCatalog problems
Hi guys, I'm having trouble making ZCatalog work. The problem is that there are 29 objects of a given meta type, with the same booleans that should be returned for an iteration; but only 20 are. Is this a result of caching perhaps? Or lazy results? Thanks, Morten ___ 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] catalog object owners?
[Tim McLaughlin] | Anybody know how to catalog the object "owner"? I can't seem to find a | property to catalog the value of getUserName(). (of course I could always | kludge it with a property in the constructor, but I would prefer use what is | already there). I'll second that, the ability to catalog values returned by method calls would be sweet.. -Morten ___ 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] catalog object owners?
[Chris McDonough] | > I'll second that, the ability to catalog values returned by method calls | > would be sweet.. | | Not sure what you mean, this works now. Aha? So if I specify a field index of, get_parent_node_id, which is a function call on all objects that are to be indexed, this would index the returned value? If so, how long has this been available? Cheers, Morten ___ 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] catalog object owners?
[Steve Alexander] | Absolutely ages! | At least since 2.2. I don't have any 2.1 installs around to check with. Whoa, now how cool is that. :-) Cheers, Morten ___ 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] Synchronize GUD or Worldpilot with IPAQ
[Valérie Aulnette] | Did someone try ? And how ? You can't synchronize at this point. It's a planned feature, but don't hold your breath. :-) Cheers, Morten ___ 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] ZCatalog hackery
Hi guys, I've got a problem with ZCatalog. I've got plenty of large objects, ranging from 100KB to 100MB in size. Needless to say, these take up a lot of processor time when indexed by the ZCatalog. Now, these object have to be moved from time to time, only moved, so that one or two of the related columns and indexes are affected (the path and the parent container id); is there a way to go around this so that those two, the one column and the index are updated, and not, let's say the indexed body (which is 100KB - 100MB in size) ? Thanks, Morten ___ 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] ZCatalog hackery
[Casey Duncan] | Actually what I wrote assumes you are passing a Catalog not a ZCatalog. | So you will need to change it for a ZCatalog to: I figured that out. :-) There is one problem, the uids stored in the Catalog are based on the path of the object, so I guess I'll have to make a copy of the records, and then paste it in under the new uid (path). -Morten ___ 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] ZCatalog hackery
[Chris McDonough] | Note that the algoritm is simple - for each index, compare the what exists | in the index to what is to be put in. If they're the same, do nothing. If | they're different, reindex. I wasn't able to understand completely from | your description whether the object method your're attempting to index via a | TextIndex actually returns different data or not when you recatalog it. | Does it? Will the new data be 'made ready for indexing' before it is compared to the existing data? That is, will ZCatalog have to compute the data in some way before it compares it to what is already stored? I'm wondering because it would be significant overhead to 'make a data field of 100MBs into an index-like value' and then compare it to what already exists in the ZCatalog. Thanks, Morten ___ 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] ZPatterns, DynPersist.dll and Zope 2.3.0
Hi guys, I've got a problem making a version of the DynPersist.dll file work on windows. The message when trying to load the DynPersist module says (paraphrasing) "A unit attached to the system doesn't work". Anyone else experienced this? Also, I read that users of > Zope 2.2.x could skip this module, is there any quick hack to fix this? Thanks, Morten ___ 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, DynPersist.dll and Zope 2.3.0
[Steve Alexander] | Try this one: | |http://www.cat-box.net/steve/DynPersist-0.4.3b1.dll | | I've had this one working on Windows 2000, Zope 2.3. Yep, this works. On Windows 98 with Zope 2.3.0. Thanks again, Morten ___ 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] Ensuring 'freshness' of dynamic pages (slightly offtopic)
Hi guys, I've been trying to ensure that documents from a certain website are always fresh, that is, every request for a new page must be validated before the client sees it. I've tried using these HTTP Cache-control directives: no-cache no-store max-age (1) must-revalidate but no such luck. If I for example specify 'Check against server: Never' in IE, the pages are cached, no matter what. Is it possible to ensure that pages are always fresh, even if it is specified on the client side that the client should never try to retrieve a 'fresher' page? I've been contemplating a new solution, which is to append a string like ?ensure_freshness=02349025180.12 (some random, unique id) on each link, but that's not a thing which I wish to do now, at such a late stage in the project. Also, it strikes me that it isn't possible to specify multiple cache-control directives with the current HTTPRequest implementation, am I missing something here, or is this a bug / missing feature? Any ideas? Thanks, Morten ___ 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] INSTANCE_HOME vs. SOFTWARE_HOME
Hi guys, some people have asked me to use INSTANCE_HOME instead of SOFTWARE_HOME, which breaks their products on debian distros. Now, I'm not sure that won't break other systems if I change it; anyone care to share? Thanks, Morten ___ 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] REQUEST and values stored there
Hia guys, the recent changes to the HTTPRequest class breaks some of my code. I may have missed some notifications, but why wasn't this made clear as it could obviously break code? -Morten ___ 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] REQUEST and values stored there
On Wed, 4 Apr 2001, Chris McDonough wrote: > What breaks? There was no intention to break code or change the API. Code that looked like this: REQUEST['key_name1'] REQUEST['key_name2'] Now has to be changed to this: REQUEST.form['key_name1'] REQUEST.form['key_name2'] (The former method raises a KeyError.) These problems started to appear in the 2.3.x tree. -Morten ___ 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] ZCatalog features
Hia guys, A couple of comments and questions about the ZCatalog: Is it possible to pass an argument to the catalog so that returned brains would instead be actual objects? Given that we have to manually join search results, because ZCatalog doesn't support ORs etc (for FieldIndexes), wouldn't it be useful to have some sort of tool that could take a set of results, and return a result with only unique values? Cheers, Morten ___ 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] Building custom DTML tags and accessing _.
Hia guys, I was wondering if any of you could give me a couple of hints about how to make the _.{random,string,range,Datetime} thingies from a tag expression. I.e. instead of doing this: This could be done: Like this (with the DTML var tag): Thanks & cheers, Morten ___ 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] Non-undoable storage
Hia guys, during testing of a mail product I've discovered that the Data.fs file may bloat considerably after storing 50 messages. Packing the database will reduce the Data.fs file to 20 MB (from 40 MB). Another thing is that storing 50 messages takes a *long time* on a 600Mhz 256 MB RAM system. The thing that struck me was that transactions may cause a lot of overhead, both in database size and for execution speed, so, the thing I'm wondering about is if there exists a non-undoable storage, or something similar that doesn't support transactions.. Another thing I noticed BTW, is that retrieving 500 messages and packing the database on every 50th message (all messages retrieved during one request) would lead to off the charts memory usage, the process ended up using 700 MB of RAM (had to add swap files as the footprint grew!) Cheers, Morten ___ 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] Non-undoable storage
On Tue, 12 Jun 2001, Shane Hathaway wrote: > Did you catalog each message? What version of Zope? Yes, every message was cataloged. Zope version 2.3.2 > 3) Manually zap the caches periodically, which is a capability of Zope > 2.4.x. Okay, this is interesting. Any examples on how to implement cache zapping? Cheers, Morten ___ 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] Non-undoable storage
On Tue, 12 Jun 2001, Chris McDonough wrote: > "Morten W. Petersen" wrote: > > > Yes, every message was cataloged. Zope version 2.3.2 > > Were subtransactions in the Catalog turned on (see the Advanced page)? Yes, and the threshold was at 1. -Morten ___ 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] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?
Hia guys, one of my products landed flat on its face when an ImportError was raised trying to import VSEval from DocumentTemplate; is there a new class / function of some sort or simply another name for the class? Cheers, Morten ___ 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] Where did DocumentTemplate/VSEval.py go in 2.4.0a1?
On Fri, 15 Jun 2001, Evan Simpson wrote: > Morten W. Petersen wrote: > > > one of my products landed flat on its face when an ImportError was raised > > trying to import VSEval from DocumentTemplate; is there a new class / > > function of some sort or simply another name for the class? > > See $ZOPE/lib/python/RestrictedPython. That replaces both > DocumentTemplate's VSEval and PythonScripts' zbytecodehacks. It > contains an Eval class that should be drop-in compatible with the old one. Ok, (for future reference) replacing all the VSEval.Eval references with Eval.RestrictionCapableEval fixed it. Thanks & Cheers, Morten ___ 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] TypeError on FieldIndex
Hia guys, running the GUM product on a fresh BerkeleyDB based 2.4.0a1 instance on Linux raises the following issue for the field index type: Site Error An error was encountered while publishing this resource. Error Type: ('type', 0, , ) Error Value: None Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: CatalogAware) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/App/special_dtml.py, line 127, in __call__ (Object: index_html) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/DocumentTemplate/DT_String.py, line 543, in __call__ (Object: index_html) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/DocumentTemplate/DT_In.py, line 681, in renderwob (Object: get_incoming_message_containers) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/GUM/gum.py, line 591, in get_incoming_message_containers (Object: CatalogAware) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/GUM/gum.py, line 858, in get_gum_message_containers (Object: CatalogAware) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/ZCatalog.py, line 582, in searchResults (Object: LockableItem) File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/Catalog.py, line 663, in searchResults File /home/morten/tmp/Zope-2.4.0a1-src/lib/python/Products/ZCatalog/Catalog.py, line 550, in _indexedSearch ('type', 0, , ): (see above) I added an extra try except block: if request.has_key(index.id) : try: if len(request[index.id])>0: r=index._apply_index(request) except: raise str((index.id, request[index.id], type(index.id), type(request[index.id]))) The original exception was a TypeError, len() of unsized object. Cheers, Morten ___ 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] command-line zope.org product upload ?
On Tue, 19 Jun 2001, Andy McKay wrote: > Ive been successfully finding other things to do other ZPM which is an > attempt to make a package manager for Zope ala RPM, PPM etc. A command line > interface to it would be cool. Cool. And maybe some apt-get functionality? Like 'zope-apt-get dist-upgrade'? :-) Cheers, Morten ___ 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] ZPL and GPL licensing issues
Hi there, we @ thingamy are considering changing our license to a ZPL-ish one [1] to better serve our clients' needs. However, some of the (Zope) products we've developed may need to rely on GPL'ed code, or needs to be incorporated within it, and the 'obnoxious advertising clause' seemingly puts a stop to it.. The ZPL is listed as a license incompatible with the GPL, but it doesn't really say clearly what the reason is, as far as we can figure, it's because of the advertising clause. Anyways, I'm wondering if any of you have encountered the same issue developing Zope products and any solutions towards it. Some interesting articles, food for thought: http://www.zdnet.com/enterprise/stories/main/0,10228,2777053,00.html http://www.gnu.org/philosophy/license-list.html#GPLIncompatibleLicenses http://www.gnu.org/philosophy/bsd.html [1] http://www.thingamy.com/tpl Regards, Morten ___ 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] ZPL and GPL licensing issues
On Fri, 22 Jun 2001, Erik Enge wrote: > Now I think I have two different answers to one of my fundamental > questions in this discussion: if I have a GPL-compatible licensed product > and I distribute it with a GPL product, do I need to relicense the former > one to GPL? Because that is what I understand you to say. Others have > said the opposite. Yes, you can distribute a GPL-compatible licensed code with GPL licensed code without licencing the former under GPL. Take a look in the Linux-kernel source tree for example. And yes, it would be very interesting to see the underlying reason(s) for the ZPL.. Regards, Morten ___ 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] ZPL and GPL licensing issues
On Fri, 22 Jun 2001, Erik Enge wrote: > Ok, good. Then Thingamy's intermediate solution will be to create a TPL > which is basically the ZPL with the incompatible-clauses ripped out > (number 4 and 7, I think). That way we are compatible with both the ZPL > and the GPL. Something like that. Verifying the license with the GNU people now. -Morten ___ 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 )