[Zope-Checkins] SVN: Zope/branches/2.9/ Collector #2185: Log username for FCGI requests.
Log message for revision 70001: Collector #2185: Log username for FCGI requests. Changed: U Zope/branches/2.9/doc/CHANGES.txt U Zope/branches/2.9/lib/python/ZServer/FCGIServer.py -=- Modified: Zope/branches/2.9/doc/CHANGES.txt === --- Zope/branches/2.9/doc/CHANGES.txt 2006-09-06 15:19:04 UTC (rev 7) +++ Zope/branches/2.9/doc/CHANGES.txt 2006-09-06 15:23:51 UTC (rev 70001) @@ -8,6 +8,8 @@ Bugs fixed + - Collector #2185: Log username for FCGI requests. + - Collector #2152: Fixed MailHost documentation; simple_send does not process or validate its arguments in any way. Modified: Zope/branches/2.9/lib/python/ZServer/FCGIServer.py === --- Zope/branches/2.9/lib/python/ZServer/FCGIServer.py 2006-09-06 15:19:04 UTC (rev 7) +++ Zope/branches/2.9/lib/python/ZServer/FCGIServer.py 2006-09-06 15:23:51 UTC (rev 70001) @@ -47,6 +47,7 @@ import socket, string, os, sys, time import thread from types import StringTypes +import base64 tz_for_log = compute_timezone_for_log() @@ -455,11 +456,24 @@ method=self.env['REQUEST_METHOD'] else: method=GET +if self.env.has_key('HTTP_AUTHORIZATION'): +http_authorization=self.env['HTTP_AUTHORIZATION'] +if string.lower(http_authorization[:6]) == 'basic ': +try: decoded=base64.decodestring(http_authorization[6:]) +except base64.binascii.Error: decoded='' +t = string.split(decoded, ':', 1) +if len(t) 2: +user_name = '-' +else: +user_name = t[0] +else: +user_name='-' if self.addr: self.server.logger.log ( self.addr[0], -'%s - - [%s] %s %s %d %d %s %s' % ( +'%s - %s [%s] %s %s %d %d %s %s' % ( self.addr[1], +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) @@ -471,7 +485,8 @@ else: self.server.logger.log ( '127.0.0.1 ', -'- - [%s] %s %s %d %d %s %s' % ( +'- %s [%s] %s %s %d %d %s %s' % ( +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/ Collector #2185: Log username for FCGI requests.
Log message for revision 70002: Collector #2185: Log username for FCGI requests. Changed: U Zope/branches/2.10/doc/CHANGES.txt U Zope/branches/2.10/lib/python/ZServer/FCGIServer.py -=- Modified: Zope/branches/2.10/doc/CHANGES.txt === --- Zope/branches/2.10/doc/CHANGES.txt 2006-09-06 15:23:51 UTC (rev 70001) +++ Zope/branches/2.10/doc/CHANGES.txt 2006-09-06 15:24:11 UTC (rev 70002) @@ -8,6 +8,8 @@ Bugs fixed + - Collector #2185: Log username for FCGI requests. + - Collector #2152: Fixed MailHost documentation; simple_send does not process or validate its arguments in any way. Modified: Zope/branches/2.10/lib/python/ZServer/FCGIServer.py === --- Zope/branches/2.10/lib/python/ZServer/FCGIServer.py 2006-09-06 15:23:51 UTC (rev 70001) +++ Zope/branches/2.10/lib/python/ZServer/FCGIServer.py 2006-09-06 15:24:11 UTC (rev 70002) @@ -47,6 +47,7 @@ import socket, string, os, sys, time import thread from types import StringTypes +import base64 tz_for_log = compute_timezone_for_log() @@ -455,11 +456,24 @@ method=self.env['REQUEST_METHOD'] else: method=GET +if self.env.has_key('HTTP_AUTHORIZATION'): +http_authorization=self.env['HTTP_AUTHORIZATION'] +if string.lower(http_authorization[:6]) == 'basic ': +try: decoded=base64.decodestring(http_authorization[6:]) +except base64.binascii.Error: decoded='' +t = string.split(decoded, ':', 1) +if len(t) 2: +user_name = '-' +else: +user_name = t[0] +else: +user_name='-' if self.addr: self.server.logger.log ( self.addr[0], -'%s - - [%s] %s %s %d %d %s %s' % ( +'%s - %s [%s] %s %s %d %d %s %s' % ( self.addr[1], +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) @@ -471,7 +485,8 @@ else: self.server.logger.log ( '127.0.0.1 ', -'- - [%s] %s %s %d %d %s %s' % ( +'- %s [%s] %s %s %d %d %s %s' % ( +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/ZServer/FCGIServer.py Collector #2185: Log username for FCGI requests.
Log message for revision 70003: Collector #2185: Log username for FCGI requests. Changed: U Zope/trunk/lib/python/ZServer/FCGIServer.py -=- Modified: Zope/trunk/lib/python/ZServer/FCGIServer.py === --- Zope/trunk/lib/python/ZServer/FCGIServer.py 2006-09-06 15:24:11 UTC (rev 70002) +++ Zope/trunk/lib/python/ZServer/FCGIServer.py 2006-09-06 15:24:24 UTC (rev 70003) @@ -47,6 +47,7 @@ import socket, string, os, sys, time import thread from types import StringTypes +import base64 tz_for_log = compute_timezone_for_log() @@ -455,11 +456,24 @@ method=self.env['REQUEST_METHOD'] else: method=GET +if self.env.has_key('HTTP_AUTHORIZATION'): +http_authorization=self.env['HTTP_AUTHORIZATION'] +if string.lower(http_authorization[:6]) == 'basic ': +try: decoded=base64.decodestring(http_authorization[6:]) +except base64.binascii.Error: decoded='' +t = string.split(decoded, ':', 1) +if len(t) 2: +user_name = '-' +else: +user_name = t[0] +else: +user_name='-' if self.addr: self.server.logger.log ( self.addr[0], -'%s - - [%s] %s %s %d %d %s %s' % ( +'%s - %s [%s] %s %s %d %d %s %s' % ( self.addr[1], +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) @@ -471,7 +485,8 @@ else: self.server.logger.log ( '127.0.0.1 ', -'- - [%s] %s %s %d %d %s %s' % ( +'- %s [%s] %s %s %d %d %s %s' % ( +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] zope 2.9.x: FCGIServer.py: Patch: logging username
Hello Here is a patch for lib/python/ZServer/FCGIServer.py so the username is also logged when accessing Zope via FastCGI. Currently it is always displayed as a dash. Stef -- --- addr://Kasinostrasse 30, CH-5001 Aarau fon://++41 62 823 9355 http://www.terreactive.com fax://++41 62 823 9356 --- 10 Jahre Kompetenz in IT-Sicherheit.1996 - 2006 Wir sichern Ihren Erfolg.terreActive AG --- --- /usr/opt/zope/lib/python/ZServer/FCGIServer.py.orig 2004-12-02 00:01:48 +0100 +++ /usr/opt/zope/lib/python/ZServer/FCGIServer.py 2006-02-07 15:05:06 +0100 @@ -47,6 +47,7 @@ import socket, string, os, sys, time import thread from types import StringTypes +import base64 tz_for_log = compute_timezone_for_log() @@ -455,11 +456,24 @@ method=self.env['REQUEST_METHOD'] else: method=GET +if self.env.has_key('HTTP_AUTHORIZATION'): +http_authorization=self.env['HTTP_AUTHORIZATION'] +if string.lower(http_authorization[:6]) == 'basic ': +try: decoded=base64.decodestring(http_authorization[6:]) +except base64.binascii.Error: decoded='' +t = string.split(decoded, ':', 1) +if len(t) 2: +user_name = '-' +else: +user_name = t[0] +else: +user_name='-' if self.addr: self.server.logger.log ( self.addr[0], -'%s - - [%s] %s %s %d %d %s %s' % ( +'%s - %s [%s] %s %s %d %d %s %s' % ( self.addr[1], +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) @@ -471,7 +485,8 @@ else: self.server.logger.log ( '127.0.0.1 ', -'- - [%s] %s %s %d %d %s %s' % ( +'- %s [%s] %s %s %d %d %s %s' % ( +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) ___ 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: I'm starting to get bored of people complaining about Zope
Sidnei da Silva wrote: Regarding: I'm starting to get bored of people complaining about Zope Being a full time active Zope developer (as in developing with zope) for at least 7 year, having contributed code, libraries, documentation and products, I believe I have earned the right to complain once every second year so! I know that if I have problems developing in Zope, so does many more people. And yes Zope 3 is the future, and will make everything so easy for developers. But in the meantime we don't have to scare people of with a difficult development process. -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 42 96 ___ 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: I'm starting to get bored of people complaining about Zope
Max M wrote: Sidnei da Silva wrote: Regarding: I'm starting to get bored of people complaining about Zope Being a full time active Zope developer (as in developing with zope) for at least 7 year, having contributed code, libraries, documentation and products, I believe I have earned the right to complain once every second year so! Constructive complaints are good, agreed. I complain more than once a year, even! I know that if I have problems developing in Zope, so does many more people. And yes Zope 3 is the future, and will make everything so easy for developers. But in the meantime we don't have to scare people of with a difficult development process. And Zope 3 isn't perfect either, so you can catch us complain about that too. Complaints are good if they lead to an improvement. That could be an improvement in code but also an improvement in practices. Regards, Martijn ___ 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: zope 2.9.x: FCGIServer.py: Patch: logging username
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan Doerig wrote: Hello Here is a patch for lib/python/ZServer/FCGIServer.py so the username is also logged when accessing Zope via FastCGI. Currently it is always displayed as a dash. Stef --- /usr/opt/zope/lib/python/ZServer/FCGIServer.py.orig 2004-12-02 00:01:48 +0100 +++ /usr/opt/zope/lib/python/ZServer/FCGIServer.py2006-02-07 15:05:06 +0100 @@ -47,6 +47,7 @@ import socket, string, os, sys, time import thread from types import StringTypes +import base64 tz_for_log = compute_timezone_for_log() @@ -455,11 +456,24 @@ method=self.env['REQUEST_METHOD'] else: method=GET +if self.env.has_key('HTTP_AUTHORIZATION'): +http_authorization=self.env['HTTP_AUTHORIZATION'] +if string.lower(http_authorization[:6]) == 'basic ': +try: decoded=base64.decodestring(http_authorization[6:]) +except base64.binascii.Error: decoded='' +t = string.split(decoded, ':', 1) +if len(t) 2: +user_name = '-' +else: +user_name = t[0] +else: +user_name='-' if self.addr: self.server.logger.log ( self.addr[0], -'%s - - [%s] %s %s %d %d %s %s' % ( +'%s - %s [%s] %s %s %d %d %s %s' % ( self.addr[1], +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) @@ -471,7 +485,8 @@ else: self.server.logger.log ( '127.0.0.1 ', -'- - [%s] %s %s %d %d %s %s' % ( +'- %s [%s] %s %s %d %d %s %s' % ( +user_name, time.strftime ( '%d/%b/%Y:%H:%M:%S ', time.localtime(time.time()) Thanks for working on the patch. Could you please upload it to a new feature+solution issue in the Zope collector so it doesn't get lost in the shuffle of the list? http://www.zope.org/Collectors/Zope Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE/qse+gerLs4ltQ4RAoClAJ0SEllr++O4JMwQZFP5wA8qpGz5jQCfRa5x qX/VaVoeujkld0cUCD1Sp94= =7kwr -END PGP SIGNATURE- ___ 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: get_transaction().commit() stops execution
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: In my custom Zope Product (in python), get_transaction().commit() halts execution (without throwing an exception). Is this the proper behavior? Nope. If it is, then how do you commit what you've done so far without halting execution? The 'get_transaction' bit has been deprecated in recent versions of ZODB / Zope. The equivlaent non-deprecated spelling is:: import transaction transaction.commit() And, if not, what would cause it to halt execution? I've never seen such a thing. Is there anything at all in your logfiles which provdes a clue? If all else fails, you could set a breakpoint just before the 'commit' call and try stepping over /into it. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE/qva+gerLs4ltQ4RAjzjAKDLZT08oqS554CIh2gpWHwWzh2nVwCgxCmt VWs4x+VOV+zikJsYuel3tmE= =1WmK -END PGP SIGNATURE- ___ 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] buildbot failure in Zope trunk 2.4 Windows 2000 zc-bbwin6
The Buildbot has detected a failed build of Zope trunk 2.4 Windows 2000 zc-bbwin6. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7494 Blamelist: alga,batlogg,ctheune,fdrake,flox,gintautasm,jim,jukart,mgedmin,oestermeier,poster,rogerineichen,shh,srichter,tseaver BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ 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] buildbot failure in Zope trunk 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7494 Blamelist: alga,batlogg,ctheune,fdrake,flox,gintautasm,jim,jukart,mgedmin,oestermeier,poster,rogerineichen,shh,srichter,tseaver BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7492 Blamelist: batlogg,ctheune,fdrake,jim,jukart,rogerineichen,tseaver BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.10 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7493 Blamelist: batlogg,ctheune,fdrake,jim,jukart,rogerineichen,tseaver BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.10 2.4 Windows 2000 zc-bbwin2
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Windows 2000 zc-bbwin2. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7493 Blamelist: batlogg,ctheune,fdrake,jim,jukart,rogerineichen,tseaver BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 zc-bbwin2. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7492 Blamelist: batlogg,ctheune,fdrake,jim,jukart,rogerineichen,tseaver BUILD FAILED: failed failed slave lost sincerely, -The Buildbot ___ 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] zc.buildout changes
I apologize in advance to most of you who are not playing with zc.buildout. For those of who are ... I don't have a dedicated list for zc.buildout yet, but I imagine that most of you are on thse lists This morning I made new releases of zc.buildout, zc.recipe.egg and zc.recipe.testrunner. The recipe releases depend on the buildout releases. This means, unfortunately, that existing buildouts will break when they try to get the latest recipe releases. You will need to rerun the bootstrap script to get the latest buildout release. In an effort to prevent this sort of breakage in the future, the buildout software is now self updating. After installing the new release, the buildout software will check for new buildout and setuptools releases whenever it runs (except in offline mode). Jim -- Jim Fulton mailto:[EMAIL PROTECTED]Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporationhttp://www.zope.com http://www.zope.org ___ 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] zope 3 invisibility
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6 Sep 2006, at 02:04, Fred Drake wrote: On 9/5/06, Carlos de la Guardia [EMAIL PROTECTED] wrote: I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx ). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. Interesting. I've always considered blogs to be fairly invisible since I have to go look for them, whereas for mailing lists I can sign up for things I'm interested in. Exactly. This is a matter of taste, nothing else. Mailing list email comes to me. Blogs I have to seek out and go there. Sorry, too much effort for much hot air of dubious quality ;) jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE/od4RAx5nvEhZLIRAs05AJsEn9oF9rU6Q7FuecshiJymRgwW0ACfe4Tk 5Esm73+twRT07ESeNMu3Yyc= =uRqt -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] zope 3 invisibility
--On 6. September 2006 10:31:51 +0200 Jens Vagelpohl [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6 Sep 2006, at 02:04, Fred Drake wrote: On 9/5/06, Carlos de la Guardia [EMAIL PROTECTED] wrote: I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx ). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. Interesting. I've always considered blogs to be fairly invisible since I have to go look for them, whereas for mailing lists I can sign up for things I'm interested in. Exactly. This is a matter of taste, nothing else. Mailing list email comes to me. Blogs I have to seek out and go there. Sorry, too much effort for much hot air of dubious quality ;) That's why we have blog aggregation like on planet.plone.org or planet.zope.org. There is of course also noise but you have noise also in mailinglists. -aj pgpf52mZTXbN2.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 )
[Zope] Re: zope 3 invisibility
Jens Vagelpohl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6 Sep 2006, at 02:04, Fred Drake wrote: On 9/5/06, Carlos de la Guardia [EMAIL PROTECTED] wrote: I frequently blog about Zope, and recently posted a list of 10 reasons why I think Zope 3 is kind of invisible to the Python community (see my blog at http://blog.delaguardia.com.mx ). One of the things that I talk about in that post is that the Zope community tends to interact more through its mailing lists than its blogs, as opposed to other so-called modern frameworks, like Django and Turbogears. Interesting. I've always considered blogs to be fairly invisible since I have to go look for them, whereas for mailing lists I can sign up for things I'm interested in. Exactly. This is a matter of taste, nothing else. Mailing list email comes to me. Blogs I have to seek out and go there. Sorry, too much effort for much hot air of dubious quality ;) Lol, and lists like this one here do NOT have hot air of dubious quality? It *is* a matter of taste, sure. However, the effects of buzz through blogging cannot be denied. My blog for instance is in the planet.python.org aggregator, which has made at least a few Pythonistas aware of it. If Zope were to appear there more often, perhaps it won't be forgotten that often anymore. ___ 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 3 invisibility
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6 Sep 2006, at 11:11, Philipp von Weitershausen wrote: Interesting. I've always considered blogs to be fairly invisible since I have to go look for them, whereas for mailing lists I can sign up for things I'm interested in. Exactly. This is a matter of taste, nothing else. Mailing list email comes to me. Blogs I have to seek out and go there. Sorry, too much effort for much hot air of dubious quality ;) Lol, and lists like this one here do NOT have hot air of dubious quality? I get the hot air on the lists without effort, that was my point. It *is* a matter of taste, sure. However, the effects of buzz through blogging cannot be denied. My blog for instance is in the planet.python.org aggregator, which has made at least a few Pythonistas aware of it. If Zope were to appear there more often, perhaps it won't be forgotten that often anymore. I'm not denying there is buzz through blogging, I'm just saying I see no reason for myself to jump on the blog bandwagon. I have a very dim view on blogs and a lot of bloggers. - warning: personal opinion jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE/pLwRAx5nvEhZLIRAmTbAJwNkQYJaWUph/iTC549DgD4w8CkJwCguE6r UD/ANrwD0Pv7HC5U2nYSjDw= =gWeg -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 )
[Zope] Re: Problems starting ZEO with zeoctl
On 9/3/06, Tres Seaver [EMAIL PROTECTED] wrote: The permission needed here is for the effective user to write to the ZEO control socket, which is normally in the 'etc' direcdtory of your instance home, and named 'zeo.zdsock'. Try changing 'zeo.conf' to put that file in your 'var' directory, where you *must* be able to create files (otherwise you wouldn't be able to use 'runzeo'). This fixed it. Thankyou, Ben ___ 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] Can't stop Zope, machine hanging
Thank you, Dieter, for your valuable insights and information. I am forwarding this to my ISP. --- Dieter Maurer [EMAIL PROTECTED] wrote: Ken Ara wrote at 2006-9-5 07:47 -0700: ... Of immediate concern to me is whether I can do anything to prevent this happening again. From time to time, my Zope hangs, usually because of an attack by a bad robot requesting lots of complex pages and sending no-cache headers. Then I am able to restart Zope and all is well. For a while, when these attacks were frequent, I had a crontab to zopectl restart every hour. There are solutions (I think daemontools, but may be wrong) that can automate this more intelligently than a cronjob. We have our own check server which polls Zope and if it does not respond in time restarts it. But this event was different and I would like to know if anyone thinks that something I am doing wrong could cause the Zope process to become 'unkillable' and require a reset of the machine. Has anyone else had this problem? Up to Python 2.3.4 and Python 2.4.0 (fixed in Python 2.3.5 and Python 2.4.1), a fatal signal (like SIGSEGV) could bring Zope in a state where its main thread was killed but the child threads were still alive. These child threads could only be killed with kill -9. Although we now use Python 2.4.1, I have seen a similar problem just a few days ago. But almost surely, this has to do with the Java Virtual Machine which we now also integrate in our Zope instances. However, when even kill -9 (as root) is no longer able to kill a process, then the process is somewhere deep in the operating system (where signal handling is deactivated for consistency reasons). Usually, this indicates a network problem. And if your operating system is no longer ready to shutdown, then you have an even more fundamental problem -- maybe, too, connected to network problems. I fear we cannot help you much -- as a intensive analysis of your system would be necessary in order to find the causes of your problems. I would have liked to perform some diagnostic on the machine in its stuck state, but neither I nor the ISP knew where to start. Usually, one would start with an analysis of the operating system log files. If they do not tell anything, then one would check what is still working (e.g. is the console still responding, does it still observe the magic CTRL-ALT-DEL reboot key sequence), which commands fail and in what way, ... -- Dieter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://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 )
Re: [Zope] Can't stop Zope, machine hanging
Andreas Jung wrote: This remark was just stupid. There is nothing with BSD except there are some known issues you need to consider when compiling Python (at least there were some issues in the past). Sorry, I disagree. Look back over the list archives, it seems common for people to have problems with Zope on BSD which aren't experienced by those using linux. BSD is in the minority, and so if you do have problems, there may well be no-one around who has enough experience to recommend a solution. As such, I'd say BSD is a bad choice for Zope. cheers, 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: request.locale - do we have this in 2.9.4?
Philipp von Weitershausen wrote: Practically, it will very rarely hinder you to add attributes (such as locale) to the request. I think locale and debug are just common enough to be form variables. Funny, I've never used either in 6 years of zoping ;-) You'd be surprised (I was too). Plus, TALES path expressions first try attribute access, then item access. ZPT sux ;-) Sure, but it's a BBB foul. It's not *me* who has the legacy code, so I wouldn't mind. But I'm sure others would. I thought adapters were for this exact kind of thing? Existing Zoep 2 code would use a Zope 2 request, the Zope 3 components should be presented with a Zope 2 request that has been adapted to present IBrowserRequest rather than just being marked as implementing it, no? Perhaps. A configuration option (that would usually be turned to 'off') What do you mean by off here? The config option should make the stfuf that ships (like the widgets!) work by default... cheers, Chrus -- 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: Hmm... Localizer or Localizer
Peter Bengtsson wrote: You simply didn't read Five/doc/i18n.txt (http://codespeak.net/z3/five/i18n.html). Googling five i18n gives you that as a first hit. RTFM is all I can say here. Don't RTFM me! I've read that page and unless you have a PhD in physics and indept experience of Zope 3 is really doesn't make a lot of sense. Plus, I've got your cookbook at home :) Urm, no, sorry, don't buy that. The docs are pretty good... So, should I use PTS or not?? You do whatever you want, just don't come crying to us when you're screaming in pain with PTS ;-) (of course, it may just work for you, in which case you're lucky) The default behaviour for choosing languages in Five is the one of Zope 3: analyze the Accept-Language HTTP header and nothing more. This is not good enough. Knocking up a negotiator that does what you want is pretty easy. I already offered to send you code that does what you want... When I send out email alerts to people in my app, that's a wget script that kicks if off, not a Mozilla browser. What has this got to do with anything? (although, fwiw, url whacking is dumb, don't do that, look at Stepper and tricker it with cron) I have no idea what this does or what I'm supposed to do with: adapter for=zope.publisher.interfaces.http.IHTTPRequest provides=zope.i18n.interfaces.IUserPreferredLanguages factory=Products.Five.i18n.PTSLanguages / Then it's time for you to read more FM. This is all explained, from what I remember. Please tell me there's a function or something that works like this:: def index_html(self): uid = self._getLoggedinUID() wants_lang = self._getUserPreference(uid, default='en') setCurrentLanguage(wants_lang) return _(I wish it was easier) def manage_setUserPreference(self, uid, lang): if lang in getAvailableLanguages(): self._setUserPreference(uid, lang) Where _getUserPreference() and _setUserPreference() is something I'm expected to write for my app. No, it's not quite like this, but it is just as easy. cheers, 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: request.locale - do we have this in 2.9.4?
Chris Withers wrote: Philipp von Weitershausen wrote: Practically, it will very rarely hinder you to add attributes (such as locale) to the request. I think locale and debug are just common enough to be form variables. Funny, I've never used either in 6 years of zoping ;-) Me neither, but are we prepared to break the apps of the people who do? (Btw, just thought of another one possible name clash: 'response') You'd be surprised (I was too). Plus, TALES path expressions first try attribute access, then item access. ZPT sux ;-) TALES path expression sux (for various reasons). Sure, but it's a BBB foul. It's not *me* who has the legacy code, so I wouldn't mind. But I'm sure others would. I thought adapters were for this exact kind of thing? Existing Zoep 2 code would use a Zope 2 request, the Zope 3 components should be presented with a Zope 2 request that has been adapted to present IBrowserRequest rather than just being marked as implementing it, no? This would have been a possible solution at the time, but it wasn't chosen. Neither the people who introduced IBrowserRequest to Zope 2 nor I who pretty much took on Five maintenance afterwards realized this problem back then. I've thought about introducing the adaption approach now. I think we'd be opening a can of worms since the request objects are likely to be passed from old style code to new style code and vice versa. Perhaps. A configuration option (that would usually be turned to 'off') What do you mean by off here? The config option should make the stfuf that ships (like the widgets!) work by default... I'll repeat this again: Just because Zope 3 libraries ship with Zope 2 doesn't mean that everything from the 'zope' namespace has to work. Five has never made that promise. That said, *if* we choose to go with such a configuration option, I think it woudl probably be a good idea to have it disabled by default in the first release and enabled in subsequent releases. That way applications could opt in for the new behaviour earlier than necessary (much like Python's __future__ imports). Philipp ___ 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] Zope hands when database takes too long to respond
Hello, We wrote an application (on Zope v2.7.6-final) that queries a MySQL database via ZMySQLDA v2.0.8. Whenever the MySQL server experiences heavy load, Zope seems to hang, such that we can't even access the ZMI. Is this a bug in version 2.7.6 or ZMySQLDA ? Or are there some settings I can tweak to adjust some database connection timeout value ? Regards, Danny ___ 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] Zope hangs when database takes too long to respond
Sorry for the typo error. The subject should read "hangs", not "hands" . From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sinang, DannySent: Wednesday, September 06, 2006 10:56 PMTo: zope@zope.orgSubject: [Zope] Zope hands when database takes too long to respond Hello, We wrote an application (on Zope v2.7.6-final) that queries a MySQL database via ZMySQLDA v2.0.8. Whenever the MySQL server experiences heavy load, Zope seems to hang, such that we can't even access the ZMI. Is this a bug in version 2.7.6 or ZMySQLDA ? Or are there some settings I can tweak to adjust some database connection timeout value ? Regards, Danny ___ 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: Re: request.locale - do we have this in 2.9.4?
On Wed, 2006-06-09 at 13:52 +0200, Philipp von Weitershausen wrote: That said, *if* we choose to go with such a configuration option, I think it woudl probably be a good idea to have it disabled by default in the first release and enabled in subsequent releases. That way applications could opt in for the new behaviour earlier than necessary (much like Python's __future__ imports). My 2 cents here. I've also spent a great deal of time pondering this particular problem. And there has been some good discussion in this thread. Personally what I'm leaning towards liking the most would be an approach that blends the configuration and adapter ideas discussed here. Five version X would introduce an IBrowserRequest adapter for a zope 2 request and a new zcml directive, say five:zope3request, that would toggle whether or not Five should pass through the adapted request instead of the raw request. By default it would not adapt (for BBB compat). We could consider issuing a deprecation message saying the default will be changed with future Five release. And with Five version X+1 or X+2 we change the default to adapt. I'd propose version X would be 1.5 and the release that sets the default to zope3 requests be version 1.6. We could always keep around the five:zope3request directive even after we change the default so that people who really need old-style behaviour (raw zopee 2 requests) can still re-activate it. - Rocky -- Rocky Burt ServerZen Software -- http://www.serverzen.com News About The Server (blog) -- http://www.serverzen.net signature.asc Description: This is a digitally signed message part ___ 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] Zope 2.9.3/2.9.1 On Suse 10.1 box version
I recompiled python from source and later did the right steps with the right promissions and now everything is working for me as well. Thanks ofer Howdy-- I just ran into this same problem. After much poking around, it turned out that the source of the problem was that the zlib module for Python had not been compiled because I didn't have the zlib development stuff (in zlib-devel on RH and similar, not sure about Suse) installed. Installing zlib-devel, then recompiling Python from source solved the problem. Best, Jeremy. [EMAIL PROTECTED] wrote: Date: Wed, 5 Jul 2006 20:51:28 +0200 From: [EMAIL PROTECTED] Subject: Re: [Zope] Zope 2.9.3/2.9.1 On Suse 10.1 box version To: [EMAIL PROTECTED] Cc: zope@zope.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii Ofer Weisglass wrote at 2006-7-5 01:38 +0300: ... I updated the python to the last version and this is what I get after the zope installation was over with no errors (already created instance, username and password) Traceback (most recent call last): ... setImplementation(C) File /usr/software/zope/lib/python/AccessControl/Implementation.py, line 51, in setImplementation from AccessControl import ImplC as impl File /usr/software/zope/lib/python/AccessControl/ImplC.py, line 30, in ? from ImplPython import RestrictedDTML, SecurityManager, ZopeSecurityPolicy ImportError: No module named ImplPython This looks like a missing installation step (generation of the C-extensions did not happen). Recheck the installation instructions and try again. -- 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 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] Zope hangs when database takes too long to respond
Whenever the MySQL server experiences heavy load, Zope seems to hang, such that we can't even access the ZMI. Is this a bug in version 2.7.6 or ZMySQLDA ? Seems that all your Zope threads are busy (they're waiting for database response). There is no more threads to serve next requests so they're waiting (you may say that zope hangs in this situation, but in fact all it's threads are waiting for DB). You may install DeadlockDebugger product and you'll be able to see what your's Zope threads are really doing. Or are there some settings I can tweak to adjust some database connection timeout value ? AFAIK not in Zope. Take a look at ZMySQLDA or rather the python MySQL library it uses. Maybe there is something like that. You may ask this question on Zope-DB list. -- Maciej Wisniowski ___ 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: Zope hangs when database takes too long to respond
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sinang, Danny wrote: Sorry for the typo error. The subject should read hangs, not hands . From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sinang, Danny Sent: Wednesday, September 06, 2006 10:56 PM To: zope@zope.org Subject: [Zope] Zope hands when database takes too long to respond Hello, We wrote an application (on Zope v2.7.6-final) that queries a MySQL database via ZMySQLDA v2.0.8. Whenever the MySQL server experiences heavy load, Zope seems to hang, such that we can't even access the ZMI. Is this a bug in version 2.7.6 or ZMySQLDA ? It is a known limitation of Zope, which has a set number of worker threads available to service user requests. If a worker thread blocks (e.g., waiting for MySQL), it is not able to do any work for other pending requests. You can tweak the number of threads in your zope.conf file, via the 'zserver-threads' directive (the default value is 4). If you do increase this value, you also need to increase the number of database connections avialble (via 'pool-size') which will increase the RAM required by your appserver. Or are there some settings I can tweak to adjust some database connection timeout value ? Not that I know of. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE/zql+gerLs4ltQ4RAioIAJ98L+XTswgN8cRE24qAf7/kGckA+ACg1ZKp nms3D4/jbMw/KjPVTp+AC5k= =hmb+ -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] Re: Zope hangs when database takes too long to respond
- Original Message - From: Tres Seaver [EMAIL PROTECTED] To: zope@zope.org Sent: Wednesday, September 06, 2006 5:16 PM Subject: [Zope] Re: Zope hangs when database takes too long to respond -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sinang, Danny wrote: Sorry for the typo error. The subject should read hangs, not hands . From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sinang, Danny Sent: Wednesday, September 06, 2006 10:56 PM To: zope@zope.org Subject: [Zope] Zope hands when database takes too long to respond Hello, We wrote an application (on Zope v2.7.6-final) that queries a MySQL database via ZMySQLDA v2.0.8. Whenever the MySQL server experiences heavy load, Zope seems to hang, such that we can't even access the ZMI. Is this a bug in version 2.7.6 or ZMySQLDA ? It is a known limitation of Zope, which has a set number of worker threads available to service user requests. If a worker thread blocks (e.g., waiting for MySQL), it is not able to do any work for other pending requests. You can tweak the number of threads in your zope.conf file, via the 'zserver-threads' directive (the default value is 4). If you do increase this value, you also need to increase the number of database connections avialble (via 'pool-size') which will increase the RAM required by your appserver. Or are there some settings I can tweak to adjust some database connection timeout value ? Not that I know of. Another possible solution is to have a look at twisted: http://twistedmatrix.com/projects/core/documentation/howto/faq.html Jonathan ___ 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 hangs when database takes too long to respond
On Sep 6, 2006, at 5:30 PM, Jonathan wrote: Another possible solution is to have a look at twisted: http://twistedmatrix.com/projects/core/documentation/howto/faq.html Unless he wants to rewrite his application, Twisted likely won't help, right? The OP may also want to see why his MySQL queries are taking so long by using the MySQL query log and its optimizer. One potential solution to the immediate cant access the ZMI when I have all threads tied up in long-running code problem is Zope zodb connection policies, which is an idea that I proposed several years ago but never got around to implementing fully. Essentially, you'd be able reserve a ZODB connection for management requests. - C ___ 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 hangs when database takes too long to respond
- Original Message - From: Chris McDonough [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: zope@zope.org Sent: Wednesday, September 06, 2006 5:40 PM Subject: Re: [Zope] Re: Zope hangs when database takes too long to respond On Sep 6, 2006, at 5:30 PM, Jonathan wrote: Another possible solution is to have a look at twisted: http://twistedmatrix.com/projects/core/documentation/howto/faq.html Unless he wants to rewrite his application, Twisted likely won't help, right? Twisted is, as i said Another possible solution - yes it will require work to integrate, but it is still a potential solution. I don't like to tell people what to do, i just try to provide alternatives. Jonathan ___ 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 hangs when database takes too long to respond
On Sep 6, 2006, at 5:47 PM, Jonathan wrote: Unless he wants to rewrite his application, Twisted likely won't help, right? Twisted is, as i said Another possible solution - yes it will require work to integrate, but it is still a potential solution. I don't like to tell people what to do, i just try to provide alternatives. Well, by those standards, I propose he look at Delphi too... ;-) - C ___ 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 hangs when database takes too long to respond
- Original Message - From: Chris McDonough [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: zope@zope.org Sent: Wednesday, September 06, 2006 5:50 PM Subject: Re: [Zope] Re: Zope hangs when database takes too long to respond On Sep 6, 2006, at 5:47 PM, Jonathan wrote: Unless he wants to rewrite his application, Twisted likely won't help, right? Twisted is, as i said Another possible solution - yes it will require work to integrate, but it is still a potential solution. I don't like to tell people what to do, i just try to provide alternatives. Well, by those standards, I propose he look at Delphi too... ;-) Do you mean he should consult the Oracle? ;-) Jonathan P.S. I really was trying to be helpful ___ 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 hangs when database takes too long to respond
On Sep 6, 2006, at 5:54 PM, Jonathan wrote: Well, by those standards, I propose he look at Delphi too... ;-) Do you mean he should consult the Oracle? ;-) Sure, why not, while he's at it? ;-) We can probably even haul in Interbase. P.S. I really was trying to be helpful Sure, I just wanted to provide a counterpoint so he didn't go off and waste time researching Twisted with the belief that there was some way he could use twisted without essentially abandoning his current codebase; not that he shouldn't use Twisted or whatever, it's just that the problem can likely be solved within Zope without abandoning what he has already. - C ___ 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 hangs when database takes too long to respond
- Original Message - From: Chris McDonough [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Cc: zope@zope.org Sent: Wednesday, September 06, 2006 6:01 PM Subject: Re: [Zope] Re: Zope hangs when database takes too long to respond On Sep 6, 2006, at 5:54 PM, Jonathan wrote: Well, by those standards, I propose he look at Delphi too... ;-) Do you mean he should consult the Oracle? ;-) Sure, why not, while he's at it? ;-) We can probably even haul in Interbase. Actually, I was going for the Oracle at Delphi reference (oracle knows all, sees all, tells all - for a price), but the reference was possibly a bit obtuse... ___ 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] Need Help--urgently
I am sure it should be trivial, but being newbee makes me shameless :) What I am in need of is guideline about how to integrate python script and external python method. I have a form through which I collect user input and forward it to a python script, which concatenates input in certain pattern and feeds it to external method. Now external method runs fine and puts the results in a list called mlist. What I want to know is how do I fetch the "return mlist" resulting from external method back to the python script which gave the input to it for processing. The python script is named which searchuparam which gets user input from form and does something like this:uparam = str(0) + "," + str(0) + "," + str(1) + "," + str(0) + "," + str(0) + "," + str(DO) \ + "," + str(NL) + "," + str(0) + "," + str(0) + "," + str(0) + "," + str(0) \ + "," + str(TIME) + "," + str(WM) + "," + str(NOP) + "," + str(EXP) + "," + str(GKH)context.code(uparam)code is the id of external method which processes uparam and at the end has statement return mlist this mlist is what I am interested in getting back. I want external method to return me this list to my python script searchuparam. I tried reading and did google last week but without success. Any help is appreciated. TIA.yours md ___ 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] Need Help--urgently
On 6 Sep 2006 22:27:14 -, cpdm cadlab [EMAIL PROTECTED] wrote: context.code(uparam) code is the id of external method which processes uparam and at the end has statement return mlist this mlist is what I am interested in getting back. I want external method to return me this list to my python script searchuparam. The external method already returs the list to your python script. Just store the result in a variable: returnedlist = contex.code(uparam) -- Martijn Pieters ___ 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] Need Help--urgently
In your python script: mlist = context.code(uparam) do something with mlist here In your external method: def code(self, uparam): mlist = [] process inputparameter, build mlist) return mlist Simple! hth Jonathan - Original Message - From: cpdm cadlab To: zope@zope.org Sent: Wednesday, September 06, 2006 6:27 PM Subject: [Zope] Need Help--urgently I am sure it should be trivial, but being newbee makes me shameless :) What I am in need of is guideline about how to integrate python script and external python method. I have a form through which I collect user input and forward it to a python script, which concatenates input in certain pattern and feeds it to external method. Now external method runs fine and puts the results in a list called mlist. What I want to know is how do I fetch the "return mlist" resulting from external method back to the python script which gave the input to it for processing. The python script is named which searchuparam which gets user input from form and does something like this:uparam = str(0) + "," + str(0) + "," + str(1) + "," + str(0) + "," + str(0) + "," + str(DO) \ + "," + str(NL) + "," + str(0) + "," + str(0) + "," + str(0) + "," + str(0) \ + "," + str(TIME) + "," + str(WM) + "," + str(NOP) + "," + str(EXP) + "," + str(GKH)context.code(uparam)code is the id of external method which processes uparam and at the end has statement return mlist this mlist is what I am interested in getting back. I want external method to return me this list to my python script searchuparam. I tried reading and did google last week but without success. Any help is appreciated. TIA.yours md ___Zope maillist - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announcehttp://mail.zope.org/mailman/listinfo/zope-dev ) ___ 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: Zope hangs when database takes too long to respond
It is a known limitation of Zope, which has a set number of worker threads available to service user requests. If a worker thread blocks (e.g., waiting for MySQL), it is not able to do any work for other pending requests. You can tweak the number of threads in your zope.conf file, via the 'zserver-threads' directive (the default value is 4). If you do increase this value, you also need to increase the number of database connections avialble (via 'pool-size') which will increase the RAM required by your appserver. Thanks Tres. I found 'zserver-threads' in zope.conf, but couldn't find 'pool-size'. Am using Zope 2.7.6. Is this something available on higher versions of Zope ? Regards, Danny ___ 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] Need Help--urgently
cpdm cadlab wrote: thanks for the quick reply. I am glad to be here on active ZOPE mailing list. Let's keep it on the list then; no personal email please. I had initially done the way you have suggested, but it doesn't work in the sense I get a empty list as output, which I know isn't empty. Then something is wrong with the external method. Use a debugger (pdb, Wing, Komodo, etc.) or spurious logging (import logger; logger.getLogger('yourmodule').log) to trace your code. This made me think that I was making silly mistake. If I run external method in python shell it shows the mlist, which is non-empty, but if I ask the same to python script to do what it prints is this : [] What do you think is wrong. A further code goes like this: mlist = context.code(uparam) if len(mlist) == str(0): print Sorry no suitable method found in database return printed else: print mlist return printed Use if not len(mlist):; comparing the length to str(0) is always false. len returns an integer, not a string, so 0 == '0' will never be True. You can also call the external method directly if you encode the arguments passed to it in the query string. Just open up a python propmt, import urllib and call urllib.quote on your argument list to hand-construct a URL. Moreover, get decent books on Python and on Web programming in general. Martijn Pieters ___ 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] Need Help--urgently
Martijn Pieters wrote: cpdm cadlab wrote: thanks for the quick reply. I am glad to be here on active ZOPE mailing list. Let's keep it on the list then; no personal email please. I had initially done the way you have suggested, but it doesn't work in the sense I get a empty list as output, which I know isn't empty. Then something is wrong with the external method. Use a debugger (pdb, Wing, Komodo, etc.) or spurious logging (import logger; logger.getLogger('yourmodule').log) to trace your code. This made me think that I was making silly mistake. If I run external method in python shell it shows the mlist, which is non-empty, but if I ask the same to python script to do what it prints is this : [] What do you think is wrong. A further code goes like this: mlist = context.code(uparam) if len(mlist) == str(0): print "Sorry no suitable method found in database" return printed else: print mlist return printed Use "if not len(mlist):"; comparing the length to str(0) is always false. "len" returns an integer, not a string, so 0 == '0' will never be True. You can also call the external method directly if you encode the arguments passed to it in the query string. Just open up a python propmt, import urllib and call urllib.quote on your argument list to hand-construct a URL. Moreover, get decent books on Python and on Web programming in general. Martijn Pieters Martijn, I wonder which books would recommend? Best I can say is that books just about HTTP are probably the least appreciated and often the most useful. David ___ 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: Re: [Zope] Need Help--urgently
On Thu, 07 Sep 2006 David H wrote : Martijn Pieters wrote: cpdm cadlab wrote: thanks for the quick reply. I am glad to be here on active ZOPE mailing list. Let's keep it on the list then; no personal email please. I had initially done the way you have suggested, but it doesn't work in the sense I get a empty list as output, which I know isn't empty. Then something is wrong with the external method. Use a debugger (pdb, Wing, Komodo, etc.) or spurious logging (import logger; logger.getLogger('yourmodule').log) to trace your code. This made me think that I was making silly mistake. If I run external method in python shell it shows the mlist, which is non-empty, but if I ask the same to python script to do what it prints is this : [] What do you think is wrong. A further code goes like this: mlist = context.code(uparam) if len(mlist) == str(0): print Sorry no suitable method found in database return printed else: print mlist return printed Use if not len(mlist):; comparing the length to str(0) is always false. len returns an integer, not a string, so 0 == '0' will never be True. You can also call the external method directly if you encode the arguments passed to it in the query string. Just open up a python propmt, import urllib and call urllib.quote on your argument list to hand-construct a URL. Moreover, get decent books on Python and on Web programming in general. Martijn Pieters Martijn, I wonder which books would recommend? Best I can say is that books just about HTTP are probably the least appreciated and often the most useful. David Well sure it takes time to acquire etiquette for newcomer. I am stuck but hopefully will solve it out. thanks a lot to both of you. m.d. ___ 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] Zope hangs when database takes too long to respond
Seems that all your Zope threads are busy (they're waiting for database response). There is no more threads to serve next requests so they're waiting (you may say that zope hangs in this situation, but in fact all it's threads are waiting for DB). You may install DeadlockDebugger product and you'll be able to see what your's Zope threads are really doing. Thanks. Besides DeadlockDebugger, is there a way to see just how many threads Zope is currently using ? Regards, Danny ___ 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] custom_zodb.py
In the Zope Book v2.6, it says : "Each database connection maintains its own cache (see above, "Database Cache"), so bumping the number of connections up increases memory requirements. Only change this setting if you're sure you have the memory to spare. To change this setting, create a file called "custom_zodb.py" in your Zope installation directory. In this file, put the following code:" Am not sure which directory "Zope installation directory" pertains to. Is this the fresh directory from the Zope.tar.gz file ? Or is this thealready-installed directory ? Or would it be the instance directory ? If so,which subdirectorydo I place custom_zodb.py ? Regards,Danny ___ 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] custom_zodb.py
Unless you are using Zope 2.6, don't do that. For Zope 2.7 or later, see the 2.7 version of the book at plope.com. Some chapters were never updated from the 2.6 version but even so it's much improved. For zope 2.7 or later, what you want to do is now done by editing zope.conf. On Thu, Sep 07, 2006 at 08:44:08AM +0800, Sinang, Danny wrote: In the Zope Book v2.6, it says : Each database connection maintains its own cache (see above, Database Cache), so bumping the number of connections up increases memory requirements. Only change this setting if you're sure you have the memory to spare. To change this setting, create a file called custom_zodb.py in your Zope installation directory. In this file, put the following code: Am not sure which directory Zope installation directory pertains to. Is this the fresh directory from the Zope .tar.gz file ? Or is this the already-installed directory ? Or would it be the instance directory ? If so, which subdirectory do I place custom_zodb.py ? Regards, Danny ___ 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 ) -- Paul Winkler http://www.slinkp.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 )
RE: [Zope] custom_zodb.py
Per http://www.plope.com/Books/2_7Edition/MaintainingZope.stx#2-27 , it still says write your own custom_zodb.py . Can you point me to the exact location ? Regards, Danny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Thursday, September 07, 2006 9:16 AM To: zope@zope.org Subject: Re: [Zope] custom_zodb.py Unless you are using Zope 2.6, don't do that. For Zope 2.7 or later, see the 2.7 version of the book at plope.com. Some chapters were never updated from the 2.6 version but even so it's much improved. For zope 2.7 or later, what you want to do is now done by editing zope.conf. On Thu, Sep 07, 2006 at 08:44:08AM +0800, Sinang, Danny wrote: In the Zope Book v2.6, it says : Each database connection maintains its own cache (see above, Database Cache), so bumping the number of connections up increases memory requirements. Only change this setting if you're sure you have the memory to spare. To change this setting, create a file called custom_zodb.py in your Zope installation directory. In this file, put the following code: Am not sure which directory Zope installation directory pertains to. Is this the fresh directory from the Zope .tar.gz file ? Or is this the already-installed directory ? Or would it be the instance directory ? If so, which subdirectory do I place custom_zodb.py ? Regards, Danny ___ 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 ) -- Paul Winkler http://www.slinkp.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 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] custom_zodb.py
On Thu, Sep 07, 2006 at 09:24:34AM +0800, Sinang, Danny wrote: Per http://www.plope.com/Books/2_7Edition/MaintainingZope.stx#2-27 , it still says write your own custom_zodb.py . Can you point me to the exact location ? Argh, I believe this means the book is still out of date on that point. I've never needed to tweak the number of connections, but AFAICT googling for pool-size and either zodb or zope.conf may be helpful. -PW -- Paul Winkler http://www.slinkp.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 )
Re: [Zope] Re: zope 3 invisibility
Thanks for your responses. I can say from experience that even a barely known blog by an unheralded developer can attract some attention now and then and that blogs by leading developers of a given project, like Philipp's own blog, can be a very good source of news about an interesting project. While I agree that to blog or not to blog is a matter of taste, I don't think that it is that difficult to use blogs. You just need to find the feed for an interesting blog once, which is easier than a lot of lists (even Zope's, if I recall correctly), that require you to sign on from a web page and validate email at the time you subscribe. Also, subscribing to blogs of people you respect reduce the noise a little bit, and managing a dozen blogs seems to me a lot easier than a dozen mailing lists, but your mileage may vary. The main thing going for blogs regarding buzz is that if your post is linked to by a couple of bloggers, it may end up being read by an audience you never expected, and the effect can sometimes multiply. That just doesn't happen with mailing lists. Anyway, I'm just saying that perhaps this quality of the Zope community makes it a little harder to get to know Zope 3 these days (many bloggers have seen to it that Zope 2 is better known, though sadly in a negative way for Zope). Of course, that doesn't mean the community is doing anything wrong. Like Martin Aspeli said in a blog post, maybe we're just not that kind of people ( http://optilude.blogspot.com/2006/09/maybe-were-just-not-that-kind-of-people.html).Carlos de la Guardia ___ 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-DB] Some help about introductory Zope concepts.
--On 6. September 2006 08:42:40 +0200 Jose Carlos Balderas Alberico [EMAIL PROTECTED] wrote: Hi, I have a few beginner's questions regarding Zope. I need your help to help me clarify some concepts that remain unclear for me still. Sorry, but this list is for Zope database issues only. Use the standard zope@zope.org list instead. -aj pgpyVLs0QulWc.pgp Description: PGP signature ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db