[Zope-Checkins] SVN: Zope/branches/2.12/ - LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue
Log message for revision 101794: - LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue with bin/zopectl adduser Changed: U Zope/branches/2.12/doc/CHANGES.rst U Zope/branches/2.12/src/Zope2/Startup/zopectl.py U Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in -=- Modified: Zope/branches/2.12/doc/CHANGES.rst === --- Zope/branches/2.12/doc/CHANGES.rst 2009-07-10 14:54:30 UTC (rev 101793) +++ Zope/branches/2.12/doc/CHANGES.rst 2009-07-10 15:09:03 UTC (rev 101794) @@ -28,6 +28,9 @@ Bugs Fixed ++ +- LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue + with bin/zopectl adduser + - PluginIndexes: Added 'indexSize' to IPluggableIndex. - HelpSys: ProductHelp no longer depends on PluginIndexes initialization. Modified: Zope/branches/2.12/src/Zope2/Startup/zopectl.py === --- Zope/branches/2.12/src/Zope2/Startup/zopectl.py 2009-07-10 14:54:30 UTC (rev 101793) +++ Zope/branches/2.12/src/Zope2/Startup/zopectl.py 2009-07-10 15:09:03 UTC (rev 101794) @@ -129,7 +129,7 @@ self.sockname = config.runner.socket_name else: self.sockname = os.path.join(self.clienthome, zopectlsock) -self.python = config.python or sys.executable +self.python = os.environ.get('PYTHON', config.python) or sys.executable self.zdrun = os.path.join(os.path.dirname(zdaemon.__file__), zdrun.py) if WIN: @@ -346,4 +346,4 @@ # signal handler at all. signal.signal(signal.SIGCHLD, _ignoreSIGCHLD) exitstatus = main() -sys.exit(exitstatus) +exit(exitstatus) Modified: Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in === --- Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in 2009-07-10 14:54:30 UTC (rev 101793) +++ Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in 2009-07-10 15:09:03 UTC (rev 101794) @@ -4,6 +4,7 @@ INSTANCE_HOME=INSTANCE_HOME CONFIG_FILE=INSTANCE_HOME/etc/zope.conf export INSTANCE_HOME +export PYTHON ZDCTL=ZOPE2PATH/Startup/zopectl.py ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/ - LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue
Log message for revision 101795: - LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue with bin/zopectl adduser Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Zope2/Startup/zopectl.py U Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in -=- Modified: Zope/trunk/doc/CHANGES.rst === --- Zope/trunk/doc/CHANGES.rst 2009-07-10 15:09:03 UTC (rev 101794) +++ Zope/trunk/doc/CHANGES.rst 2009-07-10 15:11:08 UTC (rev 101795) @@ -47,3 +47,5 @@ Bugs Fixed ++ +- LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue + with bin/zopectl adduser Modified: Zope/trunk/src/Zope2/Startup/zopectl.py === --- Zope/trunk/src/Zope2/Startup/zopectl.py 2009-07-10 15:09:03 UTC (rev 101794) +++ Zope/trunk/src/Zope2/Startup/zopectl.py 2009-07-10 15:11:08 UTC (rev 101795) @@ -129,7 +129,7 @@ self.sockname = config.runner.socket_name else: self.sockname = os.path.join(self.clienthome, zopectlsock) -self.python = config.python or sys.executable +self.python = os.environ.get('PYTHON', config.python) or sys.executable self.zdrun = os.path.join(os.path.dirname(zdaemon.__file__), zdrun.py) if WIN: Modified: Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in === --- Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in 2009-07-10 15:09:03 UTC (rev 101794) +++ Zope/trunk/src/Zope2/utilities/skel/bin/zopectl.in 2009-07-10 15:11:08 UTC (rev 101795) @@ -4,6 +4,7 @@ INSTANCE_HOME=INSTANCE_HOME CONFIG_FILE=INSTANCE_HOME/etc/zope.conf export INSTANCE_HOME +export PYTHON ZDCTL=ZOPE2PATH/Startup/zopectl.py ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/src/Zope2/Startup/zopectl.py use sys.exit()
Log message for revision 101796: use sys.exit() Changed: U Zope/branches/2.12/src/Zope2/Startup/zopectl.py -=- Modified: Zope/branches/2.12/src/Zope2/Startup/zopectl.py === --- Zope/branches/2.12/src/Zope2/Startup/zopectl.py 2009-07-10 15:11:08 UTC (rev 101795) +++ Zope/branches/2.12/src/Zope2/Startup/zopectl.py 2009-07-10 15:15:37 UTC (rev 101796) @@ -346,4 +346,4 @@ # signal handler at all. signal.signal(signal.SIGCHLD, _ignoreSIGCHLD) exitstatus = main() -exit(exitstatus) +sys.exit(exitstatus) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] Release schedule for Zope 2.12.0 final
Hi there, here is my plan for the final release of Zope 2.12.0 final: Beta 3: July 14th RC 1: August 6th Final: September 4th @Jim: can we expect having ZODB 3.9.0 final until then? Andreas begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] utilities and python version in zope2.12
Hello again, On 07/07/2009 Andreas Jung wrote: As Tres already pointed out: the *relevant* scripts are registered using entry points afaik and will use the right Python interpreter. Wrong references to old Python versions in src/AccessControl/securitySuite/regressionSecurity.py src/Products/ZCTextIndex/tests/mhindex.py should be fixed but this only a cosmetic issue here. and as I can see in svn, you already fixed both of them. thanks for that. but what about all the scripts that still have python2.4 hardcoded as interpreter? if zope2.12 doesn't support python2.4, these should be fixed as well in my eyes. here's a list of scripts that use hardcoded python2.4 interpreter: src/Zope2/utilities/check_catalog.py src/Zope2/utilities/compilezpy.py src/Zope2/utilities/copyzopeskel.py src/Zope2/utilities/decompilezpy.py src/Zope2/utilities/load_site.py src/Zope2/utilities/mkzeoinstance.py src/Zope2/utilities/mkzopeinstance.py src/Zope2/utilities/requestprofiler.py src/Zope2/utilities/zpasswd.py and one test has a python2.4 requirement in documentation: src/ZPublisher/tests/generate_conflicts.py see the attached patch to fix these remaining ones. greetings, jonas diff -rNu Zope2.12.old/src/ZPublisher/tests/generate_conflicts.py Zope2.12/src/ZPublisher/tests/generate_conflicts.py --- Zope2.12.old/src/ZPublisher/tests/generate_conflicts.py 2009-07-10 16:24:51.0 +0200 +++ Zope2.12/src/ZPublisher/tests/generate_conflicts.py 2009-07-10 16:25:06.0 +0200 @@ -1,10 +1,10 @@ ## This script requires: -## - python2.4 +## - python = 2.4 ## - Zope 3's zope.testbrowser package: ## http://www.zope.org/Members/benji_york/ZopeTestbrowser-0.9.0.tgz ## ## The just run: -## $python2.4 generate_conflicts.py +## $python generate_conflicts.py import base64 import string import threading diff -rNu Zope2.12.old/src/Zope2/utilities/check_catalog.py Zope2.12/src/Zope2/utilities/check_catalog.py --- Zope2.12.old/src/Zope2/utilities/check_catalog.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/check_catalog.py 2009-07-10 16:25:22.0 +0200 @@ -1,4 +1,3 @@ -#!/usr/bin/env python2.4 ## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. diff -rNu Zope2.12.old/src/Zope2/utilities/compilezpy.py Zope2.12/src/Zope2/utilities/compilezpy.py --- Zope2.12.old/src/Zope2/utilities/compilezpy.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/compilezpy.py 2009-07-10 16:25:39.0 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env python2.4 - ## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. diff -rNu Zope2.12.old/src/Zope2/utilities/copyzopeskel.py Zope2.12/src/Zope2/utilities/copyzopeskel.py --- Zope2.12.old/src/Zope2/utilities/copyzopeskel.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/copyzopeskel.py 2009-07-10 16:25:44.0 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env python2.4 - ## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. diff -rNu Zope2.12.old/src/Zope2/utilities/decompilezpy.py Zope2.12/src/Zope2/utilities/decompilezpy.py --- Zope2.12.old/src/Zope2/utilities/decompilezpy.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/decompilezpy.py 2009-07-10 16:26:00.0 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env python2.4 - ## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. diff -rNu Zope2.12.old/src/Zope2/utilities/load_site.py Zope2.12/src/Zope2/utilities/load_site.py --- Zope2.12.old/src/Zope2/utilities/load_site.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/load_site.py 2009-07-10 16:26:05.0 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env python2.4 - ## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. diff -rNu Zope2.12.old/src/Zope2/utilities/mkzeoinstance.py Zope2.12/src/Zope2/utilities/mkzeoinstance.py --- Zope2.12.old/src/Zope2/utilities/mkzeoinstance.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/mkzeoinstance.py 2009-07-10 16:26:11.0 +0200 @@ -1,5 +1,3 @@ -#!/usr/bin/env python2.4 - ## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. diff -rNu Zope2.12.old/src/Zope2/utilities/mkzopeinstance.py Zope2.12/src/Zope2/utilities/mkzopeinstance.py --- Zope2.12.old/src/Zope2/utilities/mkzopeinstance.py 2009-07-10 16:24:50.0 +0200 +++ Zope2.12/src/Zope2/utilities/mkzopeinstance.py 2009-07-10 16:26:15.0
Re: [Zope-dev] SVN: Zope/branches/2.12/ Correctly handle unauthorized exceptions in the ZPublisherExceptionHook.
Hi. I'm not sure how exactly to approach this. The code in the ZPublisherExceptionHook reads: def __call__(self, published, REQUEST, t, v, traceback): try: if isinstance(t, StringType): if t.lower() in ('unauthorized', 'redirect'): raise else: if (t is SystemExit or issubclass(t, Redirect) or issubclass(t, Unauthorized)): raise [...] I added the issubclass(t, Unauthorized) to the second condition, which now seems to cause test failures. Looking at the first if-statement, it looked like in the times of string exceptions, both 'unauthorized' and 'redirect' would be checked upon first and always raised. I tried to follow the same logic for modern class based exceptions here for the second if-statement. Especially since the check for issubclass(t, Redirect) was already in place, this looked like an obvious omission. Can someone shed some light on this and tell me what is supposed to happen here? Thanks, Hanno On Sat, Jul 4, 2009 at 8:03 PM, Tres Seavertsea...@palladion.com wrote: Hanno Schlichting wrote: Log message for revision 101181: Correctly handle unauthorized exceptions in the ZPublisherExceptionHook. Modified: Zope/branches/2.12/src/Zope2/App/startup.py === --- Zope/branches/2.12/src/Zope2/App/startup.py 2009-06-20 19:53:08 UTC (rev 101180) +++ Zope/branches/2.12/src/Zope2/App/startup.py 2009-06-21 00:00:53 UTC (rev 101181) @@ -24,6 +24,7 @@ from time import asctime from types import StringType, ListType from zExceptions import Redirect +from zExceptions import Unauthorized from ZODB.POSException import ConflictError import transaction import AccessControl.User @@ -170,7 +171,7 @@ if t.lower() in ('unauthorized', 'redirect'): raise else: - if t is SystemExit or t is Redirect: + if t is SystemExit or t is Redirect or t is Unauthorized: raise if issubclass(t, ConflictError): What is the motivation here? Zope2 applications have hooked Unauthorized exceptions *forever*: - You can see them in the error_log (if you take them out of the ignore list). This change (the fixed version) breaks unit tests which assert that the exception can be hooked: ___ 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] Problem with POST and text/xml
I need to support a third party web service (which is not within my control) that wants to send xml data to my zope server (Zope 2.9.2 running on Redhat linux). When Zope receives a POST request with a Content-Type of text/xml it assumes that it is an xmlrpc call (which it is not - it is just passing xml data within the POST request). Is there a way to get Zope to turn off this xmlrpc assumption so that my zope external method can process the xml data that is being passed? Thanks, Jonathan P.S. details of a wget session that illustrate the error being generated follows: Setting --header (header) to Content-Type: text/xml Setting --post-data (postdata) to ?xml version=1.0 encoding=ISO-8859-1 ? bulkMtNotification transactionId235006/transactionId triggerId1160/triggerId messagetest #27/message date2007-09-14 15:52:59/date phoneNumber+11234567890/phoneNumber carrierId26/carrierId carrierNameSprint/carrierName shortCode5/shortCode /bulkMtNotification DEBUG output created by Wget 1.10.2 (Red Hat modified) on linux-gnu. --16:12:28-- http://192.168.123.2:8080/Coz/Process3Ci = `Process3Ci.1' Connecting to 192.168.123.2:8080... connected. Created socket 3. Releasing 0x00638c60 (new refcount 0). Deleting unused 0x00638c60. ---request begin--- POST /Coz/Process3Ci HTTP/1.0 User-Agent: Wget/1.10.2 (Red Hat modified) Accept: */* Host: 192.168.123.2:8080 Connection: Keep-Alive Content-Type: text/xml Content-Length: 390 ---request end--- [POST data: ?xml version=1.0 encoding=ISO-8859-1 ? bulkMtNotification transactionId235006/transactionId triggerId1160/triggerId messagetest #27/message date2007-09-14 15:52:59/date phoneNumber+11234567890/phoneNumber carrierId26/carrierId carrierNameSprint/carrierName shortCode5/shortCode /bulkMtNotification] HTTP request sent, awaiting response... ---response begin--- HTTP/1.0 500 Internal Server Error Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1 Date: Fri, 10 Jul 2009 20:12:28 GMT Bobo-Exception-Line: 742 Content-Length: 849 Bobo-Exception-Value: See the server error log for details Content-Type: text/html; charset=iso-8859-15 Bobo-Exception-Type: ResponseError Connection: Keep-Alive Bobo-Exception-File: xmlrpclib.py ---response end--- 500 Internal Server Error Registered socket 3 for persistent reuse. ___ 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] Problem with POST and text/xml
https://bugs.launchpad.net/zope2/+bug/373663 -aj On 10.07.09 21:24, Jonathan (dev101) wrote: I need to support a third party web service (which is not within my control) that wants to send xml data to my zope server (Zope 2.9.2 running on Redhat linux). When Zope receives a POST request with a Content-Type of text/xml it assumes that it is an xmlrpc call (which it is not - it is just passing xml data within the POST request). Is there a way to get Zope to turn off this xmlrpc assumption so that my zope external method can process the xml data that is being passed? Thanks, Jonathan P.S. details of a wget session that illustrate the error being generated follows: Setting --header (header) to Content-Type: text/xml Setting --post-data (postdata) to ?xml version=1.0 encoding=ISO-8859-1 ? bulkMtNotification transactionId235006/transactionId triggerId1160/triggerId messagetest #27/message date2007-09-14 15:52:59/date phoneNumber+11234567890/phoneNumber carrierId26/carrierId carrierNameSprint/carrierName shortCode5/shortCode /bulkMtNotification DEBUG output created by Wget 1.10.2 (Red Hat modified) on linux-gnu. --16:12:28-- http://192.168.123.2:8080/Coz/Process3Ci = `Process3Ci.1' Connecting to 192.168.123.2:8080... connected. Created socket 3. Releasing 0x00638c60 (new refcount 0). Deleting unused 0x00638c60. ---request begin--- POST /Coz/Process3Ci HTTP/1.0 User-Agent: Wget/1.10.2 (Red Hat modified) Accept: */* Host: 192.168.123.2:8080 Connection: Keep-Alive Content-Type: text/xml Content-Length: 390 ---request end--- [POST data: ?xml version=1.0 encoding=ISO-8859-1 ? bulkMtNotification transactionId235006/transactionId triggerId1160/triggerId messagetest #27/message date2007-09-14 15:52:59/date phoneNumber+11234567890/phoneNumber carrierId26/carrierId carrierNameSprint/carrierName shortCode5/shortCode /bulkMtNotification] HTTP request sent, awaiting response... ---response begin--- HTTP/1.0 500 Internal Server Error Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1 Date: Fri, 10 Jul 2009 20:12:28 GMT Bobo-Exception-Line: 742 Content-Length: 849 Bobo-Exception-Value: See the server error log for details Content-Type: text/html; charset=iso-8859-15 Bobo-Exception-Type: ResponseError Connection: Keep-Alive Bobo-Exception-File: xmlrpclib.py ---response end--- 500 Internal Server Error Registered socket 3 for persistent reuse. ___ 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 ) -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: i...@zopyx.com - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK E-Publishing, Python, Zope Plone development, Consulting begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ 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 )