Re: [Zope-dev] Re: Event Timer Service for Zope 2.8
On Sun, 2005-07-24 at 11:51 +1000, Dylan Jay wrote: Chris McDonough wrote: On Fri, 2005-07-22 at 13:11 +0200, Florent Guillaume wrote: Dylan Jay [EMAIL PROTECTED] wrote: Tres Seaver wrote: Myself I'm for having ClockServer in the core, if Chris and others agree. It's fine with me. We maybe just need to remove the C extension in it... someone (you?) provided a pure python implementation of what it does that probably runs just as fast. There is also TimerService by Nikolay Kim. Does that work in the same way? I don't know. As far as I know, ClockServer is the only product that works as a medusa server as opposed to a separate thread or process (which is really its only attraction). One nice feature of this is that products such as a scheduler subscribe to its tick so that many products can benifit from the clock. This seems more flexible to me, rather than putting the path to be called in the zope.conf. This is typically the domain of an event service (components subscribe to events, and the service contacts all of them when one of those events happens). I agree this is very useful but I'd try to implement it in terms of a more general event service. The clock is really just a clock and it should do not much more. Another nice feature is a plugin archetecture shown by http://www.last-bastion.net/portal_zpydoc/Products.ZScheduler.html Here one kind of clock can be replaced by another so for instance a cron job could be used instead of the clockservice. That product also had a singlethreaded clock that ensured the next tick didn't occur until the last finished. Personally I think that is the schedulers job rather than the clocks but I do think allowing an cron override is a good idea. So perhaps the archetecture could look something like ClockService (outside zope) v Clock ControlPanel (inside zope... could also be called via cron wget) v v Scheduler A Product X In other words products subscribe to the clock control panel in order to get a regular call back and the clock control panel is driver from clockserver or some other outside source. That'd be fine but IMHO a scheduler should probably still be implemented on top of one or more dumb clocks and clock ticks should cause events to fire (if necessary) based on an event system that can be used for other things. Or alternatively you could just make the clock control panel a scheduler and say that anyone wanting a clock tick has to register a recurring task. I wouldn't be apt include the Scheduler product in the core. I think it may be a tad too complicated. Do you mean the zope cvs scheduler? Yes. I think this is the simplest implementation I've seen. It is API friendly in that it allows for code to add events reasonably easily. Its UI could be improved somewhat. The Zscheduler above as a nicer UI that could be borrowed. I think the cvs scheduler needs to at least have an option of not allowing more than one task at a time to run. This could be implemented in the callers code but it is a nice service. At the very least the current code needs to be fixed as it causes conflicts if its notify is called before the last one has finished. It also currently depends on the Event product (although that would be easy to remove). But FWIW, I'm not interested in putting any scheduler in the core personally right away, just a clock for now. This is mostly for maintenance reasons. If we did put one in, I'd probably try to implement it in Zope 3 and bridge it to Zope 2 using the Zope 3 event service and Five. The Event product is likely superseded by the Zope 3 event system included in Five. Is there really a need for an event system? I can't see where the actual event system is even used in the cvs scheduler. Surely a listener/talker pattern is easy enough to implement? The Scheduler product indeed subscribes to an event service in order to accept ITimeEvent and IScheduledEvent event notifications. See its notify method in Scheduler.Scheduler. The pattern is easy to implement but it is useful to have one component handle event registration and notification so you don't have to reimplement it over and over. - C ___ 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: [ZODB-Dev] Reloading product in 2.8
Shane Hathaway wrote at 2005-7-18 16:46 -0600: ... 3. If you want to refresh a product that registers itself with another product, you have to set up dependencies like in step #2. When you want to refresh, you have to refresh the product that contains the registry, not your own product. Otherwise the registry will refer to instances of the old product classes. I think when the product with the registry behaves like this (i.e. it keeps the old entries rather than takes the newly registered ones) this product does something wrong. The best way would be to fix this product... Otherwise (just to be explicit about this), you need to refresh both products: the one with the registry and the registering product. -- Dieter ___ 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] Reg Zope service starting problem
Dear All, I try to install Zope 2.7.0 in my machine. This version is installed successfully but after the installation I try to run zope service using runzope command. But I got below error. I am using gobolinux and Python 2.3.3 for this zope version. I try to install some other zope version eg (2.7.6,2.8.0 and 3.0.0) all the different version of zope have the same problem. Kindly let me know what is the problem of zope installation. Actually I try to start zope service from the zope instance's bin directory. This instance directory is created by mkzopeinstance.py regards Prabahar [EMAIL PROTECTED] /Users/enmail/tes]bin/runzope -- 2005-07-25T10:39:52 INFO(0) ZServer HTTP server started at Mon Jul 25 10:39:52 2005 Hostname: localhost.localdomain Port: 8080 -- 2005-07-25T10:39:52 INFO(0) ZServer FTP server started at Mon Jul 25 10:39:52 2005 Hostname: prabahar Port: 8021 -- 2005-07-25T10:39:52 INFO(0) Zope Set effective user to enmail Traceback (most recent call last): File /Programs/Zope/2.7.0/lib/python/Zope/Startup/run.py, line 49, in ? run() File /Programs/Zope/2.7.0/lib/python/Zope/Startup/run.py, line 19, in run start_zope(opts.configroot) File /Programs/Zope/2.7.0/lib/python/Zope/Startup/__init__.py, line 51, in start_zope starter.startZope() File /Programs/Zope/2.7.0/lib/python/Zope/Startup/__init__.py, line 230, in startZope Zope.startup() File /Programs/Zope/2.7.0/lib/python/Zope/__init__.py, line 45, in startup from Zope.App.startup import startup as _startup File /Programs/Zope/2.7.0/lib/python/Zope/App/startup.py, line 30, in ? import OFS.Application File /Programs/Zope/2.7.0/lib/python/OFS/Application.py, line 18, in ? import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ File /Programs/Zope/2.7.0/lib/python/App/Product.py, line 44, in ? from HelpSys.HelpSys import ProductHelp File /Programs/Zope/2.7.0/lib/python/HelpSys/__init__.py, line 15, in ? import HelpSys File /Programs/Zope/2.7.0/lib/python/HelpSys/HelpSys.py, line 18, in ? from Products.ZCatalog.ZCatalog import ZCatalog File /Programs/Zope/2.7.0/lib/python/Products/ZCatalog/__init__.py, line 16, in ? import ZCatalog, Catalog, CatalogAwareness, CatalogPathAwareness, ZClasses File /Programs/Zope/2.7.0/lib/python/Products/ZCatalog/ZCatalog.py, line 39, in ? from IZCatalog import IZCatalog File /Programs/Zope/2.7.0/lib/python/Products/ZCatalog/IZCatalog.py, line 236, in ? __doc__ = IZCatalog.__doc__ + __doc__ TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' __ Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com ___ 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] how do I check if an object have being recently updated??
Am Samstag, den 23.07.2005, 19:17 -0700 schrieb Allen Huang: I want to post a update date that will change when any of the objects in a folder has been updated. So far, I only know the command bobobase_modification_time, but it only works again the object I I enter the command with.. This is not a command. This is a method! Methods are called on an object. so if o is your object, o.bobobase_modification_time() returns the internal storage time of that object. Maybe its a good start if you read the python tutorial (www.python.org) to get an idea on all that object, method, attribute stuff. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Follow-up to aq_parent(aq_inner(self))-question
Hi! How can I get the product's path while instantiating it? Shouldn't this information exist somewhere? aq_parent(aq_inner(self)) returns None, which isn't totally unexpected since __init__ isn't strictly a Zope method and thus doesn't necessarily have a Zope method's context. (I need, from the __init__ method of a product, to find out its instantiation path in the ZODB.) TIA, Ole ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Follow-up to aq_parent(aq_inner(self))-question
--On 24. Juli 2005 15:27:32 +0200 Jan-Ole Esleben [EMAIL PROTECTED] wrote: Hi! How can I get the product's path while instantiating it? Shouldn't this information exist somewhere? aq_parent(aq_inner(self)) returns None, which isn't totally unexpected since __init__ isn't strictly a Zope method and thus doesn't necessarily have a Zope method's context. (I need, from the __init__ method of a product, to find out its instantiation path in the ZODB.) Use manage_afterAdd(). There is no acquistion context available during the construction phase where __init__() is used. -aj pgpnAnGEp6JyC.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FW: Problem downloading large files
Laurikainen, Tuukka wrote: We're having some problems downloading large files from Zope/Plone running on win32, through an SSL connection. Uploads seem work ok. Then stop being dense and just use Apache as an https proxy. Works a treat, unlike ZServerSSL, which feels like a horrible hack to me... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: ZTUtils.Iterator value in ZPT
David Pratt wrote: Ah, I see what you're after, something akin to an SQL sequence, right? Well, Iterator ain't that ;-) I guess something like that but that is what an iterator does. Why makes you think ZTUtils Iterators were designed for this? Well, by hand is not the solution either. It is not as simple as that since I am using portlets in CMF You meean portlets in Plone, right? ;-) You can't just number them like 1,2,3 etc because you end up with conflicts in tabindex values when your templates are rendered. So give them each their own numbers based on the worst case of all portlets being present on one page... your ZPT (that doesn't require you to write one with all the security bypasses to make it work). They are not security bypasses, they are appropriate security declarations based on the work the ZTUtils code does when executing... Looks like you're on your own... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: ZTUtils.Iterator value in ZPT
Hi Chris. I believe the purpose of ZTUtils are utility functions for page templating. That said, the Iterator class could be more useful by exposing its values based on its state - the point I had made. Versatility is the beautiful thing about python - it rarely matters to me what intention there is or may have been for a class so long as it supplies the methods I am after. In the end, there's really nothing here that can't be solved with a simple tool and a bit of flexibility on my part. Many thanks. Regards, David On Friday, July 22, 2005, at 02:08 PM, Chris Withers wrote: David Pratt wrote: Ah, I see what you're after, something akin to an SQL sequence, right? Well, Iterator ain't that ;-) I guess something like that but that is what an iterator does. Why makes you think ZTUtils Iterators were designed for this? Well, by hand is not the solution either. It is not as simple as that since I am using portlets in CMF You meean portlets in Plone, right? ;-) You can't just number them like 1,2,3 etc because you end up with conflicts in tabindex values when your templates are rendered. So give them each their own numbers based on the worst case of all portlets being present on one page... your ZPT (that doesn't require you to write one with all the security bypasses to make it work). They are not security bypasses, they are appropriate security declarations based on the work the ZTUtils code does when executing... Looks like you're on your own... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] getting atachments with python - pop3
Hi, im making a email client in python for zope, but a im stopped because i cant find the way to get the attacments with python, do you have a idea how can i do this?, i have studied the email package already but is a little confused. -- Lic. Jonathan Salazar Visita: www.jonathansalazar.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] getting atachments with python - pop3
Hi, im making a email client in python for zope, but a im stopped because i cant find the way to get the attacments with python, do you have a idea how can i do this?, i have studied the email package already but is a little confused. -- Lic. Jonathan Salazar Visita: www.jonathansalazar.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: getting atachments with python - pop3
Study the source code of the IssueTrackerProduct (www.issuetrackerproduct.com) http://cvs.sourceforge.net/viewcvs.py/issuetracker/IssueTrackerProduct/IssueTracker.py?rev=1.268view=auto because it uses poplib to download and deal with attachments. On 7/25/05, Jonathan Salazar Santos [EMAIL PROTECTED] wrote: Hi, im making a email client in python for zope, but a im stopped because i cant find the way to get the attacments with python, do you have a idea how can i do this?, i have studied the email package already but is a little confused. -- Lic. Jonathan Salazar Visita: www.jonathansalazar.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Getting a methods parent (in a product)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jens Vagelpohl wrote: On 23 Jul 2005, at 16:12, Peter Bengtsson wrote: from Acquisition import aq_inner, aq_parent parent = aq_parent(aq_inner(self)) This will return the true container the instance is set in, not just the acquisition parent. What's so bad about parent = self.aq_parent Two things: - simply using aq_parent does not guarantee giving you the real containment parent. Depending on the path used to access the object it could be something different from the true containment parent. That's the power of acquisition... Which is why the 'aq_inner()' call is in there: it strips away non-contaiment wrappers. - direct attribute access like that makes me feel dirty. I prefer the true object-oriented style where you use methods to get at stuff. The actual issue is that attribute access will break if you have an unwrapped object; 'aq_parent(foo)' will return 'None' in that case. (A tiny nit, 'aq_parent()' and the related 'aq_base()' and 'aq_inner()' are module-scope functions, rather than methods). Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC5EZx+gerLs4ltQ4RAk9+AKCsb9wg7edRq4HfFcHn/FwBvpSmCwCeK8Ke zt8foauYT7v9DRf2TYbqMjE= =eU4v -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-22 09:19 -0400: If it helps, the last lines in the traceback are as follows: Module DocumentTemplate.DT_String, line 474, in __call__ Module Products.MailHost.SendMailTag, line 116, in render Module Products.MailHost.MailHost, line 125, in send Module Products.MailHost.MailHost, line 144, in _send Module smtplib, line 254, in __init__ gaierror: (7, 'No address associated with nodename') This error comes from your mail server. Checks its (the mail server's) documentation to make sense of it. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zope Foundation Update
Andreas Jung wrote at 2005-7-21 08:29 +0200: ... ZEA silently registering the Zope logo ... If it wasn't a secret I am sure that ZC would know about the secret. This reminds me a discussion between two business students: They planned how to make money with little effort. Their business plan looked like this: Check in which countries Coca Cola (or some other large quickly expanding company) has not registered its trademarks. Register them and wait until Coca Cola recognizes its error. Let them pay for the transferal of the trademark rights. This discussion convinced me that the trademark laws are almost as bad as the patent laws... I do not know ZEA and do not know whether they hired business students like the above But it looks very suspicious when they say that they registered logos they did not design for protective reasons *without* informing the company that officially use these logos (and paid for the design) *before* the registration... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Reg Zope service starting problem
Dear All, I try to install Zope 2.7.0 in my machine. This version is installed successfully but after the installation I try to run zope service using runzope command. But I got below error. I am using gobolinux and Python 2.3.3 for this zope version. I try to install some other zope version eg (2.7.6,2.8.0 and 3.0.0) all the different version of zope have the same problem. Kindly let me know what is the problem of zope installation. regards Prabahar [EMAIL PROTECTED] /Users/enmail/tes]bin/runzope -- 2005-07-25T10:39:52 INFO(0) ZServer HTTP server started at Mon Jul 25 10:39:52 2005 Hostname: localhost.localdomain Port: 8080 -- 2005-07-25T10:39:52 INFO(0) ZServer FTP server started at Mon Jul 25 10:39:52 2005 Hostname: prabahar Port: 8021 -- 2005-07-25T10:39:52 INFO(0) Zope Set effective user to enmail Traceback (most recent call last): File /Programs/Zope/2.7.0/lib/python/Zope/Startup/run.py, line 49, in ? run() File /Programs/Zope/2.7.0/lib/python/Zope/Startup/run.py, line 19, in run start_zope(opts.configroot) File /Programs/Zope/2.7.0/lib/python/Zope/Startup/__init__.py, line 51, in start_zope starter.startZope() File /Programs/Zope/2.7.0/lib/python/Zope/Startup/__init__.py, line 230, in startZope Zope.startup() File /Programs/Zope/2.7.0/lib/python/Zope/__init__.py, line 45, in startup from Zope.App.startup import startup as _startup File /Programs/Zope/2.7.0/lib/python/Zope/App/startup.py, line 30, in ? import OFS.Application File /Programs/Zope/2.7.0/lib/python/OFS/Application.py, line 18, in ? import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ File /Programs/Zope/2.7.0/lib/python/App/Product.py, line 44, in ? from HelpSys.HelpSys import ProductHelp File /Programs/Zope/2.7.0/lib/python/HelpSys/__init__.py, line 15, in ? import HelpSys File /Programs/Zope/2.7.0/lib/python/HelpSys/HelpSys.py, line 18, in ? from Products.ZCatalog.ZCatalog import ZCatalog File /Programs/Zope/2.7.0/lib/python/Products/ZCatalog/__init__.py, line 16, in ? import ZCatalog, Catalog, CatalogAwareness, CatalogPathAwareness, ZClasses File /Programs/Zope/2.7.0/lib/python/Products/ZCatalog/ZCatalog.py, line 39, in ? from IZCatalog import IZCatalog File /Programs/Zope/2.7.0/lib/python/Products/ZCatalog/IZCatalog.py, line 236, in ? __doc__ = IZCatalog.__doc__ + __doc__ TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' __ Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )