[Zope-Coders] Zope tests: 7 OK
Summary of messages to the zope-tests list. Period Sun Nov 6 12:01:01 2005 UTC to Mon Nov 7 12:01:01 2005 UTC. There were 7 messages: 7 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Sun Nov 6 21:57:43 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003499.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Nov 6 21:59:14 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003500.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Nov 6 22:00:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003501.html Subject: OK : Zope-2_7-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Sun Nov 6 22:02:14 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003502.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Nov 6 22:03:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003503.html Subject: OK : Zope-2_8-branch Python-2.4.2 : Linux From: Zope Unit Tests Date: Sun Nov 6 22:05:14 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003504.html Subject: OK : Zope-trunk Python-2.4.2 : Linux From: Zope Unit Tests Date: Sun Nov 6 22:06:44 EST 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-November/003505.html ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-Coders] Re: svn.zope.org in an odd state
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Fred Drake wrote: On 11/7/05, Tres Seaver [EMAIL PROTECTED] wrote: svn: Berkeley DB error while opening 'strings' table for filesystem /svn/repos/main/db: Cannot allocate memory Yeah, this has been hosed for at least a good part of the day. The load on the machine is really low, and there's plenty of swap available. Another generous gift of Berkeley DB. :-( Does the machine need to be tweaked somehow? I can't make even the smallest checkin at this point. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDcB1B+gerLs4ltQ4RAngqAKC2VzOAyqEjJIWqSiF3jqIh8KrdLACbBts0 hRROyFQwBt1fOVfK0PlaMPk= =ur0X -END PGP SIGNATURE- ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope-dev] moment when zope was started.
Victor Safronovich wrote: But in Zope 2.8 the variable 'Zope2.Startup.started' not changed its value to True, because Zope2.Startup.start_zope was never called, instead of that called Zope2.Startup.run.run function. This sounds like a bug, but why do you want to know this? Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] Memory Leak Question
Consider it reported then. (Sorry for the delay, I was out of the office for most of last week). It looks like the problem is in Wrapper_findattr. Any thoughts? ___ Daniel Pozmanter Siteworx, Inc. Festina Lente - Gaius Julius -Original Message- From: Chris McDonough [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 10:33 PM To: Dan Pozmanter Cc: zope-dev@zope.org Subject: Re: [Zope-dev] Memory Leak Question Nobody has yet reported a memory leak symptom against any particular piece of Zope 2.8.X yet, AFAIK. On Oct 31, 2005, at 6:34 PM, Dan Pozmanter wrote: Ahoy, I was poking around in _Acquisition.c, and noticed my memory usage spiked. Returning to the vanilla code (2.8.2-final), I noticed the same spike (just less pronounced). (If you refresh the page a few gazillion times this pops up). I would not categorize this as an actual bug report (I'd like to test more rigorously with a script to verify a leak), but after reading the note on Changes for 2.8.x in the to do section, I was curious: Is this a known issue? If so, has there been any headway, and can I be of any assistance in resolving it? ___ Daniel Pozmanter Siteworx, Inc. Festina Lente - Gaius Julius ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Memory Leak Question
Could you provide details about why you think there's a leak in the code (what led you to Wrapper_findattr), and how to reproduce it consistently on a blank platform (Zope 2.8.4 preferred)? Maybe open a bug in the collector at http://www.zope.org/Collectors/Zope/ also. Thanks, Florent Dan Pozmanter wrote: Consider it reported then. (Sorry for the delay, I was out of the office for most of last week). It looks like the problem is in Wrapper_findattr. Any thoughts? ___ Daniel Pozmanter Siteworx, Inc. Festina Lente - Gaius Julius -Original Message- From: Chris McDonough [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 10:33 PM To: Dan Pozmanter Cc: zope-dev@zope.org Subject: Re: [Zope-dev] Memory Leak Question Nobody has yet reported a memory leak symptom against any particular piece of Zope 2.8.X yet, AFAIK. On Oct 31, 2005, at 6:34 PM, Dan Pozmanter wrote: Ahoy, I was poking around in _Acquisition.c, and noticed my memory usage spiked. Returning to the vanilla code (2.8.2-final), I noticed the same spike (just less pronounced). (If you refresh the page a few gazillion times this pops up). I would not categorize this as an actual bug report (I'd like to test more rigorously with a script to verify a leak), but after reading the note on Changes for 2.8.x in the to do section, I was curious: Is this a known issue? If so, has there been any headway, and can I be of any assistance in resolving it? -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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: Memory Leak Question
Sure thing: I was mucking around in _Acquisition.c with getattr, findattr, etc, and I noticed checked to see if my code was leaky. It was! I then checked just vanilla code, and found the same leak (only much much smaller). So here is what I did to make things more visible: In Wrapper_getattro, I simply added a while loop, and another call to Wrapper_findattr before the return statement return Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 1, 0, 0);. Loop it 1000 times for some fireworks, 5 times for a more modest display. Looping other calls (such as Wrapper_acquire before return Wrapper_acquire(self, oname, filter, extra, orig, explicit, containment); in Wrapper_findattr) does not produce a similar leak. So. To reproduce: Edit _Acquisition.c Function Wrapper_getattro add int i = 0; at the top. then, if self-obj ... and all that, add: while (i xyz) { Wrapper_findattr(self, oname, NULL, NULL, NULL, 1, 1, 0, 0); i++; } where xyz is an integer of your choice. Simply go to the index_html the root or any other object, fire up task manager (I produced this bug on windows), then refresh that page rigorously. Note that this bug can be reproduced without modifying any code. The loop simply amplifies the leak, making it easier to spot. (Or the loop causes huge additional problems I am not aware of. In any case, doing *something* clever to call Wrapper_findattr more than once should make the problem easier to spot.) ___ Daniel Pozmanter Siteworx, Inc. Festina Lente - Gaius Julius -Original Message- From: Florent Guillaume [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 3:30 PM To: Dan Pozmanter Cc: zope-dev@zope.org Subject: Re: Memory Leak Question Could you provide details about why you think there's a leak in the code (what led you to Wrapper_findattr), and how to reproduce it consistently on a blank platform (Zope 2.8.4 preferred)? Maybe open a bug in the collector at http://www.zope.org/Collectors/Zope/ also. Thanks, Florent Dan Pozmanter wrote: Consider it reported then. (Sorry for the delay, I was out of the office for most of last week). It looks like the problem is in Wrapper_findattr. Any thoughts? ___ Daniel Pozmanter Siteworx, Inc. Festina Lente - Gaius Julius -Original Message- From: Chris McDonough [mailto:[EMAIL PROTECTED] Sent: Monday, October 31, 2005 10:33 PM To: Dan Pozmanter Cc: zope-dev@zope.org Subject: Re: [Zope-dev] Memory Leak Question Nobody has yet reported a memory leak symptom against any particular piece of Zope 2.8.X yet, AFAIK. On Oct 31, 2005, at 6:34 PM, Dan Pozmanter wrote: Ahoy, I was poking around in _Acquisition.c, and noticed my memory usage spiked. Returning to the vanilla code (2.8.2-final), I noticed the same spike (just less pronounced). (If you refresh the page a few gazillion times this pops up). I would not categorize this as an actual bug report (I'd like to test more rigorously with a script to verify a leak), but after reading the note on Changes for 2.8.x in the to do section, I was curious: Is this a known issue? If so, has there been any headway, and can I be of any assistance in resolving it? -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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] Constructing a ZOPE request in a python script
Dave Coe wrote: I am hoping that someone can help me with how to construct a POST request in a python script. I tried searching the older messages, but post and get are such common terms, that I didn't have much luck. This all feels amazingly clunky, but then you are using dtml, so that's to be expected. And you should probably be posting to zope@zope.org, since zope-dev is for development OF, not WITH Zope. I have a DTML Document with a form. Right now, it calls a DTML method that stores data in the database. What I am trying to do is insert a python script in between the two to do some data processing. So have the form submit to the python script and have the python script call the ZSQL method: # whatever munging you want x = y + 1 + context.REQUEST.get('something') context.myZSQLMethod(someparam=x) return 'thanks, done!' cheers, Chris PS: incorrect). In any event, I would like to construct a POST request in the python script instead and then call RESPONSE.redirect(). Can this be done? No, you can't redirect a POST using a 302 response, especially if you want to process along that way. That's http ;-) -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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[2]: [Zope-dev] moment when zope was started.
Hello Chris Withers, Monday, November 7, 2005, 8:15:58 PM, you wrote: CW Victor Safronovich wrote: But in Zope 2.8 the variable 'Zope2.Startup.started' not changed its value to True, because Zope2.Startup.start_zope was never called, instead of that called Zope2.Startup.run.run function. CW This sounds like a bug, but why do you want to know this? My Product wants to replace zpublisher_validate_hook in Zope2.__init__. Formerly I use the code class ZPValidateHookReplacer(Thread): def run(self): while not Zope.Startup.started: # in 2.8 'Zope' module must be replaced to Zope2 time.sleep(0.5) Zope.zpublisher_validate_hook = my_validate_hook ZPValidateHookReplacer().start() in Zope 2.8 this code was broken because Zope.Startup.started always False. I changed to new repeat condition while Zope.zpublisher_validate_hook is None: time.sleep(0.5) But what if others use Zope.Startup.started variable? -- Best regards, Victor Safronovich NauMen.NauDoc.SoftwareDeveloper http://www.naumen.ru ___ 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] moment when zope was started.
VSHow could i find the moment when zope was started in Zope 2.8? VSin Zope 2.7 was the variable 'Zope.Startup.started', which setted to True when VSzope was started. VSBut in Zope 2.8 the variable 'Zope2.Startup.started' not changed its value to VSTrue, because Zope2.Startup.start_zope was never called, instead of that called VSZope2.Startup.run.run function. this may be fixed like in attachment. -- Best regards, Victor Safronovich NauMen.NauDoc.SoftwareDeveloper http://www.naumen.ruIndex: __init__.py === --- __init__.py (revision 39858) +++ __init__.py (working copy) @@ -28,13 +28,17 @@ logger = logging.getLogger(Zope) started = False +starter = None def get_starter(): -check_python_version() -if sys.platform[:3].lower() == win: -return WindowsZopeStarter() -else: -return UnixZopeStarter() +global starter +if starter is None: +check_python_version() +if sys.platform[:3].lower() == win: +starter = WindowsZopeStarter() +else: +starter = UnixZopeStarter() +return starter def start_zope(cfg, debug_handler): The function called by run.py which starts a Zope appserver. @@ -47,11 +51,11 @@ starter.setConfiguration(cfg) starter.prepare() -started = True +starter.start() try: starter.run() finally: -started = False +starter.finish() class ZopeStarter: @@ -59,6 +63,8 @@ Making it a class makes it easier to test. +started = False + def __init__(self): self.event_logger = logging.getLogger() # We log events to the root logger, which is backed by a @@ -81,6 +87,14 @@ def setConfiguration(self, cfg): self.cfg = cfg +def start(self): +global started +self.started = started = True + +def finish(self) +global started +self.started = started = False + def prepare(self): self.setupInitialLogging() self.setupLocale() Index: run.py === --- run.py (revision 39858) +++ run.py (working copy) @@ -15,11 +15,7 @@ def run(): Start a Zope instance import Zope2.Startup -starter = Zope2.Startup.get_starter() -opts = _setconfig() -starter.setConfiguration(opts.configroot) -starter.prepare() -starter.run() +Zope2.Startup.start_zope(_setconfig().configroot, None) def configure(configfile): Provide an API which allows scripts like zopectl to configure ___ 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] VHM and SSL protection problem
(Sat, Nov 05, 2005 at 12:00:10PM -0500) [EMAIL PROTECTED] wrote/schrieb/egrapse: From: Sophia Grimm [EMAIL PROTECTED] Subject: [Zope] VHM and SSL protection problem ... Installation #2: Plone 2.1/Zope 2.7.7 I'm trying to use VHM and an Apache rewrite rule to protect this site with SSL. I'm using instructions from http://plone.org/documentation/how-to/apache-ssl . Step number 7 shows this rewrite rule: RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/https/www.yourmachinename.com:443/$1 Looking at what the zope witch http://betabug.ch/zope/witch tells me (and myself guessing at what you really want to do): RewriteRule ^$ \ http://127.0.0.1:8080/VirtualHostBase/\ https/%{SERVER_NAME}:443/VirtualHostRoot/ [L,P] RewriteRule ^/(.*) \ http://127.0.0.1:8080/VirtualHostBase/\ https/%{SERVER_NAME}:443/VirtualHostRoot/$1 [L,P] It seems that you are missing the [L,P] at the end, which tells apache what to do once a RewriteRule matches. So if my original Zope site was http://www.sg.com:8080/ the above rule should simply rewrite the URL to https://www.sg.com:443/ which would force all requests for the http site to go through SSL before being forwarded to Zope. Correct? No. What this does is it enables your site to be served through SSL and apache. The force everything to SSL rewriterule is another, different, second rule. You likely need both, though I have not used fastcgi in a while. The witch doesn't cover that rule style yet. For redirecting access to the ZMI to SSL, many people use rules like these: RewriteRule ^/(.*)/manage(.*) https://%{SERVER_NAME}/$1/manage$2 [R=301,L] RewriteRule ^/manage(.*) https://%{SERVER_NAME}/manage$1 [R=301,L] ProxyPassReverse /manage https://%{SERVER_NAME}/manage You could modify these to redirect everything to SSL. (There should either be additional tests to check that you are not using SSL already, or else this should be placed in the non-SSL virtual host setup). See how these have R=301 in the last part? That's a redirect, not a rewrite. Regards, Sascha ___ 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] useradd command in Zope
this is what i tried #External script addUser.py (stored in instance/Extensions folder) import crypt import os def addUser(userName,password): password=crypt.crypt(password,5Ag5zoM9) command=/usr/sbin/adduser -p +password+ + userName return os.system(command) /// attaching the application exported from zope2.8.1 ,python-2.3.4-11,mysql-3.23.58-13 and Linux 2.6.9-1.667 now i hope that , problem defination is very clear and open.. /// On 11/7/05, Tino Wildenhain [EMAIL PROTECTED] wrote: Am Montag, den 07.11.2005, 09:32 +0530 schrieb ajit mote: i did the same but still not working. On 11/3/05, Tino Wildenhain [EMAIL PROTECTED] wrote: ajit mote schrieb: useradd ... On 11/3/05, *Andreas Jung* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Look at the sudo command (man sudo). This is basically a non-Zope question. i don't think this is non-zope question bca'z... i am using python script to add user to system which works fine when run outside of zope ... but when i run it through zope as external script (with all permission) it's not working and returning 256 without giving any error... as root, su zopeuser first and then try your script. Zopeuser meaning the user account your zope runs. Again, double and tripple check if you secured this application in any way before opening it to the web.Try harder :-) Seriously, what should we do to help you? If something isn'tworking as expected, give us the code you try, theenvironment and exact error messages, preferably tracebacks. addUser.zexp Description: Binary data ___ 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] useradd command in Zope
ajit mote schrieb: this is what i tried #External script addUser.py (stored in instance/Extensions folder) import crypt import os def addUser(userName,password): password=crypt.crypt(password,5Ag5zoM9) command=/usr/sbin/adduser -p +password+ + userName return os.system(command) Heaven! Is this external method available via web? If so be prepared for massive attack :-) That aside you may consider md5 instead of crypt to make it not too easy to crack (otoh, its not really important as your script really allows for any command) /// attaching the application exported from zope2.8.1 ,python-2.3.4-11,mysql-3.23.58-13 and Linux 2.6.9-1.667 now i hope that , problem defination is very clear and open.. /// Well no, at least not your it does not work problem you told us. Still missing: the call to the script as User which runs zope which might be zope or nobody or something, depending on your configuration and the way you start zope. Add the following lines to your external method and you can run it as script too: if __name__=='__main__': import sys try: user=sys.argv[1] pass=sys.argv[2] except IndexError: sys.stderr.write(Please start me with %s username password\n % sys.argv[0]) sys.exit(20) addUser(user,pass) and try it like this: su zope (or whoever your zope runs) ./yourmethod.py someuser somepass You will see it fail (apart from the fact you need the #!/path/to/python.bin and set the execution bit with chmod a+x before you try) Because you did not use sudo as adviced. Please try to copy the way mails are cited from other mails in this list. Dont put all your text on the top of a full quote. Thank you. Regards Tino ___ 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] useradd command in Zope
On 11/7/05, Tino Wildenhain [EMAIL PROTECTED] wrote: ajit mote schrieb: this is what i tried #External script addUser.py (stored in instance/Extensions folder) import crypt import os def addUser(userName,password): password=crypt.crypt(password,5Ag5zoM9) command=/usr/sbin/adduser -p +password+ + userName return os.system(command)Heaven! Is this external method available via web? If so be prepared for massive attack :-)That aside you may consider md5 instead of crypt to make it not too easy to crack (otoh, its not really importantas your script really allows for any command) as we are going to use application only in intranet . we are developing this web application only for our purpose ie. using only inside our firm my sys admin allow me to do this so no security problem ///attaching the application exported from zope2.8.1 ,python-2.3.4-11,mysql-3.23.58-13 and Linux2.6.9-1.667 now i hope that , problem defination is very clear and open.. /// Well no, at least not your it does not work problem you told us.Still missing: the call to the script as User which runs zopewhich might be zope or nobody or something, depending on your configuration and the way you start zope.Add the following lines to your external method and you canrun it as script too:if __name__=='__main__':import systry: user=sys.argv [1] pass=sys.argv[2]except IndexError: sys.stderr.write(Please start me with %s usernamepassword\n % sys.argv[0]) sys.exit(20) addUser(user,pass) and try it like this:su zope (or whoever your zope runs)./yourmethod.py someuser somepassYou will see it fail (apart from the fact you needthe #!/path/to/python.bin and set the execution bit with chmod a+x before you try) i tried using another user outside of zope . working very well(adding user to system) owner of external method is root and set_user_id bit is set. but problem is when i run attached app it is not adding user Because you did not use sudo as adviced.Please try to copy the way mails are cited from other mails in this list. Dont put all your text on thetop of a full quote. Thank you.RegardsTino i am really sorry for the same ___ 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] DateTime strftime problem
hi all! DateTime('2005/04/03 02:01 GMT').toZone('GMT-4') prints: 2005/04/02 22:01:00 GMT-4 ...which is what i expected - DateTime('2005/04/03 02:01 GMT').toZone('GMT-4')\ .strftime('%Y/%m/%d %H:%M %Z') prints: 2005/04/03 04:01 hmm, where's the timezone information gone? to make it short, how can i get a text representation of a DateTime object in a given timezone? thanks in advance! juergen herrmann ___ XLhost.de - eXperts in Linux hosting Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ 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] DateTime strftime problem
--On 7. November 2005 14:21:32 +0100 Jürgen Herrmann [EMAIL PROTECTED] wrote: hi all! DateTime('2005/04/03 02:01 GMT').toZone('GMT-4') prints: 2005/04/02 22:01:00 GMT-4 ...which is what i expected - DateTime('2005/04/03 02:01 GMT').toZone('GMT-4')\ .strftime('%Y/%m/%d %H:%M %Z') prints: 2005/04/03 04:01 Which Zope version? -aj pgpNw1dkVSwcN.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] DateTime strftime problem
[ Andreas Jung wrote:] --On 7. November 2005 14:41:43 +0100 Jürgen Herrmann zope 2.8.3, should i upgrade to 2.8.4 first? This is possibly related to bug #1780 (and other related timezone bugs). Unfortunately the timezone handling in Zope was and is always a mess...unlikely that it will be ever fixed, sorry. -aj then i will fix it, if i can. i need that functionality, because we have users from different time zones that access a shared calendar. thanks for the hint anyway, regards, juergen herrmann ___ XLhost.de - eXperts in Linux hosting Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ 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] DateTime strftime problem
--On 7. November 2005 14:59:44 +0100 Jürgen Herrmann [EMAIL PROTECTED] wrote: then i will fix it, if i can. i need that functionality, because we have users from different time zones that access a shared calendar. The if i can might be the reason why is not fixed yet :-) But feel free to submit patches, good luck. -aj pgpk69zyt6jDD.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] DateTime strftime problem
[ Andreas Jung wrote:] --On 7. November 2005 14:41:43 +0100 Jürgen Herrmann zope 2.8.3, should i upgrade to 2.8.4 first? This is possibly related to bug #1780 (and other related timezone bugs). Unfortunately the timezone handling in Zope was and is always a mess...unlikely that it will be ever fixed, sorry. -aj me once again... d = DateTime('2005/04/03 02:01 GMT').toZone('GMT+1') s = d.strftime('%Y/%m/%d %H:%M %Z') here i would expect s == '2005/04/03 03:01 GMT+1', do i have the correct expectation here? what is d.strftime('%Y/%m/%d %H:%M') expected to return then? regards, juergen herrmann ___ XLhost.de - eXperts in Linux hosting Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ 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] DateTime strftime problem
On 11/7/05, Jürgen Herrmann [EMAIL PROTECTED] wrote: then i will fix it, if i can. i need that functionality, because we have users from different time zones that access a shared calendar. I don't know if this helps, but it might: Python had a good module called datetime. Most likely, you want to use that instead. There are no standard timezone implementation, but Zope 3 has one you might be able to use. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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] DateTime strftime problem
[ Lennart Regebro wrote:] On 11/7/05, Jürgen Herrmann [EMAIL PROTECTED] wrote: then i will fix it, if i can. i need that functionality, because we have users from different time zones that access a shared calendar. I don't know if this helps, but it might: Python had a good module called datetime. Most likely, you want to use that instead. There are no standard timezone implementation, but Zope 3 has one you might be able to use. 1. what do you mean by HAD? seems to be there still and looks quite useable. 2. if this works as expected, why not make DateTime a wrapper around python datetime objects? is DateTime optimized for storage in the zodb (maybe a separate question to the zodb-dev list)? what was the intention to create DateTime anyway, if there's a python pendant already? regards, juergen herrmann ___ XLhost.de - eXperts in Linux hosting Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ 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] Revision Control / CVS / SVN integration with ZODB?
Zope has been a fantastic environment for our application (a front end for an Asterisk PBX application), but now that more people are contributing to the development effort, it is becoming a challenge to keep the various environments in sync. The project is now hundreds of page templates, sql methods, and python scripts: we desperately need revision control to move the project forward. I am wondering if the past CVS Products are compatible with Zope 2.8. We tried using Revision Manager: it installs ok, I check in the objects, but after a short period of time, it throws errors when you try to do a CVS update. Revision Manager is great when it works, but it has been too buggy. I tried ZCVSFolder... the stable 0.2.7b2 Product would not load in Zope 2.8.1. I was able to load the 0.2.5 version, but had trouble checking my objects into the repository. Maybe I need to spend more time here. What is the Roadmap for Revision Control in Zope 2, especially for us non-Plone users? Am I missing something with Revision Manager? Does it work for other people with Zope 2.8? I see that the Zope project itself is using Subversion, are there any plans for integrating SVN with Zope? tia, Mike Schwartz ___ 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] DateTime strftime problem
--On 7. November 2005 15:22:56 +0100 Jürgen Herrmann [EMAIL PROTECTED] wrote: 2. if this works as expected, why not make DateTime a wrapper around python datetime objects? is DateTime optimized for storage in the zodb (maybe a separate question to the zodb-dev list)? what was the intention to create DateTime anyway, if there's a python pendant already? This idea had been discussed already for Python 2.4 or Python 2.5 I think. Since 100% compatibility could not be guaranteed, it was never implemented -aj pgpTB52BlFmar.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] Revision Control / CVS / SVN integration with ZODB?
--On 7. November 2005 10:11:53 -0500 Michael Schwartz [EMAIL PROTECTED] wrote: What is the Roadmap for Revision Control in Zope 2, especially for us non-Plone users? Am I missing something with Revision Manager? Does it work for other people with Zope 2.8? Asking the authors directly is likely a better choice. Possibly not every programmer of such a tool is following the list. -aj pgpCUav858upa.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] DateTime strftime problem
On 11/7/05, Jürgen Herrmann [EMAIL PROTECTED] wrote: 1. what do you mean by HAD? seems to be there still and looks quite useable. I mean has. :) 2. if this works as expected, why not make DateTime a wrapper around python datetime objects? Because that is a lot of work to make that work in a way that doesn't instantly break every Zope instance in existance. what was the intention to create DateTime anyway, if there's a python pendant already? It didn't exist then. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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] DateTime strftime problem
--On 7. November 2005 15:36:26 +0100 Andreas Jung [EMAIL PROTECTED] wrote: --On 7. November 2005 15:22:56 +0100 Jürgen Herrmann [EMAIL PROTECTED] wrote: 2. if this works as expected, why not make DateTime a wrapper around python datetime objects? is DateTime optimized for storage in the zodb (maybe a separate question to the zodb-dev list)? what was the intention to create DateTime anyway, if there's a python pendant already? This idea had been discussed already for Python 2.4 or Python 2.5 I mean: Zope 2.4 or Zope 2.5, not Python -aj pgpb3HMx1OzLD.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] DateTime strftime problem
On Mon November 7 2005 08:21 am, Jürgen Herrmann wrote: DateTime('2005/04/03 02:01 GMT').toZone('GMT-4') prints: 2005/04/02 22:01:00 GMT-4 ...which is what i expected - DateTime('2005/04/03 02:01 GMT').toZone('GMT-4')\ .strftime('%Y/%m/%d %H:%M %Z') prints: 2005/04/03 04:01 hmm, where's the timezone information gone? to make it short, how can i get a text representation of a DateTime object in a given timezone? strftime() timezone is broken in all versions of Zope that I know of. You can work around it by using the individual functions to get the information. For example (not verified): dt = DateTime('2005/04/03 02:01 GMT').toZone('GMT-4') '%s/%s/%s %s:%s %s' % (dt.year(), dt.month(), dt.day(), dt.hour(), dt.minute, dt.timezone()) or, if you throw the seconds in there and you keep them in the same order, you can just use parts(): '%s/%s/%s %s:%s:%s %s' % (dt.parts()) -- Ron ___ 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] Z2.log question
Hi What environment or REQUEST variable is used for the Z2.log as the username? We are using Zope 2.7 and since we have switched to XUF (w cookies), the Z2.log does not record the username for a request any longer. Or more precise, it displays any user logged in via a XUF user folder as Anonymous. How can I tell Zope my user's name, so that it gets into the Z2.log? DR ___ 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] DateTime strftime problem
On Mon November 7 2005 12:15 pm, Ron Bickers wrote: dt = DateTime('2005/04/03 02:01 GMT').toZone('GMT-4') '%s/%s/%s %s:%s %s' % (dt.year(), dt.month(), dt.day(), dt.hour(), dt.minute, dt.timezone()) '%s/%s/%s %s:%s:%s %s' % (dt.parts()) Uh... you'll probably need to change the format string to suit your needs of leading zeros and such, but you get the idea. -- Ron ___ 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] DateTime strftime problem
On Mon November 7 2005 12:15 pm, Ron Bickers wrote: dt = DateTime('2005/04/03 02:01 GMT').toZone('GMT-4') '%s/%s/%s %s:%s %s' % (dt.year(), dt.month(), dt.day(), dt.hour(), dt.minute, dt.timezone()) Oops. A (hopefully obvious) typo... should be dt.minute() -- Ron ___ 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 2.8.4 and Plone
We've run into problems tryin to run Plone under Zope 2.8.4. What is the current best practice? -- ___ 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.8.4 and Plone
--On 7. November 2005 09:42:52 -0800 Dennis Allison [EMAIL PROTECTED] wrote: We've run into problems tryin to run Plone under Zope 2.8.4. Into problems means what? -aj pgp3Nz8qn70nd.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: Z2.log question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David wrote: What environment or REQUEST variable is used for the Z2.log as the username? We are using Zope 2.7 and since we have switched to XUF (w cookies), the Z2.log does not record the username for a request any longer. Or more precise, it displays any user logged in via a XUF user folder as Anonymous. How can I tell Zope my user's name, so that it gets into the Z2.log? Cookie-based auth schemes hide the authenticated user from the publisher. Here is the patch, for instance, which modified the CookieCrumbler product (an auth helper) to force the publisher to recognize the cookie-based user: http://cvs.zope.org/CMF/CMFCore/Attic/CookieCrumbler.py.diff?r1=1.18.10.5r2=1.18.10.5.2.1 XUF likely needs a similar patch (look at the '_setAuthHeader' method added by the patch for details). Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDb6e8+gerLs4ltQ4RArUsAKCv26xik5soCxBPXkUBTC93ixvUWACdGkNt KoqJ++ajbwgbz7GnV1P4zOw= =6BpR -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] Revision Control / CVS / SVN integration with ZODB?
Michael Schwartz a écrit : Zope has been a fantastic environment for our application (a front end for an Asterisk PBX application), but now that more people are contributing to the development effort, it is becoming a challenge to keep the various environments in sync. The project is now hundreds of page templates, sql methods, and python scripts: we desperately need revision control to move the project forward. (snip) If I understand correctly, you're using TTW componants. My very humble opinion is that all ths code should go to the filesystem. This would allow you to simply use SVN (or whatever). Part of this code should probably move to products and/or external methods. Also, there's a non-CMF implementation of CMF skins, that can be useful when you want to let the user customize parts of the application TTW. My 2 cents ___ 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] Revision Control / CVS / SVN integration with ZODB?
You may be interested in: http://www.zope.org/Members/jdoyon/svnapezope/Caesar This was a one man thing I did ... I ran into some big hurdles, and gave up on it for now. I still think the idea is excellent mind you, but some of the ZODB/APE paradigms didn't translate well into the SVN world. But having true, powerful revisioning capabilities for your objects would be incredibly useful to many I'm sure! As someone else mentionned, you probably should move a lot of your code onto the file system anyways. As much as possible, only pure content should be held in actual objects. J.F. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schwartz Sent: November 7, 2005 10:12 AM To: zope@zope.org Subject: [Zope] Revision Control / CVS / SVN integration with ZODB? Zope has been a fantastic environment for our application (a front end for an Asterisk PBX application), but now that more people are contributing to the development effort, it is becoming a challenge to keep the various environments in sync. The project is now hundreds of page templates, sql methods, and python scripts: we desperately need revision control to move the project forward. I am wondering if the past CVS Products are compatible with Zope 2.8. We tried using Revision Manager: it installs ok, I check in the objects, but after a short period of time, it throws errors when you try to do a CVS update. Revision Manager is great when it works, but it has been too buggy. I tried ZCVSFolder... the stable 0.2.7b2 Product would not load in Zope 2.8.1. I was able to load the 0.2.5 version, but had trouble checking my objects into the repository. Maybe I need to spend more time here. What is the Roadmap for Revision Control in Zope 2, especially for us non-Plone users? Am I missing something with Revision Manager? Does it work for other people with Zope 2.8? I see that the Zope project itself is using Subversion, are there any plans for integrating SVN with Zope? tia, Mike Schwartz ___ 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 )
[Zope] Re: useradd command in Zope
su zope (or whoever your zope runs) ./yourmethod.py someuser somepass You will see it fail (apart from the fact you need the #!/path/to/python.bin and set the execution bit with chmod a+x before you try) i tried using another user outside of zope . working very well(adding user to system) Perhaps the other user is either root or it belongs to the root's groups. owner of external method is root and set_user_id bit is set. but problem is when i run attached app it is not adding user set_user_id only works with C binary files. So, here you have to use sudo as suggested. Regards, Josef ___ 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 2.8.4 and Plone
On Mon, 07 Nov 2005 09:42:52 -0800, Dennis Allison [EMAIL PROTECTED] wrote: We've run into problems tryin to run Plone under Zope 2.8.4. What is the current best practice? Plone on Zope 2.8.x is supported and works well, you will need to give us more details than I've run into problems. Also, the plone-setup mailing list may be a better choice for this: http://plone.org/contact#setup -- _ Alexander Limi · Chief Architect · Plone Solutions · Norway Consulting · Training · Development · http://www.plonesolutions.com _ Plone Co-Founder · http://plone.org · Connecting Content Plone Foundation · http://plone.org/foundation · Protecting Plone ___ 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 )