Re: [Zope-dev] Debugging spinning Zope?
Dieter Maurer wrote: > Morten W. Petersen wrote at 2006-4-18 16:45 +0200: >> I guess the next step is to use pdb og gdb - are there perhaps any >> documents out there describing the process? > > You use your favorite search engine and search for "Zope spinning debug". Yep. ;) -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 )
[Zope-dev] Debugging spinning Zope?
Hi, I have a problem with a Zope that hangs eating up 99.9% of the CPU. I've tried to debug the problem by using DeadlockDebugger but that doesn't even return when accessing it. I guess the next step is to use pdb og gdb - are there perhaps any documents out there describing the process? TIA, 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] New ways of getting transactions?
>> This works since 2.8, but not in 2.7. Nearly every project has come >> up with its own backward compatibility module though. See for example >> CMFCore.utils.transaction or CMFPlone.transaction. > > > I'm dispayed to hear this. :( The old use of __builtins__.get_transaction > should be deprecated and supported for a period of time. If it isn't, > then this is *definately* a bug. I agree. I've reported it as a bug: http://www.zope.org/Collectors/Zope/1965 -- Morten W. Petersen Email: [EMAIL PROTECTED] Phone: +47 45 44 00 69 Title: Project manager Nidelven IT (http://www.nidelven-it.no) We provide Zope/Plone hosting and consulting begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] New ways of getting transactions?
Hi, I'm having some code that bombs out trying to commit a transaction; I believe it's because of new ways of doing things in Zope 2.9.. how do you call the equivalents of get_transaction().commit() and abort() in Zope 2.9? Will those new ways work with Zope 2.7/2.8? Thanks. -- Morten W. Petersen Email: [EMAIL PROTECTED] Phone: +47 45 44 00 69 Title: Project manager Nidelven IT (http://www.nidelven-it.no) We provide Zope/Plone hosting and consulting begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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: [Zope3-dev] RFC: Reunite Zope 2 and Zope 3 in the source code repository
Stephan Richter wrote: > On Thursday 24 November 2005 00:41, Philipp von Weitershausen wrote: > >>At least no one is expecting to make such big changes by yourself. Being >>stubborn and refusing to do further contributions, be they large or small, >>isn't going to get us anywhere. The people who are so far backing up this >>proposal have nothing but support to offer and you know that. > > > I am as stubborn refusing this proposal as you are pushing it. Right now > there > are more -1 votes than +1 votes. Maybe it is time retract the proposal? > Furthermore, I have yet to see contributions for Zope 3 from people using > Five. We are not even getting bug reports. I think joining Zope 2 and Zope 3 benefits the community as a whole.. I appreciate that it would be preferable to have Zope 3 on its own, as it is cleanly designed and well thought out, but Zope 2 has a huge community of existing users, and Zope 2 code is being improved all the time. +1 from me. :) -Morten begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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: Get rid of configure/make? (was Re: [Zope-dev] Re: SVN: Zope/trunk/ Merge philikon-zope32-integration branch. Basically, this branch entails:)
> I wasn't arguing that configure/make was hard to use. I'm arguing > that it's something extra to maintain and is just silly. > > It's main benefit is that it leverages a familiar pattern, but > I'm not convinced that it's worth it. Also, as tools like rpm and > deb become more widely used, I'm not sure how familar the configure/make > dance is. Other than Python and Zope, I never use configure/make anymore. My experience is that .rpm and .deb packages are poorly maintained, so if someone is serious about using Zope and related products, downloading and installing from source is the only way to go. We also have tools internally that depend on the configure/make dance, and I'm sure others who put up a lot of Zope instances do as well.. :) -Morten begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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 )
[Fwd: Re: [Zope-dev] Problems adding many objects]
Oops, one for the list as well. Original Message Subject: Re: [Zope-dev] Problems adding many objects Date: Mon, 26 Sep 2005 13:34:50 +0200 From: Morten W. Petersen <[EMAIL PROTECTED]> To: Chris McDonough <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> > It doesn't say "returning issue, None"? My guess is that the if > request is not none branch is called and it goes that way. But there's > no way to know for sure without running it. It says 'returning issue ' > This is a good place to use the Python debugger... as the first line > of this method, insert "import pdb; pdb.set_trace()", then start up > Zope in the foreground (runzope or zopectl fg), then cause the method > to be invoked through a browser. > > On the console you will see a pdb prompt. You can step through the > code by using "n". To print the value of a variable type "p > ", to step in to a function call press "s". When you're > finished, press "c" to continue or "q" to quit. This will be the > fastest way to see what's happening in this method. Yep, I'll have a go at this later. Thanks for describing the debug process. :) -Morten -- Regards, Morten Tlf: +47 45 44 00 69 Blog: http://www.blogologue.com begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] Problems adding many objects
Chris, the implementation looks like this def manage_add_issue(self, id=None, title='', contents='', state='', type='', referrer='', format=None, REQUEST=None): """Add an Issue.""" if id is None: id = self.get_unique_id() issue_ = issue(id, title, contents, state, type, creator=self.get_user().get_id(), owner=self.get_user().get_id(), format=format or self.get_user_preferences().issue_format) self._setObject(id, issue_) self.order.append(issue_.id) self.order = self.order issue_ = self[id] issue_.version = self.get_issue_dealer().version try: self.index_object() except AttributeError: pass if referrer and REQUEST is not None: REQUEST.RESPONSE.redirect(referrer) print 'redirect' else: if REQUEST is not None: if self.inCMF(): print 'admin url' return self.get_admin_url() else: print 'manage_main' return self.manage_main(self, REQUEST) else: print 'returning issue', issue_ return issue_ and before returning none, it says 'returning issue' on stdout. -Morten Chris McDonough wrote: > Hi Morten, > > You'd probably need to show us the implementation of whatever > "manage_add_issue" is. > > - C > > > On Sep 25, 2005, at 10:09 AM, Morten W. Petersen wrote: > >> Hi, >> >> I've created a script that imports XML into the ZODB, using regular TTW >> methods - and all is fine, except for when I import large files, with >> many objects. >> >> After about 288 objects, the import fails when the method that adds an >> object in the ZODB returns None, instead of the object it added. From >> what I can tell, the added object is not None before it is returned, but >> the name object, set via the expression >> >> object = self.manage_add_issue(...) >> >> is None. So it looks like somewhere between 'return issue_' in >> manage_add_issue and the expression above, the object is lost. >> >> Any ideas what could be happening here? I've managed to work around it >> for now, but it is interesting nonetheless. >> >> Regards, >> >> 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 ) >> > > -- Regards, Morten Tlf: +47 45 44 00 69 Blog: http://www.blogologue.com begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] Problems adding many objects
Hi, I've created a script that imports XML into the ZODB, using regular TTW methods - and all is fine, except for when I import large files, with many objects. After about 288 objects, the import fails when the method that adds an object in the ZODB returns None, instead of the object it added. From what I can tell, the added object is not None before it is returned, but the name object, set via the expression object = self.manage_add_issue(...) is None. So it looks like somewhere between 'return issue_' in manage_add_issue and the expression above, the object is lost. Any ideas what could be happening here? I've managed to work around it for now, but it is interesting nonetheless. Regards, Morten begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] Problems with Zope 2.8 on FreeBSD (was Re: Problems with PageTemplates on Zope 2.8)
I've heard of this earlier, but never experienced it until now. :) And yes, that was the issue! :) Thanks, Morten Andrew Sawyers wrote: > Did you bump up the thread stack size for the python you're running Zope > with? This sounds like that problem. If you search zope.org for FreeBSD - > I have a note on how I fix it. > > > Andrew > > -- > Zope Managed Hosting > Software Engineer > Zope Corporation > (540) 361-1700 > > >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On >>Behalf Of Morten W. Petersen >>Sent: Thursday, June 30, 2005 7:37 PM >>To: Max M >>Cc: zope-dev@zope.org >>Subject: [Zope-dev] Problems with Zope 2.8 on FreeBSD (was Re: Problems >>with PageTemplates on Zope 2.8) >> >> >>>>I have an application called the Issue Dealer which I'm porting to Zope >>>>2.8. However, whenever I try to access a PageTemplate which makes use >>>>of a page template macro it just hangs and consumes all available CPU. >>>> >>>>Any ideas what could be wrong here, or how I could debug it? >>> >>>Does the server or the client hang? >> >>It's the client that's hanging. The first time I tested it, it was as a >>simple Zope instance. http://instance/manage worked fine, but accessing >>an Issue Dealer instance (http://instance/stuff) didn't work. >> >>Now when I try setting up a ZEO server/client version 2.8 with python >>2.3.5 on FreeBSD 5.4, the server hangs even when I try to access >>http://instance/manage. http://instance/manage_copyright works fine >>however. >> >>-Morten > > > -- Regards, Morten Tlf: +47 45 44 00 69 Blog: http://www.blogologue.com begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] Problems with Zope 2.8 on FreeBSD (was Re: Problems with PageTemplates on Zope 2.8)
>> I have an application called the Issue Dealer which I'm porting to Zope >> 2.8. However, whenever I try to access a PageTemplate which makes use >> of a page template macro it just hangs and consumes all available CPU. >> >> Any ideas what could be wrong here, or how I could debug it? > > Does the server or the client hang? It's the client that's hanging. The first time I tested it, it was as a simple Zope instance. http://instance/manage worked fine, but accessing an Issue Dealer instance (http://instance/stuff) didn't work. Now when I try setting up a ZEO server/client version 2.8 with python 2.3.5 on FreeBSD 5.4, the server hangs even when I try to access http://instance/manage. http://instance/manage_copyright works fine however. -Morten begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] Problems with PageTemplates on Zope 2.8
Hi, I have an application called the Issue Dealer which I'm porting to Zope 2.8. However, whenever I try to access a PageTemplate which makes use of a page template macro it just hangs and consumes all available CPU. Any ideas what could be wrong here, or how I could debug it? Thanks, Morten PS: CC me as I'm not on the list begin:vcard fn:Morten Petersen n:Petersen;Morten org:Nidelven IT adr:;;Postboks 923;Trondheim;;7409;Norway email;internet:[EMAIL PROTECTED] title:Project Manager tel;work:+47 45 44 00 69 tel;cell:+47 45 44 00 69 x-mozilla-html:FALSE url:http://www.nidelven-it.no version:2.1 end:vcard ___ 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] Re: Renaming a product
> Somebody correct me please, if I'm wrong, but > > 1. tinkering with __class__ is the only way to do this. > 2. you can not tinker with __class__ of an ExtensionClass, i.e. all > Persistent objects. It's not easily doable, no. I settled on converting each instance (copying properties) from the old product name to the new, and it worked. Thanks for your help everybody. :) Regards, Morten W. Petersen -- Technologies: Zope, Linux, Python, HTML, CSS, PHP Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Renaming a product
Hi all, does anyone know how to rename a product, so that instances of the product stored in ZODB will work (with the new name) after the rename? Thanks, Morten W. Petersen -- Technologies: Zope, Linux, Python, HTML, CSS, PHP Homepage: http://www.nidelven-it.no Phone number: (+47) 45 44 00 69 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope builds (new Intel C++ compiler)
On Tue, Feb 12, 2002 at 12:17:28PM +, seb bacon wrote: > > However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with > > various compile options can get a 17% speedup. > > Could you share the compile options with us? BTW seb, I tried compiling Python with the pgcc compiler [1] and that gave a perfomance increase of 15% on the pystones test. [1] http://www.goof.com/pcg/ -Morten msg09402/pgp0.pgp Description: PGP signature
Re: [Zope-dev] Zope builds (new Intel C++ compiler)
On Tue, Feb 12, 2002 at 12:17:28PM +, seb bacon wrote: > > However, I do build Python with gcc 3.1 (cvs) and Python 2.1.2 and with > > various compile options can get a 17% speedup. > > Could you share the compile options with us? I'd like to see those compile options as well... Thanks, Morten msg09383/pgp0.pgp Description: PGP signature
[Zope-dev] Per restart volatile attributes in Zope?
Hello, I'm wondering if there's a volatile attribute type in Zope, where the attribute is deleted each time Zope restarts (or something similar). 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] Updating old catalog indexes (through ZMI)
Hi, I'm wondering if it would be possible to add a method to the ZCatalog so that upgrading indexes would be as easy as pushing a button. Some critique: I find it confusing the index listing in the new catalog only says "pre-2.4 index", when it would be easier to upgrade if something was known about the index type. Regards, Morten -- About Thingamy: http://www.thingamy.com - For the CEO http://www.thingamy.org - The good stuff http://www.thingamy.net - Rants ___ 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] KeyError in UnIndex
Hi guys, I've got an issue here, the following traceback can be seen after several users modify and view the same object in a short (2-3) minute period. I've tried recataloging the objects but that doesn't help either; this error is seen every time.. Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: api) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/local/zope/lib/python/Products/warp_framework/object_manager_inter face.py, line 88, in index_html (Object: api) File /usr/local/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: object_manager_index) File /usr/local/zope/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: object_manager_index) File /usr/local/zope/lib/python/App/special_dtml.py, line 244, in _exec (Object: object_manager_index) File /usr/local/zope/lib/python/DocumentTemplate/DT_In.py, line 770, in renderwob (Object: get_meta_types) File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: get_number_of_objects(meta_type=_['sequence-item'])) (Info: get_number_of_objects) File , line 0, in ? File /usr/local/zope/lib/python/Products/warp_framework/object_manager.py, line 115, in get_number_of_objects (Object: api) File /usr/local/zope/lib/python/Products/WarpFramework/catalog.py, line 210, in __call__ (Object: LockableItem) File /usr/local/zope/lib/python/Products/ZCatalog/ZCatalog.py, line 597, in searchResults (Object: LockableItem) File /usr/local/zope/lib/python/Products/ZCatalog/Catalog.py, line 649, in searchResults File /usr/local/zope/lib/python/Products/ZCatalog/Catalog.py, line 601, in _indexedSearch File /usr/local/zope/lib/python/Products/PluginIndexes/common/UnIndex.py, line 474, in keyForDocument (Object: PluggableIndex) KeyError: 1074768801 Any help much appreciated, Morten -- About Thingamy: http://www.thingamy.com - For the CEO http://www.thingamy.org - The good stuff http://www.thingamy.net - Rants ___ 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] KeyError on UnIndex.keyForDocument
Hia, While trying to reindex an entire catalog an error is raised, which looks like this: Traceback (innermost last): File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: api) File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py, line 171, in publish File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: update_instances) File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: update_instances) File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/WarpFramework/catalog.py, line 438, in update_instances (Object: api) File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/WarpFramework/catalog.py, line 195, in __call__ (Object: Traversable) File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/ZCatalog.py, line 535, in searchResults (Object: Traversable) File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/Catalog.py, line 666, in searchResults File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/Products/ZCatalog/Catalog.py, line 614, in _indexedSearch File /home/morten/zope_instances/usr2/local/Zope-bcr/lib/python/SearchIndex/UnIndex.py, line 453, in keyForDocument KeyError: (see above) Any clues? Thanks a whole bunch, 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] ImportError (No module names utils)
Hi, after using a module named utils in a Zope product the root management screen is no longer available (the module is now renamed). The traceback looks like this: Traceback (innermost last): File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/morten/tmp/Zope-2.4.1-src/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_main) File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_main) File /home/morten/tmp/Zope-2.4.1-src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: manage_main) File /home/morten/tmp/Zope-2.4.1-src/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: manage_main) File /home/morten/tmp/Zope-2.4.1-src/lib/python/App/special_dtml.py, line 244, in _exec (Object: manage_main) File /home/morten/tmp/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_In.py, line 711, in renderwob (Object: objectItems) File /home/morten/tmp/Zope-2.4.1-src/lib/python/DocumentTemplate/DT_In.py, line 839, in sort_sequence (Object: objectItems) File /home/morten/tmp/Zope-2.4.1-src/lib/python/ZODB/Connection.py, line 544, in setstate ImportError: (see above) 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] monitor_client.py in Zope 2.4.1 not working properly
Hi, I've been playing a bit with the monitor_client (ZServer/medusa), and it seems all exceptions aren't raised so it's visible in the client, it's seen in the debug output from Zope itself. Has anyone experienced this? -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] DISCUSS: Community checkins for CVS
On Thu, 20 Sep 2001, Paul Everitt wrote: > So, let's begin what I'm sure will be a lively and illuminating > discussion. :^) First man out? :-) Will a ZPL-ish license [1] be accepted (declared, ref. paragraph 4 of the Zope Contributor Agreement) by the Zope Corporation? [1] http://www.thingamy.org/tpl -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] Spell checking module
On Wed, 27 Jun 2001, Remi Delon wrote: > I have a website where users can post messages (using a textarea). > I would like to be able to spell-check what they submit and > notify them of possible mistakes. (much like the online > spell-checker of hotmail that I'm using right now :-)) > > Has anybody ever written anything for zope that does something > similar ? There is a spellchecker at http://www.zope.org/Members/noa We're currently planning how to implement a new one using the pspell library over at SourceForge: http://sourceforge.net/projects/zope-spellcheck/ -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: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))
On Tue, 26 Jun 2001, Stephan Richter wrote: > - A simple DTML Zope programmers costs are okay and maybe below programmer > average. > - A good Zope/Python programmer will cost above average. > - A good Zope/Python System-Designer is very expensive. > > Because of that you try to minimize the Designer's time by providing a nice > tool (UML tool, such as ObjectDomain). Then you try to minimize the Python > Programmers time by auto-generating the framework and only make him to fill > the methods with life. Now, because we have a UML diagram, the DTML > programmer can start right away with programming the DTML and HTML around > the data/functional model, since the API is clear. This way you optimized > several things: If DTML programming / interface design is so simple, and cheap, why not automate it? (Strike two for low cost development). I've been trying to save some time (and my fingers!) by building a RAD framework, named the WarpFramework [1], which deals with the low level complexity of properties and how to display / manipulate them in addition to other common programming tasks.. this could perhaps blend in easily.. Say for example that we could provide the odd designer with the possibility of simply pushing widgets and displays (generated automatically of course) around the page, and changing colors and backgrounds (CSS); then we have a tool that designers would love as well. > - Minimize the time of the expensive people. Minimize the time of people. Period. :-) . o O ( Many small rivers make.. ) > - Minimize the development time, since many people can work parallel. ..lessen the complexity and add to robustness. > - Because of the above, you minimize risk and money spent. And voila, you > have a well functioning RAD team.* > > * This assumes that your team works together well. ;-) Well, somebody's got to do something, eh? ;-) [1] http://www.sourceforge.net/projects/warp-framework Regards from France, 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: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))
On Tue, 26 Jun 2001, Morten W. Petersen wrote: > Well, it's quite logical: UML can be used to map out both software and > business development (they are, after all, two sides of the same story), > the designer can twiddle-n-polish the interface and the programmer can > take care of 'exceptional tasks' that can't easily be taken care of via > the UML interface without adding too much complexity. The UML interface may be a bit far fetched, but that's because nobody has done it yet. ;-) -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: Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))
On Tue, 26 Jun 2001, Erik Enge wrote: > On Tue, 26 Jun 2001, Morten W. Petersen wrote: > > > How about meta-programming (designing) via the Zope interface, with > > UML or somesuch; automatically generating Python code, then enable > > designers to use a ZFormulator-ish product to edit the interface while > > a programmer can work on the 'backend' (emacs on a terminal)? > > What are you on my friend? ;-) Well, it's quite logical: UML can be used to map out both software and business development (they are, after all, two sides of the same story), the designer can twiddle-n-polish the interface and the programmer can take care of 'exceptional tasks' that can't easily be taken care of via the UML interface without adding too much complexity. -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 )
Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalogbloat problem (berkeleydb is a solution?))
On Tue, 26 Jun 2001, Erik Enge wrote: > If your application can't be written in five minutes and you expect to use > it more than once, you shouldn't use ZClasses - IMO. The only argument > for ZClasses (that I had at the time) was that it was very easy and fast > to set up a couple of classes and some instances. After I wrote mk-zprod, > making Python Products is even faster than ZClasses, and certainly scales > better. Another thing is transparency and control. With source files, it's easier to 'see'; not to mention that code can be factored out into generic python modules in a less cumbersome way. How about meta-programming (designing) via the Zope interface, with UML or somesuch; automatically generating Python code, then enable designers to use a ZFormulator-ish product to edit the interface while a programmer can work on the 'backend' (emacs on a terminal)? One thing I'd really like to implement is DTMLFile transparency via the web, so that a designer could enter into Control_Panel/Products/MyProduct and edit webinterface files there, reflecting it on the filesystem. ZClasses (as they are today, 'half-baked') should be tossed out, and focus brought on making one approach easier. -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] Re: ZPL and GPL licensing issues
On 22 Jun 2001, Simon Michael wrote: > Now here, I have to assume RMS is using "combine" above to mean > "combine and redistribute". > > I hope I'm right ? If "combine" included "install zwiki on your zope > installation and use it" then everything I know is wrong.. I did > intend for that to be fairly danger-free. I'm not sure, I've fired off another email to get a clarification. While we're one the topic, I just read an article [1] over at Kuro5hin that could enlighten the management over at Digicool and us as well; it discusses the impacts of Free Software and relates it to Free Trade, talks about barriers and other interesting things. >From the practical point of view, being able to use GPL-ed software with Zope is a Good Thing (TM) for most developers. Another thing is that some people / companies may be reluctant to add signifcant modules that could be included in the Zope core, as they will not get the same level of recognition for their work as Digital Creations would. For me personally, a Zope license without the advertising clause would motivate me, as the 'protection barrier' / 'restriction' / 'attribution issue' wouldn't be there; I have a ton of things I'd like to change in Zope and add to Zope, and as time goes by, the who-gets-credit-issue will undoubtedly be raised again, if we're so lucky that Digicool decides to open up Zope for read/write CVS access. [1] http://www.kuro5hin.org/?op=displaystory;sid=2001/6/23/3451/16661 -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] Re: ZPL and GPL licensing issues
On 22 Jun 2001, Simon Michael wrote: > Shane Hathaway <[EMAIL PROTECTED]> writes: > >> One of the consequences being that someone re-distributing zope & > >> zwiki together, under their default licenses, is technically in > >> violation right now, I think we are all agreeing. > > > > Technically yes, although I like to think that the product developers > > implicitly grant redistribution permission by attempting to apply the > > GPL. > > I'm not sure that would be a valid assumption. Speaking for myself, it > wasn't my particular intention to unconditionally grant that > permission given the licenses as they stand. I mean, I didn't intend > that zwiki's GPL be some kind of watered-down GPL. :) May Stallman forgive me (fun intended :-): """ Date: Thu, 21 Jun 2001 16:43:05 -0600 (MDT) From: Richard Stallman <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Mixing different licences Another question is whether or not it's legal to use GPL-ed Zope products with Zope. That is a hard question. I don't know whether Zope is just an interpreter or contains facilities that, in effect, the user program links with. It makes a difference. If the former, you can run programs on Zope regardless of their licenses. If the latter, then in general, you can't take someone's GPL-covered code and combine it with Zope, because the Zope license is GPL-incompatible. If someone wrote a GPL-covered program specifically for Zope, you are pretty safe taking that as implicit permission to combine it with Zope. But it would be better for them to give explicit permission. """ Implicitly yours, 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 )
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 )
[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] 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] 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] 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] 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] 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 )
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 )
[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 )
[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] 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 )
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] 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 )
[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] 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 )
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] 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] 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 )
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 )
[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] 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 )
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] 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?
[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 )
[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] 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 )
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 )
[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 )
[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] 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 )
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 )
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
[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
[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] 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 )
[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] 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] 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
[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 )
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
[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
[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] 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
[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 )
[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 )
[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] 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] 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 )
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] 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 )
[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 )
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] 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 )
[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] 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 )
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 )
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] 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] 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 )
[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] '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 )
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] 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 )
[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 )
[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] 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] 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 )