Re: [Zope-dev] RFC: Proposal for merging jbohman-zope.registry branch of zope.component
Regarding Withers suggestion - should we be looking to move these libraries to the WSGI namespace? Or are there real use cases outside the web world? I use zope.component outside of web related development. I don't really care what namespace it is in, but zope.component/zope.interface are not just for the web/wsgi, so I have use case ;-) For instance I use it in generating python code from UML models for a range of different applications. Just my 2c T ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] PyPy 1.4.1 and the ZTK
I vaguely recall something about PyPy's JIT not being good with interpreter-style patterns in code - so that might slow down things if templating is involved. That would suggest the precompiling chameleon templates to .pt.py would give a better performance for templates ;-) Regards, Martijn ___ Zope-Dev maillist - zope-...@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] DTML is dead, long live DTML ;-)
HI Vincent. I haven't looked an jinja to date. Will definately have a look at it. I generate a lot of code (sql, gae models, storm schema, formish schema's) from Enterprise Architect, and currently using dtml for all non html/xml output. Cheers T On Sun, Sep 5, 2010 at 3:35 PM, Vincent Fretin vincent.fre...@gmail.comwrote: Hi, For AGX3, we started to use Jinja for the template, for example for the generation of setup.py, we have: version = '{{version}}' setup(name='{{project}}', version=version, description={{description}}, ... The syntax is simpler than dtml we use in AGX2: dtml-var description Vincent On Sun, Sep 5, 2010 at 5:13 AM, Tim Hoffman zutes...@gmail.com wrote: Hi Florian I use a model based generation approach (from enterprise architect) however even archgenxml has templates for large amounts of boiler plate under the hood. Have you actually looked at the src of archgenxml, if you did you will notices it uses dtml for templating the code output ;-) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] DTML is dead, long live DTML ;-)
Please note that DTML is a dead (and horrid) technology. Martin But zpt is horrible for doing non html/xml based things ;-), What do you think is good alternative in the zope eco system now for templating other types of things (sql, python ...) ? T ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] DTML is dead, long live DTML ;-)
Hi Florian I use a model based generation approach (from enterprise architect) however even archgenxml has templates for large amounts of boiler plate under the hood. Have you actually looked at the src of archgenxml, if you did you will notices it uses dtml for templating the code output ;-) T On Sun, Sep 5, 2010 at 9:11 AM, Florian Friesdorf f...@chaoflow.net wrote: On Sun, Sep 05, 2010 at 08:49:39AM +0800, Tim Hoffman wrote: Please note that DTML is a dead (and horrid) technology. Martin But zpt is horrible for doing non html/xml based things ;-), What do you think is good alternative in the zope eco system now for templating other types of things (sql, python ...) ? I would use a templating system for things that are easy to template (html/xml) and where more complex logic can be offloaded to a real programming language like python (as zpt does). Using a templating system for a programming language is I think a different programming paradigm than zope's component architecture and contrary to code reusage. With code generators like ArchGenXML or agx you are able to create models for your software on a more abstract level than based on templating, so I would not use templating but model-based code generation instead. florian -- Florian Friesdorf f...@chaoflow.net GPG FPR: EA5C F2B4 FBBB BA65 3DCD E8ED 82A1 6522 4A1F 4367 Jabber/XMPP: f...@chaoflow.net IRC: chaoflow on freenode,ircnet,blafasel,OFTC ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Developer meeting today at 15:00 UTC
Please don't drop 2.5 support yet. I use zope.component, zope.interface, zope.event, zope.lifecyclevent on all my projects on appengine ;-) and that won't be moving from 2.5 for a while I suspect. T On Tue, Aug 31, 2010 at 5:19 PM, Wichert Akkerman wich...@wiggy.net wrote: On 8/31/10 10:32 , Hanno Schlichting wrote: Hi. On Tue, Aug 31, 2010 at 10:23 AM, Christian Theunec...@gocept.com wrote: our weekly meeting is coming up today at 15:00 UTC. I won't make it to todays meeting, so some notes upfront. - Supporting Python 2.7 I thought the current plan is to try to support Python 2.7 for ZTK 1.1 (which will then be Python 2.5 - 2.7). Currently 1.0 beta is still blocked on test issues. Before we don't get these tests fixed, there is no point in branching off the ZTK trunk to a 1.0 branch and allowing feature development to happen. If we cannot get the tests fixed on the current list of supported systems, adding whole new ZTK version set will only make matters much worse. It does bring up an interesting question: if not all supported systems can be supported, should support for some systems be dropped? Wichert. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.pagetemplate new install dependencies introduced since 3.5.0 and a modest proposal.
Hi On Thu, Aug 12, 2010 at 4:19 PM, Hanno Schlichting ha...@hannosch.euwrote: Hi. On Thu, Aug 12, 2010 at 7:36 AM, Tim Hoffman zutes...@gmail.com wrote: I have been using zope.pagetemplate for quite some time within repoze.bfg projects and bobo (+zope.component) on google appengine (python 2.5.x). Is there a reason why you don't use Chameleon? Since version 1.1 it should be fully compatible with GAE. We have a large code base using zope.pagetemplate on appengine, and when we started chameleon couldn't run on appengine. I should spend some time checking out how well chameleon runs now. Though I have some discussion recently on a few descrepancies in behaviour. It might be easier to switch to the new kid, instead of trying to make the highly integrated zope.pagetemplate work for you. Its already been working since very early 2009 so it's more about being able to setup buildout etc. rather than hand crafting everything. So now for my modest proposal, do you think it would be feasible to move the restricted engine implementations out of zope.pagetemplate.engine and into some higher level package and provide a simple trusted engine that anyone can use (that supports metal as well) At least Zope2 depends on this engine, so moving the engine out into a zope.app.* package is not an option, it would have to be some new zope.* package. I'm not sure what and how BlueBream and Grok use this. Bummer didn't realize this If people think this is a good idea, I am quite willing work on this (with guidance ;-), so thoughts, comments welcome. I'd like to hear the reasons for not using Chameleon. To me that looks like the better forward path and avoid lots of adjustments and a lengthy migration period for zope.pagetemplate users. I will revisit chameleon. One thing I note that chameleon uses python as default expressions where as zope.pagetemplate (and all our code) uses tal expressions as default, and python: when we want python. If that default behaviour can't easily be changed (I can't find anything in the docs on this) it would mean a lot of rework, in just 2 projects we have over 500 different .pt files ( sure some global search and replaces will help, but still a lot of changes and testing. So at this point chameleon needs to be api/implementation compatible with zope.pagetemplates (metal included) or its a big job shifting. Hey it was just a suggestion and if people think zope.pagetemplate is a bit of a dead end, then maybe I should invest the time on chameleon Rgds T Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.pagetemplate new install dependencies introduced since 3.5.0 and a modest proposal.
Hi Hanno Actually went back and had a look at my appengine instances, and the earliest one using zope.pagetemplate has been running since Aug, 2008 ;-) T It might be easier to switch to the new kid, instead of trying to make the highly integrated zope.pagetemplate work for you. Its already been working since very early 2009 so it's more about being able to setup buildout etc. rather than hand crafting everything. So now for my modest proposal, do you think it would be feasible to move the restricted engine implementations out of zope.pagetemplate.engine and into some higher level package and provide a simple trusted engine that anyone can use (that supports metal as well) At least Zope2 depends on this engine, so moving the engine out into a zope.app.* package is not an option, it would have to be some new ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.pagetemplate new install dependencies introduced since 3.5.0 and a modest proposal.
HI Hanno Changing the default expression is easy. z3c.pt does exactly that to keep compatibility with zope.tal. Just found it too, looks like it might be the right place to start. The other thing I am trying to find is batch compiling all of the templates. I can't rely on 100% coverage in dev for all of the templates to be compiled with chameleon before deployment to appengine, have been hunting around for some docs on this. Any pointers ? T So at this point chameleon needs to be api/implementation compatible with zope.pagetemplates (metal included) or its a big job shifting. It is 99% compatibile. The only real difference is, that it requires all your templates to be valid XHTML. Otherwise almost all of Zope2/Plone with all kinds of weird code works. Hey it was just a suggestion and if people think zope.pagetemplate is a bit of a dead end, then maybe I should invest the time on chameleon I think zope.pagetemplate is a dead end for anyone not using one of the large frameworks. Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zope.pagetemplate new install dependencies introduced since 3.5.0 and a modest proposal.
Hi I have been using zope.pagetemplate for quite some time within repoze.bfg projects and bobo (+zope.component) on google appengine (python 2.5.x). I have just been doing some upgrades etc... and discovered that zope.pagetemplate in 3.5.2 has introduced a whole heap of new dependancies. In 3.5.0 non testing install requirements where setuptools zope.interface zope.tales zope.tal where as 3.5.2 install requires setuptools zope.interface zope.component zope.security [untrustedpython] zope.tales zope.tal zope.i18n zope.i18nmessageid zope.traversing Now I already had i18n, i18nmessageid and zope.component, zope.interface as I was already using them, but now zope.security and zope.traversing means I also now get zope.browser-1.3-py2.5.egg zope.contenttype-3.5.1-py2.5.egg zope.exceptions-3.6.1-py2.5.egg zope.location-3.9.0-py2.5.egg zope.publisher-3.12.4-py2.5.egg zope.security-3.7.3-py2.5-linux-x86_64.egg zope.traversing-3.13-py2.5.egg zope.proxy-3.6.1-py2.5-linux-x86_64.egg I know that zope.pagetemplate.engine actually had a dependency on zope.traversing but this was never expressed in the EGG-INFO/requires.txt in 3.5.0. I used my own engine given I always running trusted code. (I am using metal as well). So now for my modest proposal, do you think it would be feasible to move the restricted engine implementations out of zope.pagetemplate.engine and into some higher level package and provide a simple trusted engine that anyone can use (that supports metal as well) As the architecture.txt for zope.pagetemplate says - An *expression engine* is responsible for compiling expressions and for creating expression execution contexts. It is common for applications to override expression engines to provide custom expression support or to change the way expressions are implemented. The `zope.app.pagetemplate` package uses this to implement trusted and untrusted evaluation; a different engine is used for each, with different implementations of the same type of expressions. So maybe the best place for the full expression engines would be zope.app.pagetemplate. This would seem to be in keeping with a lot of the work, breaking down core zope technologies into re-usable (outside of a pure zope stack) components. This would in theory bring the dependencies back down to zope.interface zope.tales zope.tal zope.i18n zope.i18nmessageid If people think this is a good idea, I am quite willing work on this (with guidance ;-), so thoughts, comments welcome. TIA Tim Hoffman ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Segfault in zope.configuration
sorry On Fri, Apr 2, 2010 at 9:07 PM, Marius Gedminas mar...@gedmin.as wrote: A: Because it destroys the flow of the conversation Q: Why is it bad? A: No, it's bad. Q: Should I top post in replies to mailing lists? On Fri, Apr 02, 2010 at 12:26:59PM +0800, Tim Hoffman wrote: Hi Martin Given that its failing on a call to libc I would do a quick run with strace and ltrace. That was my segfault, not Martin's. I suspect hardware, as it's very non-deterministic (a small pure-Python script that runs every 5 minutes segfaults once in a few months). (In your case ltrace will be probably be more useful.) You will be able to see the calls into the libraries and you should see immediately if your segfault is inside expat or not. (ltrace output will be very long ;-) On Fri, Apr 2, 2010 at 11:29 AM, Martin Aspeli optilude+li...@gmail.com wrote: Marius Gedminas wrote: On Thu, Apr 01, 2010 at 06:07:26PM +0800, Martin Aspeli wrote: I'm not sure if this is a Python issue or a zope issue. We're getting a segfault on 64-bit SuSE Linux (SLES 11), originating from z3c.autoinclude, which in turn called zope.configuration'sinclude / implementation. This calls expat, which then crashes (no error, log message, or core file, but it has all the markings of a segfault) during parsing of the file. On recent Ubuntu versions segfaults get recorded in dmesg and end up in /var/log/kern.log like this: Mar 22 02:10:03 fridge kernel: [7804719.781375] python[10447]: segfault at 7fff84a7c000 ip 7fff83aae7cb sp 7fff84a7bd98 error 7 in libc-2.9.so[7fff83a2b000+168000] I assume that's a standard kernel feature now (we've 2.6.28, x86_64). Marius Gedminas -- http://pov.lt/ -- Zope 3 consulting and development -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAku17BQACgkQkVdEXeem149bGwCfYKlubUF9+xxJ7oOM0hhRc6o9 BOMAniwIKQNDr+h224tdW7nonPoYtctr =7p1x -END PGP SIGNATURE- ___ Zope-Dev maillist - zope-...@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Segfault in zope.configuration
Hi Martin Given that its failing on a call to libc I would do a quick run with strace and ltrace. (In your case ltrace will be probably be more useful.) You will be able to see the calls into the libraries and you should see immediately if your segfault is inside expat or not. (ltrace output will be very long ;-) T On Fri, Apr 2, 2010 at 11:29 AM, Martin Aspeli optilude+li...@gmail.com wrote: Marius Gedminas wrote: On Thu, Apr 01, 2010 at 06:07:26PM +0800, Martin Aspeli wrote: I'm not sure if this is a Python issue or a zope issue. We're getting a segfault on 64-bit SuSE Linux (SLES 11), originating from z3c.autoinclude, which in turn called zope.configuration'sinclude / implementation. This calls expat, which then crashes (no error, log message, or core file, but it has all the markings of a segfault) during parsing of the file. On recent Ubuntu versions segfaults get recorded in dmesg and end up in /var/log/kern.log like this: Mar 22 02:10:03 fridge kernel: [7804719.781375] python[10447]: segfault at 7fff84a7c000 ip 7fff83aae7cb sp 7fff84a7bd98 error 7 in libc-2.9.so[7fff83a2b000+168000] I assume that's a standard kernel feature now (we've 2.6.28, x86_64). Interesting. I'll check. The weird thing is that it's not parsing of any file: it happens during a standard configure.zcml (for the collective.xdv package), but z3c.autoinclude itself is invoked from another ZCML file, so it must've been able to read that. Any tips on how to debug or similar experiences would be appreciated! Can you reproduce this, reliably? Yes. I'd be reaching for python/expat debug symbols and gdb, probably. I'm not sure how to do that. My gdb fu is *very* limited. I also assume I'd need to re-build python and/or expat for this? Martin ___ Zope-Dev maillist - zope-...@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Optional C extensions
Hi Jim Yeah I agree with you. I haven't ever distributed that version of zope.proxy , just used it internally to support deferredimport. zope.security could never to what it does with a pure python version of zope.proxy. the 'c' wrappers are very important to ensure security. Unfortunately I needed deferredimport and was completely unsure how else to proceed at the time. I use code generation for gae based models, and the unfortunately reference entities need actual models/classes which means you can very easily create cyclic dependancies. Storm allows references to be defined strings such as model.MyClass but gae doesn't implement such a thing, so deferredimport was the next best thing. T On Wed, Mar 10, 2010 at 8:05 PM, Jim Fulton j...@zope.com wrote: On Tue, Mar 9, 2010 at 6:15 PM, Tim Hoffman zutes...@gmail.com wrote: Hi As Attila pointed out, zope.proxy is possible to implement using peak.util.proxies if you only want some limited zope.proxy support. You won't get zope.security going down this path. I do that specifically so that I can use zope.deferredimport on app engine. Below is the awful hacking I do to zope.proxy.__init__ to make it support zope.deferredimport on appengine. Please don't encourage this. People reading this, please forget you read Tim's email. :) (Jim whips out special pen and asks that everyone look in his direction for a moement.) zope.deferred import should, perhaps, be modified to use peak.util.proxies, but we should not have packages floating around that modify zope.proxy to weaken it. I wish I had agitated to make changes to Python to make deferred imports use of zope.proxy unnecessary. Jim -- Jim Fulton ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Optional C extensions
Hi As Attila pointed out, zope.proxy is possible to implement using peak.util.proxies if you only want some limited zope.proxy support. You won't get zope.security going down this path. I do that specifically so that I can use zope.deferredimport on app engine. Below is the awful hacking I do to zope.proxy.__init__ to make it support zope.deferredimport on appengine. Rgds T === from zope.interface import moduleProvides from zope.proxy.interfaces import IProxyIntrospection from peak.util.proxies import ObjectProxy class ProxyBase(ObjectProxy): pass def getProxiedObject(obj): if hasattr(obj,'__subject__'): return obj.__subject__ else: return obj def removeAllProxies(obj): return getProxiedObject(obj) def sameProxiedObjects(obj1,obj2): if getProxiedObject(obj1) == getProxiedObject(obj2): return True else: return False moduleProvides(IProxyIntrospection) __all__ = tuple(IProxyIntrospection) def ProxyIterator(p): yield p while isProxy(p): p = getProxiedObject(p) yield p def non_overridable(func): return property(lambda self: func.__get__(self)) On Wed, Mar 10, 2010 at 1:03 AM, Jim Fulton j...@zope.com wrote: On Tue, Mar 9, 2010 at 10:53 AM, Baiju M mba...@zeomega.com wrote: Hi, Any idea how difficult it is to create optional C extensions for these packages: zope.container zope.hookable zope.proxy zope.security I believe it is very hard, if not impossible, for zope.proxy and zope.security. I suspect the best approach would be to make a new package (or set of packages) that provides everything that zope.security providex except the zope.security.proxy package. If I were going to do that though, I would rethink the way proxies and checkers are managed. Jim -- Jim Fulton ___ Zope-Dev maillist - zope-...@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] New Zope 3 name: BlueBream
I got the fish connection straight away. Not sure its a good move. T On Tue, Jan 5, 2010 at 7:43 AM, Hermann Himmelbauer du...@qwer.tk wrote: Am Montag 04 Januar 2010 20:16:50 schrieb Jan Ulrich Hasecke: On 04.01.10 19:23, Baiju M wrote: Hi All, I am proposing to call Zope 3 - the web frame work as BlueBream. The main use for name is documentation. Coming from marketing I strongly suggest to think twice or better thrice before inventing the next new name in Zope world. There are already too many of them. Although I tend to give you right, as probably no one will get the fish connection and therefore a new name has to be raised up, I vote for BlueBream, as this indicates something very new, which frees itself from those endless Zope 3, Zope 3 Application Server, Zope blah blah... considerations. +1 Best Regards, Hermann -- herm...@qwer.tk GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] improving the utility and adapter lookup APIs
Just re-inforcing this I almost never do IFoo. adaption as I am almost always using multiadapters and utilities so I completely forget about the IFoo adaption capability. Which means I always just write getAdapter as well as it seems more consistent to from an api consumption point of view. T Interesting. If you mostly do multi-adaptation (and utility lookups) you won't notice it as we know multi adaptation cannot be done with the adapter hook. Was this the case? I really have trouble remembering the lookup APIs in zope.component myself. People in my experience actually *try* to do multi adaptation using the IFoo adapter hook and then get confused because it fails. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.site.hooks
GAE users and repoze.bfg users as repoze.bfg doesn't use zope.security at all I did a quick grep and it appears that repoze.bfg never actually loads zope.component.zcml so I think if the only dependancies you introduce are via zcml then you should be ok. And given I am running repoze.bfg on app engine it would seem to confirm this ;-) T On Wed, Oct 7, 2009 at 2:57 PM, Thomas Lotze t...@gocept.com wrote: Thomas Lotze wrote: I thought about that one briefly, but I don't like it because it introduces at least some knowledge about the security concept to zope.component. The more I think about it, the less evil this appears to me, though. After all, the zope.component.zcml module has been dependent on zope.security all along (requiring one to install zope.component [zcml] which pulls in zope.security if one wanted to use it). I think I'd be willing to use zope.security optionally for the site stuff provided that we can get the GAE users to agree and with the intention of cleaning up things later according to those old comments in the code which I mentioned previously. -- Thomas ___ Zope-Dev maillist - zope-...@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zope.site.hooks
Hi On Wed, Oct 7, 2009 at 8:49 AM, Martin Aspeli optilude+li...@gmail.com wrote: Martijn Faassen wrote: Please don't add new dependencies to zope.component. Even optional ones, IMHO. It makes it harder to re-use for others and more complex to understand. Many people (e.g. those wanting to use GAE) object to the C stuff in zope.security in particular. Big +1 I am using repoze.bfg on app engine (and in the past a minimal zope3 stack) and getting rid of zope.security dependancies (and/or gutting it) in other packages is not easy and would hate see it turn up in zope.component. T Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Zope-Dev maillist - zope-...@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] For the record - a minimum changes to zope.proxy to support zope.deferredimport under google app engine
I am a !...@head ;-) Forgot the else: clause in the code I posted. Corrected code is below. T On Thu, Aug 13, 2009 at 11:30 AM, Tim Hoffman t...@zute.net wrote: Hi Folks This is a quick and dirty change and to be honest the main reason I am posting it here is so there is a searchable record for anyone else who wants to use zope.deferredimport under google app engine. (With some content models zope.deferredimport is a great way of dealing with cyclic dependancies and possibly improving startup times - see bottom of this email.) Below is a minimal set of changes to zope.proxy.__init__ that is required so that zope.deferredimport can be used. It does mean you need peak.utils to implement a basic proxy. incorrect code shown, Should have read try: from zope.proxy._zope_proxy_proxy import * from zope.proxy._zope_proxy_proxy import _CAPI except NotImplementedError: pass else: from peak.util.proxies import ObjectProxy class ProxyBase(ObjectProxy): pass def getProxiedObject(obj): if hasattr(obj,'__subject__'): return obj.__subject__ else: return obj def removeAllProxies(obj): return getProxiedObject(obj) def sameProxiedObjects(obj1,obj2): if getProxiedObject(obj1) == getProxiedObject(obj2): return True else: return False There are a couple of other zope.proxy functions from the 'c' api that I haven't looked at yet as they aren't used by zope.deferredimport. Suggestions on improving it and/or followups on the other functions would also be welcome. I have also found that deferred import can help with app engine startup times as it means you can import a module you depend on but not really import the code until it gets touched which can allow you to stagger you startup costs. (For instance edit functionality of a site could be deferred until someone actually edits something). Hope this helps someone Regards Tim Hoffman ___ 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] For the record - a minimum changes to zope.proxy to support zope.deferredimport under google app engine
Hi Folks This is a quick and dirty change and to be honest the main reason I am posting it here is so there is a searchable record for anyone else who wants to use zope.deferredimport under google app engine. (With some content models zope.deferredimport is a great way of dealing with cyclic dependancies and possibly improving startup times - see bottom of this email.) Below is a minimal set of changes to zope.proxy.__init__ that is required so that zope.deferredimport can be used. It does mean you need peak.utils to implement a basic proxy. try: from zope.proxy._zope_proxy_proxy import * from zope.proxy._zope_proxy_proxy import _CAPI except NotImplementedError: from peak.util.proxies import ObjectProxy class ProxyBase(ObjectProxy): pass def getProxiedObject(obj): if hasattr(obj,'__subject__'): return obj.__subject__ else: return obj def removeAllProxies(obj): return getProxiedObject(obj) def sameProxiedObjects(obj1,obj2): if getProxiedObject(obj1) == getProxiedObject(obj2): return True else: return False There are a couple of other zope.proxy functions from the 'c' api that I haven't looked at yet as they aren't used by zope.deferredimport. Suggestions on improving it and/or followups on the other functions would also be welcome. I have also found that deferred import can help with app engine startup times as it means you can import a module you depend on but not really import the code until it gets touched which can allow you to stagger you startup costs. (For instance edit functionality of a site could be deferred until someone actually edits something). Hope this helps someone Regards Tim Hoffman ___ 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] A suggestion for changing exception handler when loading 'c' optimisations to make modules more friendly for GAE
I suppose that depends on your point of view. They exception is actually saying that imp.load_dynamic is not implemented, not that it can't load the dynamic module so I would say in my opinion that it isn't a bug. Rgds Tim On Fri, Jul 3, 2009 at 4:38 PM, Chris Withersch...@simplistix.co.uk wrote: Tim Hoffman wrote: gae/1.333250465889549129/zope/i18nmessageid/_zope_i18nmessageid_message.py, line 6, in __bootstrap__ imp.load_dynamic(__name__,__file__) File /base/python_dist/lib/python2.5/py_imp.py, line 116, in load_dynamic raise NotImplementedError('This function is not supported on App Engine.') This actually feels like a bug in GAE to me... This should be an ImportError... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - zope-...@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 )
Re: [Zope-dev] A suggestion for changing exception handler when loading 'c' optimisations to make modules more friendly for GAE
Hi Jim That is what I am doing now, the problem I see though is when someone upates (via buildout etc a) module they need to remember to remove the recreated file before redeploying the app, unfortunately I am not sure I see a way reliable way of specifying that these files should be deleted in any automatic sense. At least an ignore in the app.yaml isn't feasible. Tim ... This might be an ok work around. How hard would it be to just remove the wrapper script when deploying to app engine? Jim -- Jim Fulton Zope Corporation ___ Zope-Dev maillist - zope-...@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 )
Re: [Zope-dev] A suggestion for changing exception handler when loading 'c' optimisations to make modules more friendly for GAE
Hi Tobias Cool Just something to note google recently upped the file limit to 3000 so don't be too agressive generating those zips ;-) T Great idea to examine EGG-INFO/SOURCES.txt, Jim! I just added this to my recipe (http://pypi.python.org/pypi/rod.recipe.appengine) and got rid of the horrible monkey patch for imp.load_dynamic. Now it does exactly what Tim wants and excludes the optional c extension stuff (plus .pyo, and .pyc files) in a gae buildout. I'm planning to add an option for not deploying the additional packes as a zip archive if the gae file limit will not be exceeded. Cheers, Tobias ___ Zope-Dev maillist - zope-...@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] A suggestion for changing exception handler when loading 'c' optimisations to make modules more friendly for GAE
Hi all Can I make a suggestion that would make a couple of modules more gae friendly ;-) zope.interface and zope.i18nmessageid have 'c' optimisations which obviously don't work under app engine. When these modules are imported you get the following exception. gae/1.333250465889549129/zope/i18nmessageid/_zope_i18nmessageid_message.py, line 6, in __bootstrap__ imp.load_dynamic(__name__,__file__) File /base/python_dist/lib/python2.5/py_imp.py, line 116, in load_dynamic raise NotImplementedError('This function is not supported on App Engine.') Unfortunately the code (in this case in zope.i18nmessageid.Message) does the following which doesn't deal with the Exception raised by the app engine runtime. try: from _zope_i18nmessageid_message import Message except ImportError: pass To make it more gae friendly I think we should change these occurrences to try: from _zope_i18nmessageid_message import Message except ImportError, NotImplementedError: pass Regards Tim ___ 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] How to test changes to ZTK packages?
I have to chime in here too lxml is a real pain and seems to be problematic to get a straightforward build for packages other than ZTK as well. I have had varying success building lxml even under ubuntu - success seems to be dependant on the type of build defined. T On Tue, Jun 30, 2009 at 6:28 PM, Jim Fulton j...@zope.com wrote: I should know this, but I don't. What is the recommended way to test changes to core ZTK packages to mitigate the risk that changes affect other packages? Is there a page somewhere with instructions? I tried using using zope.release. Building the trunk of zope.release with Python 2.4 and running the tests gives lots of test import errors and test failures. (Lots of tests want to import z3c.pt.) The tests hang when I try to build and run with Python 2.6. BTW, zope.release wants lxml, which is a real pain on Mac OS X and Centos 4. Does the ZTK really need to depend on lxml? Jim -- Jim Fulton Zope Corporation ___ 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 )
Re: [Zope-dev] RFC: ZTK custom publications, zope.app.publication, and zope.traversing
HI Big +1 from me on this. I had to do a whole lot of hacks to get this stuff running on app engine and basically had to gut zope.proxy which was ugly and obviously unsupported. After getting this running which was a big task I decided to go with repoze.bfg which just didn't have the security proxies at all because I wouldn't have to support my wierd gutted fork of zope.proxy and zope.security. (under gae I am not running any untrusted code) Having a standard way to turn this stuff would be great, Rgds Tim On Mon, Jun 22, 2009 at 5:36 PM, Jim Fulton j...@zope.com wrote: On Jun 21, 2009, at 9:40 PM, Stephan Richter wrote: On Sunday 21 June 2009, Jim Fulton wrote: Thoughts? +1. Sounds really good! BTW, I would love to hear about a practical example for overriding proxy() other than turning off security altogether. 2 examples: - Use a Python-based proxy that's good enough for supporting access control in trusted code. (It wouldn't protect against devious untrusted code, but most applications don't really need to run untrusted code.) - Use a better system for managing checkers. Probably the most important feature is disabling proxy-based protection for applications that don't need an access control model or that use a non-proxy-based approach. Jim -- Jim Fulton Zope Corporation ___ 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 )
Re: [Zope-dev] RFC: ZTK custom publications, zope.app.publication, and zope.traversing
Hi Jim Yeah I meant my ugly hacks getting rid of the 'c' in zope.proxy and zope.security aren't going to get supported by anyone, whereas having a supported way of substituting proxies and security would be great. All the import dependancies that existed when I went through the excercise meant ugly hacks was about all I could come up with. The refactoring going on at the moment is fantastic. T On Mon, Jun 22, 2009 at 9:22 PM, Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jim Fulton wrote: On Jun 22, 2009, at 7:11 AM, Tim Hoffman wrote: Big +1 from me on this. Cool. I had to do a whole lot of hacks to get this stuff running on app engine and basically had to gut zope.proxy which was ugly How so? and obviously unsupported. I don't think so. What makes you think it's unsupported. I think Tim was referring to his mangled version of zope.proxy (no C extensions, to allow running on GAE). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKP4WJ+gerLs4ltQ4RAi4IAJwM3/1FoX027kHSQKTzNCW0qYewJACdFQ+4 tRgPtbJCmsMed1HNugqk9os= =znBD -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 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] who wants to maintain the Zope 3 ZMI?
I use zmi as a basic ui for viewing objects bacause we get basic views for some default content, navigating the object store, and configuring local security settings on objects, and configuring per instance tools. And this is mainly because in the early stages of our projects we haven't built the UI. Oh and we probably wouldn't integrate some the tool management in our UI like pluggable auth components. T On Wed, Apr 15, 2009 at 12:34 AM, Martijn Faassen faas...@startifact.com wrote: Hi there, In the whole discussion about Zope 3 I saw very few people speak up for the Zope 3 ZMI. So, who finds the Zope 3 ZMI useful? What parts of it do you find useful? Are you interested in helping maintain it? Note that I'm talking about the concrete Zope 3 ZMI here, not the general concept of the ZMI. I think there are quite a few useful concepts surrounding the ZMI, but the Zope 3 ZMI isn't that good at making any of these concepts work right now, in my opinion. If we get a consensus that the ZMI in Zope 3 isn't actually used a lot, we could take a lot more drastic action in removing it from our codebase than we've done before. If people are using it, we shouldn't do that of course. Regards, Martijn ___ Zope-Dev maillist - zope-...@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 )
Re: [Zope-dev] who wants to maintain Zope 3?
I thhink just dropping zmi is ploblematical without a management ui alternative. How would you propose managing things like per instance pluggable auth components. zcml is not enough and nor is any other static config. You need per instance persistent configuration and I am assuming grok and anything using zope 3 (traiditional server) would need to do this. So anyone buidling a instance based manageble tool would want to ship it with a management ui that would work on multiple zope toolkit based systems, T On Wed, Apr 15, 2009 at 1:20 AM, Martijn Faassen faas...@startifact.com wrote: Hey, Fabio Tranchitella wrote: [snip] If the question was who is interested in zope3, the application server, and willing to maintain it, I'd answer me. Thanks for speaking up! Do you use the Zope 3 ZMI a lot? The Zope Toolkit right now is most of the Zope 3 libraries. The main thing we're getting rid of is the ZMI right now and cleaning up the dependency structure. After that there are various other avenues for innovation. We're not out to break people's code. The Zope Toolkit project is very much about supporting this code better, allowing it to evolve and stay relevant. I'm a huge user of the existing codebase itself and I'm not about to rewrite all my stuff. Regards, Martijn ___ Zope-Dev maillist - zope-...@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 )
Re: [Zope-dev] who wants to maintain Zope 3?
Hi I have a couple of questions about Zope 3 rather than Zope Toolkit, as it seems not many people are using Zope 3 the application server. I have been working on a project using Zope 3 (the app server ) for nearly 8 months . The project is not finished (other stuff keeps coming up which distracts the group ) but it is a fair way along. We are using Zope 3 pretty much as it comes from zopeproject, and storm orm for a large part of the persistence layer (plus ZODB). We decided to go down this path because we wanted the full security model from zope3, and it seemed to harder to work with that pure model within grok at the time. We use the zmi on and off just as a short cut for quick and dirty object viewing, but are building a completely different UI based around YUI. It seems from all the discussion of late that we might of chosen a architectural dead end (though I don't think so). If someone where coming to the Zope party now and needed the full blown security model and view mechanisms, and the zcml tied to that model what would the choice be going forward? repoze.bfg has pretty much gutted that model (which is fine as a simpler model is definately required, I am planning to revisit bfg with my zope on gae work) grok sort of fell in a whole for us when we started the project as it wasn't obvious how to go about doing the full security model etc... (mainly I think because a lack of docs etc... when we made our decision) Any thoughts on this decision, direction that we have taken, and what if could be the alternative if the Zope 3 app server itself withered? Rgds Tim Hoffman ___ 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] who wants to maintain Zope 3?
Hi Chris can I specify security annotations on objects persisted in the zodb as per zope3/zope2 which are over and above the class/view decleration. bfg wasn't around when we started so I have looked too closely at bfg from security point of view T On Sun, Apr 12, 2009 at 9:14 AM, Chris McDonough chr...@plope.com wrote: On 4/11/09 8:10 PM, Tim Hoffman wrote: If someone where coming to the Zope party now and needed the full blown security model and view mechanisms, and the zcml tied to that model what would the choice be going forward? repoze.bfg has pretty much gutted that model (which is fine as a simpler model is definately required, I am planning to revisit bfg with my zope on gae work) As far as I know, the only bit that BFG doesn't have out of the box (or at least in combination with an authentication system like repoze.who) that Zope 2 or Zope 3 does is the concept of allowing untrusted users to write code (e.g. TTW code). All other concepts present in Zope 2/3 that I know of can be composed using the out-of-the-box BFG primitives of context-sensitive security (via ACLs attached to model objects), view permissions, and principals. Because the only code that is published to the web within BFG is view code, no other security is required for belt and suspenders; for example, you don't need to protect model methods because there's just no way they'll be invoked within a BFG application. For more information, see http://docs.repoze.org/bfg/narr/security.html . - C ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] who wants to maintain Zope 3?
Ok so pretty much the same as the traditional Zope 3 model. Are you still using the 'c' based zope.security or built your own. On a side note I have got a big chunk of zope3 running on gae (had to gut zope.security and zope.proxy) and plan on revisiting the whole effort looking at bfg, but I would need to revert to zpt because cheetah is dependant on lxml and its no 'c' for me, any suggestions or ideas on the effort involved. (I have zpt running with similiar functionality to zope.app.pagetemplate level rather thatn zope.pagetemplate) with full macro lookups etc Thanks for the info T On Sun, Apr 12, 2009 at 11:23 AM, Chris McDonough chr...@plope.com wrote: On 4/11/09 10:20 PM, Tim Hoffman wrote: Hi Chris can I specify security annotations on objects persisted in the zodb as per zope3/zope2 which are over and above the class/view decleration. Yes, for instance, in some code that manipulates a persistent object, you can do something like: from repoze.bfg.security import Authenticated from repoze.bfg.security import Allow blogentry.__acl__ = [(Allow, 'fred', 'edit'), (Allow, Authenticated, 'view')] When that object (or one of its children) becomes the context of a view (maybe when you traverse to a URL which represents the blog entry object's default view), the combination of the view's permission and the principals attached to the request is compared against the object's ACL. Access is allowed or denied. For example: from repoze.bfg.view import bfg_view from mypackage.interfaces import IBlogEntry @bfg_view(for_=IBlogEntry, permission='edit') def blogentry_edit_view(context, request): ... ... only a principal named 'fred' would be allowed to invoke this view if 'context' was the blogentry you attached the above ACL to. There is an acquisition model for ACLs which looks at the parents of the context in the model graph (often up a tree of persistent objects) to find an ACL if one is not defined on the context. - C ___ Zope-Dev maillist - zope-...@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 )
Re: [Zope-dev] who wants to maintain Zope 3?
Hi Chris On Sun, Apr 12, 2009 at 11:55 AM, Chris McDonough chr...@plope.com wrote: On 4/11/09 11:49 PM, Tim Hoffman wrote: Ok so pretty much the same as the traditional Zope 3 model. Are you still using the 'c' based zope.security or built your own. We don't depend on zope.security and there is no C in the BFG security code itself. On a side note I have got a big chunk of zope3 running on gae (had to gut zope.security and zope.proxy) and plan on revisiting the whole effort looking at bfg, but I would need to revert to zpt because cheetah Chameleon, I think you mean. Oops yeah! ;) is dependant on lxml and its no 'c' for me, any suggestions or ideas on the effort involved. (I have zpt running with similiar functionality to zope.app.pagetemplate level rather thatn zope.pagetemplate) with full macro lookups etc Malthe has expressed interest in removing the lxml dependency from Chameleon, but I think he needs funding. Others have also expressed an interest in this and we'd probably kick in to a pool of funds towards this if you ever get to a point where it became something you wanted to do. I really don't know how much effort is involved, but for the record, Chameleon only depends relatively shallowly on lxml (mostly for xpath expressions), and removing lxml will make no difference in rendering speed. ok but I assume it's not too much of a problem to swap out chameleon altogther in the meantime and go back to zpt (unfortunately I don't have money for this project ;-( Again thanks for the info. My plan to is to rollout a small site I am building in zope3 on gae, and then go back and do a major refactor on what I have learnt, and look at bfg as the model going forward. Cheers Tim ___ 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] several zope.* libs within gae (was ZCML implementations: where should they go)
Hi Just on the zope in gae. I have been hacking away at getting a core of zope running under gae. (one example is http://baon.appspot.com/ which was a port of an old portal_toolkit/cmf 1.0 site I used as an excercise) I am currently using the following packages app (completely gutted) component configuration contenttype datetime deferredimport deprecation event exceptions i18n i18nmessageid interface lifecycleevent location pagetemplate proxy publisher schema security tal tales testing traversing Though zope.proxy and zope.security have been pretty much gutted. There is practically nothing in zope.app (basically some scaffold left to support imports from other packages withouth having to change packages) I am also using peak.util z3c.form And had to write my own wrapper for pagetemplates to get closer to zope.app.pagetemplate and a gae specific publication (based on DefaultPublication) . I have manually registered most of the parts (adapters and utilities) of the packages listed above. I had to do that to avoid all of the extra dependancies pulled in by the default zml that just won't work in gae (mainly zope.security stuff) . For z3c.form I did end up using zcml (to hard to do all the widgets by hand ;-) but had to remove all of the permission directives from the class statements (like a said it's all a bit of a hack at the moment) It's not pretty ;-) but works. I plan to revisit repose.bfg as a base for this work, but need to remove cheetah and go back to pure python zpt, and get rid of all the lxml depenancies. I put all of this together manually so far (buildout comes next - now that I know what I need to do). One question before I go. I had to replace about 90% of zope.security (well get rid of it) what would be the best way of specifying a replacement for a core package like zope.security rather than just replacing it. If I wanted to share this work it would be a but confusing to call it zope.security, and it is a bit much to monkey patch.? Should I call it something like call it something like z3c.gae.security and just tell people to install it in zope.security ? Tim On Thu, Apr 9, 2009 at 11:05 PM, Tobias Rodäbel tobias.rodae...@mac.com wrote: Hi, Shane Hathaway wrote: Hanno Schlichting wrote: Wichert Akkerman wrote: I'ld rather not see a whole slew of extra packagse appear. I also wonder how the extra number of packages and increasing size of sys.path influence performance and restrictions on environments like GAE. For environments like GAE you don't want setuptools and its magic to be part of your application. This is were repackaging your entire app into one zipped egg or some other flat structure comes in handy. Setuptools and eggs are a distribution format from my point of view. They are certainly not the best way to deploy your applications. The growing sys.path is affecting performance to some degree in all deployment environments. Well, zc.buildout ought to be able to eliminate this concern for GAE deployment. I haven't tried the recipe below, but it certainly seems like the right idea. http://pypi.python.org/pypi/rod.recipe.appengine I released a new version today. It's a lot easier now to use several eggs within gae. This test thingy http://zpttest.appspot.com/ uses zope.interface and zope.pagetemplate plus their dependencies. I'm planning to release another sample project maybe during easter holidays. It's much more fun since you zope people cleaned up a lot of dependencies and unveiled zc.buildout. Thanks! Cheers, Tobias ___ Zope-Dev maillist - zope-...@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 )
Re: [Zope-dev] Dependencies for ZCML
Hi I would like to chime in here on the zcml I have managed to get a core stack of zope3 running on gae had to hack a lot of zope.security and zope.proxy to get it there, but it all works quite well I found I had to ignore zope.configuration to get most of the base stack working because the default configure.zcml in most packages introduced a lot of dependancies that weren't always necessary at least for me. In most cases I manually and selectively setup a whole lot of provideAdapter setups to get a minimal working set, Later I found I went back to get a minimal zope.configuration going, becuase it became way to much effort to register all of the base z3c.form components (widgets, dataconverters and terms) that I wanted registered. How is this relevant to to discussion, I found reading the unit tests didn't really enlighten me how many of the packages should be registered in the broader framework and had to rely on the zcml to work it out, however the zcml often pulled in dependancies that where not obvious from other packages because the various registrations and order of registrations that are performed in a normal zope deployment. This means the zcml is pretty important description of how the components are used in the broader context, it also means I think tests that are dependant on the zcml registration working is important, however the downside is the zcml does usually bring in things like browser views, which you may not want and so need to then gut some of the zml. Just my 2c worth T P.S. Sorry about the top posting, I though I was subscribed to the list, but wasn't so didn't have the original posting to reply to ___ 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] RDF Musings and TinyTables
Hi Shane In case your not aware Chandler OSAfoundation is basing their new PIM on RDF/ZODB/Python etc... if you haven't already it might be worth having a look at how they see RDF fitting into the picture. http://www.osafoundation.org/Chandler_rel._0.1.htm See ya Tim On Wed, 2003-02-19 at 03:21, Shane Hathaway wrote: I just read the RDF article published here: http://www.xml.com/pub/a/2003/02/12/rdflib.html I've understood the mechanics of RDF for a while, but never understood what makes it better than what we already have. Now I think I get it: RDF theory is a new kind of database abstraction. It's similar to a relational database in that you put pieces of data into the database and later search for data. But it's much more ad-hoc than a relational database. Serialization of RDF into XML and the relationship between RDF and the Semantic Web are distinct concepts from RDF theory. This ad-hoc data storage made me think of TinyTables. TinyTables is a good Zope product that fills the need for simple tables of data, but it needs attention. What if it got replaced by some Zope product called RDFBucket? An RDFBucket object would let you input data in a variety of ways, including object introspection, forms, and XML with embedded RDF. It would let you run queries similar to ZCatalog. Maybe it would also generate RDF for embedding metadata in web pages. I'm wondering if I'm thinking in line with RDF theory, or if I've veered off track. If you're familiar with RDF: What do you think? Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] 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: [Zope] PCGI?
Hi I have always run Zope behind Apache utilising mod_proxy. I have to admit I never tried or really even evaluated pcgi, and don't build it when I install Zope. Is there a benefit of pcgi over using mod_proxy ? Rgds Tim Hoffman On Fri, 2003-02-14 at 09:16, Jeff Rush wrote: Having only ever used Zope-behind-PCGI myself, if we drop it, what would be the prevailing approach for running Zope behind Apache? Has everyone switched to FastCGI (or Quixote's SCGI) but me? Be aware that there are Zope-specific patches (some of which I provided) in the version of PCGI that Zope ships with, so you can't refer everyone to the non-Zope version of PCGI available elsewhere on the web. The patches relate to error handling and meaningful reporting, not core functionality. -Jeff Dieter Maurer wrote: Jim Fulton wrote at 2003-2-13 11:30 -0500: I'm wondering how PCGI should be supported in Zope moving forward. Do we still need it? I would prefer to drop it (to reduce complexity). ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] 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: [Zope] Time module in python scripts
Hi I wonder why DateTime().parts() results is different to time.localtime(time.time()) or at least returns less info than the latter. It would seem a change to DateTime would be in order ? Tim On Fri, 2003-02-07 at 06:30, [EMAIL PROTECTED] wrote: I hope you all don't mind, but I've moved this to Zope-dev. I would like to propose that it be possible without modification (default behavior) in a future version of Zope to import the time module and its methods safely into TTW Python Scripts. I haven't used this yet in TTW code (I've had to work around it), but it seems like it might be good to un-restrict it, especially for CMF installations that heavily utilize date metadata. time.localtime(time.time()) is, AFAICT, the only way to determine if you are in standard or DST at any point in time during the year. You can't have a page-template appropriately display correct times for content from multiple time-zones without this (I'm sure many CMF installations will need this), and it seems silly to write an external method for this; allowing import of the time module is a good workaround, but I would suggest it be enabled by default in Zope. My particular use-case is AP newswire stories which are in EST/EDT. The timezone offset changes for this twice a year, and having a fixed calculation based upon some assumption of a fixed timezone offset in my own timezone (PST/PDT) won't work. I need to be able to know my own timezone offset to do the math, and for this I need to use time.localtime(time.time())[8] to get it. I'm sure community sites and things like blogs, or anything else that works across the geographic boundaries of differing time zones could use this too. Thoughts? Sean -Original Message- From: Chris McDonough [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 2:01 PM To: Chris Muldrow Cc: '[EMAIL PROTECTED]' Subject: Re: [Zope] Time module in python scripts Apparently. See /lib/python/Products/PythonScripts/README.txt or the Zope Developer's Guide Security chapter for info on how to enable it... - C On Thu, 2003-02-06 at 16:49, Chris Muldrow wrote: I'm trying to do Import time Time=time.time() in a Python Script, but I'm getting login prompts and Error Value: You are not allowed to access time in this context messages. Is the time module one that's restricted in Python Script? Chris ___ Zope maillist - [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] 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-Dev maillist - [EMAIL PROTECTED] 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 - [EMAIL PROTECTED] 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] XMLRPC and Basic Auth problems
I have lodged a collector issue on this Rgds Tim On Fri, 2002-08-16 at 04:31, Nils Kassube wrote: Casey Duncan [EMAIL PROTECTED] writes: The server returns a 200 response status. Strangly, the response headers do include WWW-Authenticate. So, the xml-rpc code must be changing the response status. Yes. It's probably this piece in ZPublisher/xmlrpc.py: --cut-- # Do the damage. self.setBody(f) self._real.setStatus(200) --cut-- Damage, indeed :-) or better :-( ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] XMLRPC and Basic Auth problems
Hi I am working on a project that uses XWT (xwt.org) as a frontend to Zope. XWT uses XMLRPC to communicate with a backend (in this case Zope). XWT expects an Error 401 is authentication is required on an XMLRPC call, so that it can negotiate the correct auth method The author of XWT sent the following email to me Tim, I've got a piece of the answer -- your server needs to return an HTTP 401 (Unauthorized) if no username/password is provided. This response includes the challenge that XWT needs in order to build an authentication request (realm, digest nonce challenge, etc). However what Zope is doing is sending back a fault in the XMLRPC methodResponse packet. So it appears to me that Zope doesn't send a http response 401 for XMLRPC (over http), but will send a 401 back to the browser. XMLRPC doesn't say anything about authentication, so I suppose either method is acceptable. However because XMLRPC is implemented on top of http, I would have thought a http approach (ie error 401) would be used. It appears that this behaviour is fundamental to Zope and is not an artifact of cookie auth in CMF etc.. Is this really correct behaviour ? Regards Tim Hoffman ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] XMLRPC and Basic Auth problems
I have had further from Adam Megacz [EMAIL PROTECTED] the author of XWT on this issue. I believe I should raise a collector issue on this, however do people believe this is a correct assessment of the situation. == Tim Hoffman [EMAIL PROTECTED] writes: The xmlrpc spec doesn't say anything about authentication. ... I suppose this whole area is pretty vague. Actually, it references the HTTP spec, which is quite clear about requiring a 401. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2 Without the 401, you don't know the authentication realm, authentication type, or digest nonce -- three things you need to know in order to authenticate (although the last one is only needed for Digest auth, not Basic Auth). Unfortunately, it seems that a lot of XML-RPC libraries are broken in this manner. I'm working with the Apache people right now on fixing the Java libraries -- could you please work with the Python people to get this fixed? I think this is a result of the fact that HTTP Auth isn't used very often in XML-RPC, although it should be. I'm working on an RFC for XML-RPC, and I will certainly include some wording which underscores the importance of the 401 response. http://www.xwt.org/xmc/draft-megacz-xmc-05.txt - a -- Sick of HTML user interfaces? www.xwt.org = On Thu, 2002-08-15 at 10:47, Tim Hoffman wrote: Hi I am working on a project that uses XWT (xwt.org) as a frontend to Zope. XWT uses XMLRPC to communicate with a backend (in this case Zope). XWT expects an Error 401 is authentication is required on an XMLRPC call, so that it can negotiate the correct auth method The author of XWT sent the following email to me Tim, I've got a piece of the answer -- your server needs to return an HTTP 401 (Unauthorized) if no username/password is provided. This response includes the challenge that XWT needs in order to build an authentication request (realm, digest nonce challenge, etc). However what Zope is doing is sending back a fault in the XMLRPC methodResponse packet. So it appears to me that Zope doesn't send a http response 401 for XMLRPC (over http), but will send a 401 back to the browser. XMLRPC doesn't say anything about authentication, so I suppose either method is acceptable. However because XMLRPC is implemented on top of http, I would have thought a http approach (ie error 401) would be used. It appears that this behaviour is fundamental to Zope and is not an artifact of cookie auth in CMF etc.. Is this really correct behaviour ? Regards Tim Hoffman ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] XMLRPC and Basic Auth problems
Hi Casey I am using Basic Auth with xmlrpc lib now, and yes it does work with Python2.1 but that's not my point. The XML-RPC spec doesn't talk about authentication, and so yes what you say is correct. However Adams position is that the spec says it is implemented on top of http and the http spec says that an error 401 needs to be sent if authentication is invalid etc.. So Adam makes the claim that Zope is not compliant with the http protocol when XML-RPC is used on top of it. And I am inclined to agree. Regards Tim On Thu, 2002-08-15 at 11:47, Casey Duncan wrote: Python's xmlrpclib doesn't support any authentication. It is easily subclassed to include it. I have successfully used it to connect with Zope and I do not have any reason to believe that Zope is broken with regard to authentication. However I do think that Python's xmlrpclib should include basic auth. Perhaps I will make an effort to put this in, since it is so easy. This how-to provides the code for extending xmlrpclib: http://www.zope.org/Members/Amos/XML-RPC It doesn't quite work for Python 2.1+, but I have attached a working version I use. hth, Casey On Wednesday 14 August 2002 10:51 pm, Tim Hoffman wrote: I have had further from Adam Megacz [EMAIL PROTECTED] the author of XWT on this issue. I believe I should raise a collector issue on this, however do people believe this is a correct assessment of the situation. == Tim Hoffman [EMAIL PROTECTED] writes: The xmlrpc spec doesn't say anything about authentication. ... I suppose this whole area is pretty vague. Actually, it references the HTTP spec, which is quite clear about requiring a 401. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2 Without the 401, you don't know the authentication realm, authentication type, or digest nonce -- three things you need to know in order to authenticate (although the last one is only needed for Digest auth, not Basic Auth). Unfortunately, it seems that a lot of XML-RPC libraries are broken in this manner. I'm working with the Apache people right now on fixing the Java libraries -- could you please work with the Python people to get this fixed? I think this is a result of the fact that HTTP Auth isn't used very often in XML-RPC, although it should be. I'm working on an RFC for XML-RPC, and I will certainly include some wording which underscores the importance of the 401 response. http://www.xwt.org/xmc/draft-megacz-xmc-05.txt - a -- Sick of HTML user interfaces? www.xwt.org = On Thu, 2002-08-15 at 10:47, Tim Hoffman wrote: Hi I am working on a project that uses XWT (xwt.org) as a frontend to Zope. XWT uses XMLRPC to communicate with a backend (in this case Zope). XWT expects an Error 401 is authentication is required on an XMLRPC call, so that it can negotiate the correct auth method The author of XWT sent the following email to me Tim, I've got a piece of the answer -- your server needs to return an HTTP 401 (Unauthorized) if no username/password is provided. This response includes the challenge that XWT needs in order to build an authentication request (realm, digest nonce challenge, etc). However what Zope is doing is sending back a fault in the XMLRPC methodResponse packet. So it appears to me that Zope doesn't send a http response 401 for XMLRPC (over http), but will send a 401 back to the browser. XMLRPC doesn't say anything about authentication, so I suppose either method is acceptable. However because XMLRPC is implemented on top of http, I would have thought a http approach (ie error 401) would be used. It appears that this behaviour is fundamental to Zope and is not an artifact of cookie auth in CMF etc.. Is this really correct behaviour ? Regards Tim Hoffman ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) import string, xmlrpclib, httplib from base64 import encodestring class BasicAuthTransport(xmlrpclib.Transport): verbose = 0 def __init__(self, username=None, password=None
Re: [Zope-dev] XMLRPC and Basic Auth problems
Hi Casey Thanks for the note. I had done the snoops myself yesterday and came to the same conclusion. Do you want me to raise the collector issue ? Rgds Tim On Thu, 2002-08-15 at 12:36, Casey Duncan wrote: This tcp dump from an xml-rpc request to the root manage method shows that you are correct: [00:00.000 - client 127.0.0.1:3130 forwarded to :8080] [00:00.002 - server connected] POST /RPC2 HTTP/1.0 Host: localhost:9080 User-Agent: xmlrpclib.py/1.0.0 (by www.pythonware.com) Content-Type: text/xml Content-Length: 100 ?xml version='1.0'? methodCall methodNamemanage/methodName params /params /methodCall HTTP/1.0 200 OK Server: Zope/(unreleased version, python 2.1.3, freebsd4) ZServer/1.1b1 Date: Thu, 15 Aug 2002 04:19:25 GMT WWW-Authenticate: basic realm=Zope Content-Type: text/xml Etag: Connection: close Content-Length: 731 ?xml version='1.0'? methodResponse fault valuestruct member namefaultCode/name valueint-2/int/value /member member namefaultString/name valuestringUnexpected Zope error value: lt;htmlgt;lt;headgt;lt;titlegt;Zopelt;/titlegt;lt;/headgt;lt;body bgcolor=#FFgt; lt;stronggt;You are not authorized to access this resource.lt;/stronggt;lt;pgt; No Authorization header found. lt;pgt;lt;a href=http://www.zope.org/Credits; target=_topgt;lt;img src=http://localhost:9080/p_/ZopeButton; width=115 height=50 border=0 alt=Powered by Zope /gt;lt;/agt;lt;/pgt;lt;/bodygt;lt;/htmlgt; /string/value /member /struct/value /fault /methodResponse [00:00.220 - server closed] The server returns a 200 response status. Strangly, the response headers do include WWW-Authenticate. So, the xml-rpc code must be changing the response status. Here is a transcript of a normal http request to the same method: [00:00.000 - client 127.0.0.1:3133 forwarded to :8080] [00:00.002 - server connected] GET /manage HTTP/1.0 Host: localhost:9080 User-agent: Python-urllib/1.15 HTTP/1.0 401 Unauthorized Server: Zope/(unreleased version, python 2.1.3, freebsd4) ZServer/1.1b1 Date: Thu, 15 Aug 2002 04:24:48 GMT WWW-Authenticate: basic realm=Zope Bobo-Exception-File: /usr/home/casey/Sandbox/Zope/lib/python/ZPublisher/HTTPResponse.py Bobo-Exception-Type: Unauthorized Content-Type: text/html Connection: close Bobo-Exception-Value: bobo exception Etag: Content-Length: 350 Bobo-Exception-Line: 647 htmlheadtitleZope/title/headbody bgcolor=#FF strongYou are not authorized to access this resource./strongp No Authorization header found. pa href=http://www.zope.org/Credits; target=_topimg src=http://localhost:9080/p_/ZopeButton; width=115 height=50 border=0 alt=Powered by Zope //a/p/body/html [00:00.124 - server closed] Now the 401 response status is returned. So, your assertion that Zope does not return a 401 on an unauthorized error over xml-rpc is correct. Whether this behavior is wrong, I am not sure. I would think that if the xml-rpc spec says nothing specific about this, then we should defer to the general http spec, in which case Zope would not be compliant. -Casey On Wednesday 14 August 2002 11:59 pm, Tim Hoffman wrote: Hi Casey I am using Basic Auth with xmlrpc lib now, and yes it does work with Python2.1 but that's not my point. The XML-RPC spec doesn't talk about authentication, and so yes what you say is correct. However Adams position is that the spec says it is implemented on top of http and the http spec says that an error 401 needs to be sent if authentication is invalid etc.. So Adam makes the claim that Zope is not compliant with the http protocol when XML-RPC is used on top of it. And I am inclined to agree. Regards Tim On Thu, 2002-08-15 at 11:47, Casey Duncan wrote: Python's xmlrpclib doesn't support any authentication. It is easily subclassed to include it. I have successfully used it to connect with Zope and I do not have any reason to believe that Zope is broken with regard to authentication. However I do think that Python's xmlrpclib should include basic auth. Perhaps I will make an effort to put this in, since it is so easy. This how-to provides the code for extending xmlrpclib: http://www.zope.org/Members/Amos/XML-RPC It doesn't quite work for Python 2.1+, but I have attached a working version I use. hth, Casey On Wednesday 14 August 2002 10:51 pm, Tim Hoffman wrote: I have had further from Adam Megacz [EMAIL PROTECTED] the author of XWT on this issue. I believe I should raise a collector issue on this, however do people believe this is a correct assessment of the situation
[Zope-dev] Re: [Zope-CMF] CMF Usabiltiy
Hi For what it is worth here are some code snippets from the monkeypatch that adds the basics to show what I have been doing. It is a bit messy and probably not the best way to do it, but this gives you the gist of what is going on. First off I have been monkeypatching the DefaultDublinCoreImpl and adding the following field and method. I also override the behaviour of manageAfterClone # UniqueId - security.declarePublic( 'UniqueId' ) def UniqueID( self ): '''Designing Futures element - UniqueID''' try: return self.unique_id except: return #-- import md5, base64, time, string def ETIMakeUniqueID(id): ''' Generate a unique id ''' oid=md5.new() oid.update(id) oid.update(str(time.time())) oid=oid.digest() oid=string.strip(base64.encodestring(oid)) return 'DF_OID_'+oid.replace('/','$') I need to extend the functionality of manage_afterClone so that if an object is cloned/copied it needs to have the UniqueID regenerated, otherwise we will end up with duplicate ID's (not a good thing) def manage_afterClone(self,obj): obj.unique_id = ETIMakeUniqueID(obj.title_or_id()) Overide the __init__ method in DefaultDublinCoreImpl to include self.unique_id = ETIMakeUniqueID(title) So that the unique id is initialised on object creation. The bind/rebind these methods to the base classes, so that all content types will exhibit this behaviour. DefaultDublinCoreImpl.UniqueID = UniqueID DefaultDublinCoreImpl.__init__ = __init__ Item.manage_afterClone = manage_afterClone Then I set up an Index and Metadata for UniqeID in the portal_catalog. Now any object can be found by UniquID. Irrespective of whats it's path is, by using the catalog. I find also that an awfull lot of the time the metadata is often sufficient without having to retrieve the object. Regards Tim On Fri, 2002-07-12 at 23:44, J C Lawrence wrote: On 12 Jul 2002 14:43:23 +0800 Tim Hoffman [EMAIL PROTECTED] wrote: This is a feature I too wanted, and my solution was to to give every object a unique object ID (new metadata field) which get's updated if the object is cloned. This Object ID is then catalogued, and then content which needs links uses the object Id plus a retrieval method. This way doc's can move anywhere and no broken links. Neat. Smart. Might be a good idea to throw the details and a sample code blob up on the Collector for others to follow. -- J C Lawrence -(*)Satan, oscillate my metallic sonatas. [EMAIL PROTECTED] He lived as a devil, eh? http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live. ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] ?determine if x is a string or array in PythonScript
Hi I must be stupid or something, but I can't for the life of me work out a simple way of determining if a variable contains a string or array, in a PythonScript in Zope. I can't import type and or use type() function. isinstance doesn't work because I can't give a type as the second arg. I obviously just can't see the wood for the trees, can anyone help out this silly individual ? Rgds Tim ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ?determine if x is a string or array in PythonScript
Thanks shane I missed that in the doc's, I have to admit I have done some pretty crusty things in the past to try and work it out, like checking for methods etc.. which always struck me as 1, quite possibly incorrect especially if I got a dictionary with an element with the same name as the method. Also I always thought it terribly inelegant. Should have looked in the source ;-) Thanks again T On Fri, 2002-07-12 at 04:10, Shane Hathaway wrote: Tim Hoffman wrote: Hi I must be stupid or something, but I can't for the life of me work out a simple way of determining if a variable contains a string or array, in a PythonScript in Zope. I can't import type and or use type() function. isinstance doesn't work because I can't give a type as the second arg. Python scripts provide a special function, same_type(), for this purpose. Example: if same_type(s, ''): s = [s] Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Very old version of xmlrpclib.py in Zope has incorrect behaviour
Hi I am trying to use Zope with XWT (www.xwt.org) but the behaviour of xmlrpclib.py in the distribution of Zope (2.5.1) is incorrect. XML payloads which don't have a param/ tag if no parameters are supplied breaks (which is not correct) I have lodged a collector on this http://collector.zope.org/Zope/465 It appears that the more recent versions of xmlrpclib.py have resolved this problem, so could we maybe look at getting the current stable release of xmlrpclib.py in to Zope 2.6 ? Regards Tim Hoffman ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: Zope logic
Hi On Fri, 2002-05-31 at 15:14, Toby Dickenson wrote: On Friday 31 May 2002 4:44 am, Tim Hoffman wrote: But whilst you might think acquisition looks like inheritance it isn't Please don't confuse the two, they really are different, and until you think about them differently, I believe you won't necessarily grasp the significance of acquisition, or use it properly. Agreed. Any tool/language/approach/methodology can be used incorrectly, But today implicit acquisition is forced onto almost every zope class, and every attribute lookup. Sometimes the way to use acquisition correctly is not to use it at all, but that is often an impossible option. These characteristics mean implicit acquisition is not a tool - its a disease. True, however all of my work to date in CMF, I haven't found that acquisition, to be a major problem, except once. However the most problems I have had, are with poorly thought out or poorly documented object hierarchies, so that it is not obvious or clear where and when you should override methods, try manage_afterClone some time, and I know this isn't an acquisition problem, or overriding some of the default behaviour for FTP methods. The lack of documented approach is far worse than the enforced acquisition, IMHO ;-) If how these things work and how to use them, was well documented , then strangeness with acquisition wouldn't be so strange, ie it would be documented and you could get your head around it. (I think we will be in a much better position with Zope 3) Also if it doesn't work the way it is documented you could call it a bug, whereas the current situation is hmm is this how it work or is it a bug, or am I missing something ;-) Rgds Tim Imagine if you couldnt write a C++ class without including operator overloading functions.. I hate C++ ;-) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: Zope logic
Hi On Fri, 2002-05-31 at 16:10, Steve Alexander wrote: Tim Hoffman wrote: However the most problems I have had, are with poorly thought out or poorly documented object hierarchies, You mean class hierarchies. Oops, yep, that's what I meant, so that it is not obvious or clear where and when you should override methods, try manage_afterClone some time, and I know this isn't an acquisition problem, or overriding some of the default behaviour for FTP methods. The lack of documented approach is far worse than the enforced acquisition, IMHO ;-) You'll like Zope3 then. There is no dependency on class hierarchies. The inheritance hierarchies throughout are either very shallow or non-existent. However, none of the power of expressing the affordances of objects is lost. Instead, this is expressed through the interfaces an object implements, which can be definied either in your class definitions, or elsewhere in zcml or in other classes/interfaces. Yeah, I have been following most of the Zope3 discussions. If how these things work and how to use them, was well documented, then strangeness with acquisition wouldn't be so strange, ie it would be documented and you could get your head around it. There is only so much complexity that I can handle at a time. Often working on what should be an isolated part of Zope2 exceeds that threshold. Tell me about it, I really can't do much without keeping an IDLE session going and trolling through all the source, try getting immutable unique ID's working for every object in a CMF site, that when you clone an object you get a new unique ID, man I had some trouble with that, it seemed where manage_afterClone changed in a release or two, so that things stopped working, after an upgrade. Having clearly defined public interfaces will certainly help. See ya T (I think we will be in a much better position with Zope 3) :-) -- Steve Alexander ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: Zope logic
But whilst you might think acquisition looks like inheritance it isn't Please don't confuse the two, they really are different, and until you think about them differently, I believe you won't necessarily grasp the significance of acquisition, or use it properly. Any tool/language/approach/methodology can be used incorrectly, Rgds Tim On Fri, 2002-05-31 at 10:46, Wei He wrote: On Thu, 30 May 2002, Andy McKay wrote: gt; Looking at the zope.org logs, I once saw GoogleBot generate URLs like gt; this to zope.org of 1000 characters or more. Teehee, Googlebot once hit ZopeZen for about 3 days in a continuous loop. Just use absolute_urls. Always. Its one of Zope's golden rules. Mind you I've abused acquistion a few times, it comes in useful to be able to have a different / shorter url point to the same object... I just wonder whether it's possible to add an attribute, say 'inheritable', so that everyone will be happy. I think only then it can be called a 'feature'. Otherwise an obtrusion. Wei He ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [ZPT] Order of attribute execution FeatureRequest
Hi Just my 2c worth, but I would like to defend order of execution of ZPT. What it does mean for me is I can guaruntee zpt commands will always be processed in a known order irrespective of where you put them in a tag, this I like ;-) What I do miss is else clause but I think it would be probably be too hard to implement, and too much of encouragement for people to start putting more logic in the template, so on the whole it is probably best to leave it out. See ya T On Fri, 2002-05-10 at 05:15, Jim Penny wrote: On Thu, May 09, 2002 at 04:07:14PM -0400, Ken Manheimer wrote: On Thu, 9 May 2002, Dieter Maurer wrote: Chris Withers writes: Jim Penny wrote: 2) that is introduces some additional, fairly baroque magic in the order of execution of element type definitions. I would have preferred that they be evaulated/performed in textual order. This is a case where i'd say baroque is intemperate. The documention ( http://dev.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4 ) not only specifically declares the order of operations operations, but it goes on to describe the rationale behind them! Now, if you _disagree_ with the choices, and can cite cases which substantiate your reasoning, then great, file a collector issue! But calling it baroque implies that it's overelaborate and/or obscure to the informed user - neither of which seems, to me at least, to be the case. I'd second that... where do we stick feature requests like this? I would assume it's the Zope collector. I suppose you could add comments in the ZPT wiki, as well. If you see a glaring error, and feel it warrants stirring up a lot of attention, then post something to zope coders - but you've both been pretty vague about your complaints, i don't have the impression you are chafing from some particular error. Now, Ken, I think you ought to reread the thread. Chris has consistently defended ZPT, except for this one feature. I am ambivalent towards ZPT, but have stated that I will be, and am in fact, moving towards using them nearly exclusively. I am in this because I felt that someone was being dumped on for daring to suggest that DTML is at least cosmetically better. I have also said that, while ZPT is not as warty as DTML, ZPT looks, on the surface, to be pretty ugly. I have said that there are three specific things I dislike about ZPT -- 0) lots of things have changed spelling again -- request v. REQUEST, here v. context v. container v. this v. ? 1) infix notation that makes program scansion hard, 2) the order of operations, which I think is baroque. Six levels of precendence for eight statements is pretty amazing. And it is certainly harder to explain/remember than things happen in the order you specify. I will add a fourth nit -- I cannot see why attributes should be plural when every other command is singular. Certainly it feels like attribute ought to be an acceptable spelling of the atttributes command! Now I will turn around and say what I do like about ZPT. Well-formed-ness is indeed nice. The reduction of magic in variable lookup is nice. The | nothing convention is very nice when used content or replace statements -- it makes it very easy to use the same form for both input and error processing -- something that is almost by itself worth the price of admission. In fact, this is not really mentioned in the ZopeBook or ZPT Reference, it is shown only (on page 143) in combination with an unnecessary condition command. I also missed the | default convention that I can see as very useful. My most-missed DTML feature has not been mentioned at all -- it is not loop batching -- it is the dtml-else option of dtml-in -- which made it much easier to handle the nothing found case. I also have not found a convention that I am comfortable with on handling check-boxes and radio buttons in error processing. But I expect to! Jim Penny I think the order is irrelevant because the DOM considers attributes unordered. Not good to implement things against the standard model. Attributes are unordered in the traversal, but of course the processing of the resulting structure (the semantics) is up to the application! And the documentation is very clear about how the application behaves - with good motivation. Furthermore, changing this facet in the implementation will break lots of exiting templates. Where do we condemn feature requests like this? :-) I imagine whoever is responsible for PageTemplates will float a proposal for changes if they're convinced any are necessary. -- Ken [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists -
Re: [Zope-dev] ZPT and 'else'
The big problem with the whole 'else' issue as I see it, is that non coders, using dreamweaver etc.. would no doubt end up with both bit's of html in their template. T On Fri, 2002-05-10 at 11:39, Marc Lindahl wrote: Yecch! Why not: if ... True stuff /if else False stuff /else If leaves around boolean result, else picks up the most recent one... It's like they push on a stack so you can nest them Something like that? on 5/9/02 11:10 PM, Jeffrey P Shell at [EMAIL PROTECTED] scrivened: 'else' is tricky within the block oriented structure of anything XML-ish, because of the concept of 'well-formedness'. The 'if' statement would have to be singly wrapped, and the else block wrapped separately, looking at least somewhat awkward any way you go about it. The best I can come up with in my mind is this, in order to have the 'else' pick up on the condition expressed in its surrounding container. But, yuck: if ... true stuff else false stuff /else /if A good page template way is something like this: tal:if condition=myTalesExpression truth /tal:if tal:else condition=not:myTalesExpression false /tal:else The 'not' TALES namespace is valuable. The downside is that you evaluate the expression twice. A good way to work within this is something that I did earlier today, outside of this conversation, where I evaluate an expression earlier and assign it to a variable: div id=edit-area tal:define=editItems python:here.getMenuItem(...) h3Edit Menu Items/h3 form action=Delete method=post name=actForm tal:condition=editItems ... (form and table elements, and a loop over editItems contained in here if there were results) ... /form div class=emph tal:condition=not:editItems No menu items available /div /div This is something I did a lot in DTML too, setting a search result to either a global variable, or inside of a large dtml-let namescape ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [ZPT] Order of attribute execution FeatureRequest
HI Jim It's a good point you raise. I personally don't consider tal: and metal: tags to really be a traditional programming language, more a way of including directives and/or python into an XML/html namespace. I think it would depend if you consider each tal: statement in a tag to be all part of a single statement. I view it as being a number of seperate attributes in a xml/html tag, and attributes within a tag are typically order independant. ie img src=file.gif border=0 vspace=1 hspace=1 or img border=0 vspace=1 hspace=1 src=file.gif render exactly the same thing. In addition event handlers in html ie onClick onBlur etc are all order independant. now adding tal: attributes that where order dependant would seem to fly in the face of that convention. (Admittedely there are probably no strange dependancies that could be introduced with different orders of border, src etc) It would also be potentially dangerous have specific authored ordering when non programmers start editing page templates, and accidentally change the order of tags because they looked nice in a different order, or when someone uses a graphical html editor, I have seen ones, where you are given a nice dialog box to edit attributes of a tag, and when it write the values back it always writes them in it's internally specified order not the order you specify. This I would imagine could introduce all sorts of nasty bugs. On the basis of in place ordering would it also mean that a attribute should be declared before a tal:attributes could be used. Within an attribute ie tal:define the statements are executed in the order they are specified, which does make sense. I suppose I have put forward more than 2c now ;-) T On Fri, 2002-05-10 at 09:30, Jim Penny wrote: On Fri, May 10, 2002 at 09:07:26AM +0800, Tim Hoffman wrote: Hi Just my 2c worth, but I would like to defend order of execution of ZPT. What it does mean for me is I can guaruntee zpt commands will always be processed in a known order irrespective of where you put them in a tag, this I like ;-) Would you defend a python interpreter that always moved definitions ahead of conditionals ahead of loops? Does even a intentionally limited templating language have the right to second-guess the programmer and re-arrange the order of written commands? Yes, I am aware that 'C' and fortran and many other languages may do rearrangement of arithmetic expression, and that this may be side-effectful. But, can you point me to any other language that reorders looping and conditionals? Jim What I do miss is else clause but I think it would be probably be too hard to implement, and too much of encouragement for people to start putting more logic in the template, so on the whole it is probably best to leave it out. See ya ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] A modest proposal: Replace medusa with Twisted
There is another approach however for getting Java and Zope together A few weeks back I was mucking around with the Python Java Extension (see Python 9 proceedings) and was able to interact with Java classes/instances directly from Zope by calling ExternalMethods. PJE basically allows the Java vm to be loaded into the python interpreter. Tim I can speak about this one... The difficult part of getting Zope to w ork on Java, IMHO, is not the server. Without too terribly much work, I think you could get a servlet in front of Zope (once you've taken care of all of the other things). We've made some progress toward getting Zope running on Java (http://www.phabric.org). The past few weeks, phabric has been on the back burner at Web Elite because of unrelated paying work. There are two main areas of work in getting Zope on top of Java: the C modules and differences between C Python and Jython. We've made quite a bit of progress in both of those areas, but there's still more to be done before Zope will fire up and answer a request. Kevin Tim Hoffman Zute Pty Ltd mobile: 0411 06 fax:+61 8 6210 1883 email: [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Read only ZEO
HI Dieter I had a look at z2.py (it's actually -r) so any way I tried (not too successfully). I have zeo running with 2.4.1 I have a zss and 2 zeo clients. One running without -r switch and one running with -r In z2.py the -r switch is documented as follows -r Run ZServer is read-only mode. ZServer won't write anything to disk. No log files, no pid files, nothing. This means that you can't do a lot of stuff like use PCGI, and zdaemon. ZServer will log hits to STDOUT and zLOG will log to STDERR. Well when running a zeo client with -r switch results in no log files being written and the log is written to STDOUT, but the ZEO client is definately not in readonly mode ie I can create and modify documents. (It probably means it can;t cache to disk ;-) I need to track down where READ_ONLY flag is used. There isn't an occurrance with the ZEO code, so unless the READ_ONLY capability is implemented higher up in the transaction service, thenI think it isn't going to work. This document http://www.amk.ca/zodb/zodb-zeo.html which is linked to on the Zeo Product page actually mentions using Zeo client in readonly mode. I wonder if anyone has actually done it? Tim Dieter Maurer wrote: Tim Hoffman writes: In some of the overview documents discussing ZEO, there is reference to a ZEO client potentially mounted a ZSS in read only mode. (I want to have some ZEO's in read/write as well) When you start Zope with the -R option (I think, look at z2.py!), it is in read-only mode. I have been trying to work out how this might be achieved but have pretty much drawn a blank, has anyone done this I have any idea how I might go about doing such a thing. There is a patch at http://www.dieter.handshake.de/pyprojects/zope which allows Zope to be started with a read only storage. Maybe, you can adapt it for ZEO. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Read only ZEO
Hi In some of the overview documents discussing ZEO, there is reference to a ZEO client potentially mounted a ZSS in read only mode. (I want to have some ZEO's in read/write as well) I have been trying to work out how this might be achieved but have pretty much drawn a blank, has anyone done this I have any idea how I might go about doing such a thing. I ideally I would like to control what clients can connect and whether read only or read/wright by IP and/or some token RGds Tim -- Tim Hoffman Zute Pty Ltd mobile: 0411 06 fax:+61 8 6210 1883 email: [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )