Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
Hello Darryl, I think zope.interface will work without the C stuff, those are just optimizations. Actually it should work with jython already. zope.proxy might not be so simple to get working without C. (Hopefully) there will be some GSoC projects that will bring the subject and your problem forward: - Porting zope 3 to jython: http://www.gossamer-threads.com/lists/zope/dev/213430 - Zope without ZODB Saturday, April 19, 2008, 1:43:19 AM, you wrote: DC Hi, DC The ZCA framework is developed as part of the Zope 3 project. As noted DC earlier, it is a pure Python framework, so it can be used in any kind of DC Python application. [1] DC I was hoping to try using ZCA for a googleappengine experiment. Using DC Ian Bickings post [2] I set up a environment to install zca packages. DC zope.interface and zope.proxy both have .so files that aren't usable in DC a gae project. (_zope_interface_coptimizations.so and DC _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there DC exist pure-python ZCA packages. Could someone point me to where to find DC them? DC Best regards, DC Darryl DC [1] http://www.muthukadan.net/docs/zca.html DC [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ -- Best regards, Adam GROSZERmailto:[EMAIL PROTECTED] -- Quote of the day: Any fool can criticize, condemn, and complain - and most fools do. - Dale Carnegie ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
[Incorrect `from` header in initial] Hello Darryl, I think zope.interface will work without the C stuff, those are just optimizations. Actually it should work with jython already. zope.proxy might not be so simple to get working without C. Thanks. You are right. Silly of me not to try one or the other. If I omit `import zope.component`, `import zope.interface` works without error. Otherwise with zope.component: File /opt/google_appengine/tfws/lib/python2.5/site-packages/zope.proxy-3.4.0-py2.5-linux-i686.egg/zope/proxy/__init__.py, line 20, in module from zope.proxy._zope_proxy_proxy import * ImportError: No module named _zope_proxy_proxy Regards, Darryl (Hopefully) there will be some GSoC projects that will bring the subject and your problem forward: - Porting zope 3 to jython: http://www.gossamer-threads.com/lists/zope/dev/213430 - Zope without ZODB Saturday, April 19, 2008, 1:43:19 AM, you wrote: DC Hi, DC The ZCA framework is developed as part of the Zope 3 project. As noted DC earlier, it is a pure Python framework, so it can be used in any kind of DC Python application. [1] DC I was hoping to try using ZCA for a googleappengine experiment. Using DC Ian Bickings post [2] I set up a environment to install zca packages. DC zope.interface and zope.proxy both have .so files that aren't usable in DC a gae project. (_zope_interface_coptimizations.so and DC _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there DC exist pure-python ZCA packages. Could someone point me to where to find DC them? DC Best regards, DC Darryl DC [1] http://www.muthukadan.net/docs/zca.html DC [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ -- Best regards, Adam GROSZERmailto:[EMAIL PROTECTED] -- Quote of the day: Any fool can criticize, condemn, and complain - and most fools do. - Dale Carnegie ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
[incorrect from header in initial] Hi, The ZCA framework is developed as part of the Zope 3 project. As noted earlier, it is a pure Python framework, so it can be used in any kind of Python application. [1] I was hoping to try using ZCA for a googleappengine experiment. Using Ian Bickings post [2] I set up a environment to install zca packages. zope.interface and zope.proxy both have .so files that aren't usable in a gae project. (_zope_interface_coptimizations.so and _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there exist pure-python ZCA packages. Could someone point me to where to find them? Doing some *cleverer* googling: https://bugs.launchpad.net/zope3/+bug/204027 Cheers Nicholas, I haven't tried the patch yet but that may get me going with zope.interface. This is a recent post. 2008-03-19. On zope.proxy, I found this: http://article.gmane.org/gmane.comp.web.zope.zope3/13706 Darryl. Best regards, Darryl [1] http://www.muthukadan.net/docs/zca.html [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] raise Redir(newurl) not working - can someone confirm this?
Hi, In my application, namely for URL-Rewriting for session handling, I need to stop the current request and redirect to another url (including the session key). For that reason, I issue the following statement: from zope.publisher.interfaces import Redirect raise Redirect('http://my.new.url') Theoretically, this exception should be caught by the publisher and a redirect should be done, unfortunately not in my case: - Traceback (most recent call last): File /local/home/dusty/Zope-3.4.0c1/lib/python/zope/publisher/publish.py, line 130, in publish obj = request.traverse(obj) File /home/dusty/prog/zope3-inst/lib/python/my_app/session.py, line 72, in getClientId raise Redirect(redir_url) Redirect: Location: /++session++VLdODjCYl90YmQwdNG6hvdiT11UZS3oly5kXonWYLHdGHloxvTshQs/favicon.ico -- I don't know why this happens, *maybe* that's due to inclusion of some 3rd party packages, e.g. z3c.layer.pagelet? To confirm this, I'd like to know if this scenario is only happening for me, so, can you please simply insert the above statement in some arbitrary view and tell me if it works? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
AW: [Zope3-Users] raise Redir(newurl) not working - can someoneconfirm this?
Hi Hermann Betreff: [Zope3-Users] raise Redir(newurl) not working - can someoneconfirm this? Hi, In my application, namely for URL-Rewriting for session handling, I need to stop the current request and redirect to another url (including the session key). For that reason, I issue the following statement: from zope.publisher.interfaces import Redirect raise Redirect('http://my.new.url') I always use self.request.response.redirect(url) I'm not sure how raise Redirect works. Theoretically, this exception should be caught by the publisher and a redirect should be done, unfortunately not in my case: - Traceback (most recent call last): File /local/home/dusty/Zope-3.4.0c1/lib/python/zope/publisher/publish.py, line 130, in publish obj = request.traverse(obj) File /home/dusty/prog/zope3-inst/lib/python/my_app/session.py, line 72, in getClientId raise Redirect(redir_url) Redirect: Location: /++session++VLdODjCYl90YmQwdNG6hvdiT11UZS3oly5kXonWYLHdGHloxvT shQs/favicon.ico -- Are you trying to redirect to the favicon.ico? I don't know why this happens, *maybe* that's due to inclusion of some 3rd party packages, e.g. z3c.layer.pagelet? To confirm this, I'd like to know if this scenario is only happening for me, so, can you please simply insert the above statement in some arbitrary view and tell me if it works? I'm not 100% sure but, Note, if you use redirect you have to take care when you are doing this. You can only do this in the view call but not if the pagelet renders the template, because that's too late. This is not pagelet specific, that's also the case if you render a template in a BrowserPage? Regards Roger Ineichen Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
Here's a high-level response to this thread. As others have pointed out, zope.component and zope.interface should work fine without the C optimizations and I'm in favor of changing the setup to make them installable without the optimizations. zope.proxy is harder. :( What's especially sad is that the dependency on it is rather unimportant. It is used by zope.deferredimport. I was forced to use proxies because of annoying limitations in Python's module implementation and the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type. I expect though that a simpler proxy implementation could be used by deferredimport. This would make zope.component depend on zope.proxy only if the annoying zcml is used. I'd love to see both of the above fixed, but, sadly, don't have time to fix them myself any time soon. Jim On Apr 18, 2008, at 7:43 PM, Darryl Cousins wrote: Hi, The ZCA framework is developed as part of the Zope 3 project. As noted earlier, it is a pure Python framework, so it can be used in any kind of Python application. [1] I was hoping to try using ZCA for a googleappengine experiment. Using Ian Bickings post [2] I set up a environment to install zca packages. zope.interface and zope.proxy both have .so files that aren't usable in a gae project. (_zope_interface_coptimizations.so and _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there exist pure-python ZCA packages. Could someone point me to where to find them? Best regards, Darryl [1] http://www.muthukadan.net/docs/zca.html [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] retrieving zope.conf parameters and paths of buildout dirs
One caveat, I you are using product-config directive to specify your application directory, please note that it can not be retrieved by zope.app.appsetup.getProductConfig if you are using zope.app.wsgi to start your zope3 application. In stead, a patch to zope.app.wsgi is needed. See my mail 2 days ago. -- Hong Yuan 大管家网上建材超市 装修装潢建材一站式购物 http://www.homemaster.cn ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] raise Redir(newurl) not working - can someone confirm this?
On Apr 19, 2008, at 6:20 AM, Hermann Himmelbauer wrote: Hi, In my application, namely for URL-Rewriting for session handling, I need to stop the current request and redirect to another url (including the session key). For that reason, I issue the following statement: from zope.publisher.interfaces import Redirect raise Redirect('http://my.new.url') Theoretically, this exception should be caught by the publisher and a redirect should be done, unfortunately not in my case: - Traceback (most recent call last): File /local/home/dusty/Zope-3.4.0c1/lib/python/zope/publisher/ publish.py, line 130, in publish obj = request.traverse(obj) File /home/dusty/prog/zope3-inst/lib/python/my_app/session.py, line 72, in getClientId raise Redirect(redir_url) Redirect: Location: /++session+ +VLdODjCYl90YmQwdNG6hvdiT11UZS3oly5kXonWYLHdGHloxvTshQs/favicon.ico -- I don't know why this happens, *maybe* that's due to inclusion of some 3rd party packages, e.g. z3c.layer.pagelet? To confirm this, I'd like to know if this scenario is only happening for me, so, can you please simply insert the above statement in some arbitrary view and tell me if it works? This may be a bug in Zope 3. I suspect that there needs to be an error view or Redirect that actually does the redirect. I think you are going to have to register a page for the redirect exception that calls response.redirect. See zope.app.exception.browser for other examples of exception views. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: AW: [Zope3-Users] raise Redir(newurl) not working - can someoneconfirm this?
Am Samstag, 19. April 2008 14:05 schrieb Roger Ineichen: Hi Hermann Betreff: [Zope3-Users] raise Redir(newurl) not working - can someoneconfirm this? Hi, In my application, namely for URL-Rewriting for session handling, I need to stop the current request and redirect to another url (including the session key). For that reason, I issue the following statement: from zope.publisher.interfaces import Redirect raise Redirect('http://my.new.url') I always use self.request.response.redirect(url) I normally do, too. But in this special case, it must not happen that some later code calls self.request.response.redirect() and therefore overwrites my redirect. Due to the problems with the Render exception, I experimented with self.request.response.redirect() and it seems to be overwritten, which leads in some way I don't fully understand to endless recursions/redirecting. However, this endless recursion has something to do with virtual hosts; Something smells fishy there, too, as application names are not added to request._app_names if ++vh++ is specified at the URL, instead, namespaces like ++lang++ etc. remain in request._traversed_names. One can easily see this by inserting something like this in his view code: print request.getTraversalStack() print request._traversed_names print request._app_names And then by accessing a site directly and via a virtual host (e.g. Zope3 behind Apache) and comparing the values. (Something like ++skin++ / ++lang++ should be in the URL to see it.) Either there is something buggy in Zope3/virtual hosts or things happen which I don't understand... /++session++VLdODjCYl90YmQwdNG6hvdiT11UZS3oly5kXonWYLHdGHloxvT shQs/favicon.ico -- Are you trying to redirect to the favicon.ico? No, my case is quite simple: Mobile phones have only limited/buggy cookie support, therefore I rewrite the URL and store a session key there (as shown above). What I did is to simply create my ClientIdManager, which inherits from CookieClientIdManager, where I overwrote the getClientId() method. I don't know why this happens, *maybe* that's due to inclusion of some 3rd party packages, e.g. z3c.layer.pagelet? To confirm this, I'd like to know if this scenario is only happening for me, so, can you please simply insert the above statement in some arbitrary view and tell me if it works? I'm not 100% sure but, Note, if you use redirect you have to take care when you are doing this. You can only do this in the view call but not if the pagelet renders the template, because that's too late. This is not pagelet specific, that's also the case if you render a template in a BrowserPage? Well, I do this very early, namely in the ClientIdManager, that's I think before pages are rendered. But, perhaps, that's too early? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] raise Redir(newurl) not working - can someone confirm this?
Am Samstag, 19. April 2008 15:43 schrieb Jim Fulton: On Apr 19, 2008, at 6:20 AM, Hermann Himmelbauer wrote: To confirm this, I'd like to know if this scenario is only happening for me, so, can you please simply insert the above statement in some arbitrary view and tell me if it works? This may be a bug in Zope 3. I suspect that there needs to be an error view or Redirect that actually does the redirect. I think you are going to have to register a page for the redirect exception that calls response.redirect. See zope.app.exception.browser for other examples of exception views. Ah, yes, thanks. I managed to register a page for this exception, which is called in this case, however, what I don't know is how to extract the exception string (which is the URL I want to redirect to) in my view. Any suggestions? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] raise Redir(newurl) not working - can someone confirm this?
Am Samstag, 19. April 2008 19:38 schrieb Hermann Himmelbauer: Am Samstag, 19. April 2008 15:43 schrieb Jim Fulton: On Apr 19, 2008, at 6:20 AM, Hermann Himmelbauer wrote: To confirm this, I'd like to know if this scenario is only happening for me, so, can you please simply insert the above statement in some arbitrary view and tell me if it works? This may be a bug in Zope 3. I suspect that there needs to be an error view or Redirect that actually does the redirect. I think you are going to have to register a page for the redirect exception that calls response.redirect. See zope.app.exception.browser for other examples of exception views. Ah, yes, thanks. I managed to register a page for this exception, which is called in this case, however, what I don't know is how to extract the exception string (which is the URL I want to redirect to) in my view. Any suggestions? Ah, ok, simple, got it by myself: The error is simply self.context in my view. Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
On Sat, 2008-04-19 at 09:30 -0400, Jim Fulton wrote: Here's a high-level response to this thread. As others have pointed out, zope.component and zope.interface should work fine without the C optimizations and I'm in favor of changing the setup to make them installable without the optimizations. zope.proxy is harder. :( What's especially sad is that the dependency on it is rather unimportant. It is used by zope.deferredimport. I was forced to use proxies because of annoying limitations in Python's module implementation and the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type. I expect though that a simpler proxy implementation could be used by deferredimport. This would make zope.component depend on zope.proxy only if the annoying zcml is used. I'd love to see both of the above fixed, but, sadly, don't have time to fix them myself any time soon. Thanks Jim for your comment. Darryl Jim On Apr 18, 2008, at 7:43 PM, Darryl Cousins wrote: Hi, The ZCA framework is developed as part of the Zope 3 project. As noted earlier, it is a pure Python framework, so it can be used in any kind of Python application. [1] I was hoping to try using ZCA for a googleappengine experiment. Using Ian Bickings post [2] I set up a environment to install zca packages. zope.interface and zope.proxy both have .so files that aren't usable in a gae project. (_zope_interface_coptimizations.so and _zope_proxy_proxy.so). From the quote above and other mentions on the web I gather that there exist pure-python ZCA packages. Could someone point me to where to find them? Best regards, Darryl [1] http://www.muthukadan.net/docs/zca.html [2] http://blog.ianbicking.org/2008/04/13/app-engine-and-pylons/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
Hi there, Another high-level response. I actually *hope* that the port Zope packages to Jython project will be accepted for the Google Summer of Code. If it does, the python versions of this code will be given a good workout by the student, which should benefit other porting projects as well. cc-ing the student. Georgy, if you aren't aware yet, please check out this thread on zope3-users; it may have some interesting information for your project. Regards, Martijn ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] error 500 on blob upload with testbrowser
Hello, I can successfully upload a zope.app.file.File with testbrowser, but with zope.file.file.File (blob-based), I get this error 500: Exception raised: Traceback (most recent call last): File /home/ccomb/buildout-eggs/tmp2BwTzl/zope.testing-3.5.1-py2.4.egg/zope/testing/doctest.py, line 1356, in __run File doctest eztranet.txt[17], line 1, in ? browser.getControl(name='form.actions.add').click() File /home/ccomb/buildout-eggs/zope.testbrowser-3.4.2-py2.4.egg/zope/testbrowser/browser.py, line 591, in click self.browser._clickSubmit(self.mech_form, self.mech_control, (1,1)) File /home/ccomb/buildout-eggs/zope.testbrowser-3.4.2-py2.4.egg/zope/testbrowser/browser.py, line 380, in _clickSubmit self.mech_browser.open(form.click( File build/bdist.linux-i686/egg/mechanize/_mechanize.py, line 203, in open File build/bdist.linux-i686/egg/mechanize/_mechanize.py, line 254, in _mech_open httperror_seek_wrapper: HTTP Error 500: Internal Server Error I'm using: browser.open('http://localhost/++skin++Rotterdam/@@+/action.html?type_name=zope.file.File') browser.getControl(name='form.data').add_file(StringIO('rrttt'), ... 'text/plain', 'toto.txt') browser.getControl(name='form.actions.add').click() Is there something specific due to the blob? I get the same error with testbrowser 3.5.0 regards, Christophe ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] error 500 on blob upload with testbrowser
On Sat, Apr 19, 2008 at 9:00 PM, Christophe Combelles [EMAIL PROTECTED] wrote: Hello, I can successfully upload a zope.app.file.File with testbrowser, but with zope.file.file.File (blob-based), I get this error 500: add browser.handleErrors = False just before you make the call that raises the exception and you'll see what the underlying exception, not the 500 the publisher generates. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] What's wrong to this html block to testbrowser.Browser?
If the retrieved Browser.contents contains the following block : select name=ldap.miCosdn_options option value=uid=MailUser,dc=totalbb,dc=net.dc=twuid=MailUser,dc=totalbb,dc=net.dc=tw/option option value=uid=powerMailUser,dc=totalbb,dc=net.dc=twuid=powerMailUser,dc=totalbb,dc=net.dc=tw/option /select it complains: File /usr/local/Zope-3.4.0c1/lib/python/ClientForm/ClientForm.py, line 548, in _start_option raise ParseError(OPTION outside of SELECT) ParseError: OPTION outside of SELECT What's the problem of this block of html ? Appreciate any suggestion. Iap, Singuan ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users