Re: [Zope-dev] Observable Interface?
Tres Seaver wrote: Chris Withers [EMAIL PROTECTED] asked: Does anyone know what happened to it and how far its implementation got? The preliminary implementaion, DefaultObservabale, landed as a mix-in class in Zope 2.2: $ZOPE_HOME/lib/python/OFS/DefaultObservable.py Mix it in to one of your Python base classes (be sure to get it's '__init__()' called!) and fire away. Where are the docs? Hwo does it work? I am currenly working on the more ambitious notion of adding an event channel, which addresses some of the "MxN" problems which plague the classic Observer. See the Zope-PTK archives for August for the latest on that. Looked... any further progress? cheers, Chris ___ 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: Discussion Story Building Mediums
Michael Bernstein wrote: After some more thought, I realized that this really needs to be a three-way gateway betrween a mailing list, a 'blog, and a newsgroup. I'm all up for doing the mailing list/weblog type bits but I have no idea how news _works_ and how it could be integrated into the Zope environment... Any ideas? cheers, Chris ___ 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] RFClarification: Security on Product Attributes
Okay, apologies in advance for picking up a thread that's been dorman for so long ;-) Jim Fulton wrote: Chris Withers wrote: self.id = id self.title = 'Title!' self.anInt = 0 self.aString = 'testing' None of the values above can have a __roles__ attribute, so they are covered by assertions made in their containers. That's what I thought Note that if you can't adequately control something that can't have __roles__, you can provide an access function (e.g. getAnInt), which you can control Can I read them? I think the answer is yes for anInt and no for aString. Probably, if you can get at one, you can get at the other. That's not my experience. If you try and use strings, you get dialog boxes popping up. If you use ints, it works fine. So, the problem is how to protect ints when you don't want people to get at them... Adding accessors mean you have protected accessors bu there's nothing to stop you just going and using the freely available original attribute. Strings; fine, at least they're secure, and when they become proper objects in Python 2.0, the problem should go away? cheers, Chris ___ 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] Observable Interface?
On Fri, 10 Nov 2000, Chris Withers wrote: Tres Seaver wrote: Chris Withers [EMAIL PROTECTED] asked: Does anyone know what happened to it and how far its implementation got? The preliminary implementaion, DefaultObservabale, landed as a mix-in class in Zope 2.2: $ZOPE_HOME/lib/python/OFS/DefaultObservable.py Mix it in to one of your Python base classes (be sure to get it's '__init__()' called!) and fire away. Where are the docs? Hwo does it work? The docs are in the interfaces wiki: http://www.zope.org/Members/michel/Interfaces/ObserverAndNotification (Note that this actually predates the fishbowl process -- this has been in Zope for a lng time). I am currenly working on the more ambitious notion of adding an event channel, which addresses some of the "MxN" problems which plague the classic Observer. See the Zope-PTK archives for August for the latest on that. Looked... any further progress? Nope, the PTK work I have been able to do lately is all stabilization. I am working an a new "PTK Fishbowl" site, where such proposals can be tracked more cleanly. Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" http://www.zope.org ___ 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] Observable Interface?
Tres Seaver wrote: The docs are in the interfaces wiki: http://www.zope.org/Members/michel/Interfaces/ObserverAndNotification (Note that this actually predates the fishbowl process -- this has been in Zope for a lng time). Actually at: http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotification /pedant ;-) Does this mean all of the classes in the diagram at that URL have been implemented? How come the Catalog doesn't use it so CatalogAware (bleugh!) isn't needed anymore? Also, is there any documentation about how to actually use the Observable interface? (excuse my ignorance if I've missed it...) Nope, the PTK work I have been able to do lately is all stabilization. I am working an a new "PTK Fishbowl" site, where such proposals can be tracked more cleanly. Cool :-) Chris ___ 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] RFClarification: Security on Product Attributes
Chris Withers wrote: Okay, apologies in advance for picking up a thread that's been dorman for so long ;-) Jim Fulton wrote: Chris Withers wrote: self.id = id self.title = 'Title!' self.anInt = 0 self.aString = 'testing' None of the values above can have a __roles__ attribute, so they are covered by assertions made in their containers. That's what I thought Note that if you can't adequately control something that can't have __roles__, you can provide an access function (e.g. getAnInt), which you can control Can I read them? I think the answer is yes for anInt and no for aString. Probably, if you can get at one, you can get at the other. That's not my experience. There's something very odd going on. The issue isn't stringness or intness but role-less-ness. :) If you try and use strings, you get dialog boxes popping up. If you use ints, it works fine. I've never seen this. So, the problem is how to protect ints when you don't want people to get at them... Adding accessors mean you have protected accessors bu there's nothing to stop you just going and using the freely available original attribute. Yes there is. Access to attributes is controlled by the roles if their container. You should also be able to create specific unprotected attribute assertions using the mechanism described in: http://www.zope.org/Members/michel/Projects/Interfaces/ZopeSecurityPolicy I'll admit that I haven't tried this. If you try it soon (like today) and find it broken, we can fix it for Zope 2.2.3. Strings; fine, at least they're secure, and when they become proper objects in Python 2.0, the problem should go away? Will Python 2.0 let you assign string attributes? Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! Technical Director (888) 344-4332http://www.python.org Digital Creationshttp://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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] Exceptions
I was just building in some error handling into some UI code, and wanted to catch errors relating to duplicate ids. The problem is that just about every client-side error raises the same kind of Exception, a 'Bad Request'. A quick grep counted 41 different types of 'Bad Request' in my Zope source. Wouldn't it be *much* nicer to have a hierarchy of exception types, so that applications can deal with them at an arbitrarily granular level? e.g. ZopeException | `RequestException | | | `XMLException | `IdException | | | `ReservedWordException | `DuplicateException Has this discussion taken place before? Would it be useful? Would its effort:benfits ratio be too great to justify doing? seb ___ 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] Exceptions
Oh if only!!! I love this idea, and comments haev coem from DC along those same lines, btu nothing ever really happened about it... cheers, Chris seb bacon wrote: I was just building in some error handling into some UI code, and wanted to catch errors relating to duplicate ids. The problem is that just about every client-side error raises the same kind of Exception, a 'Bad Request'. A quick grep counted 41 different types of 'Bad Request' in my Zope source. Wouldn't it be *much* nicer to have a hierarchy of exception types, so that applications can deal with them at an arbitrarily granular level? e.g. ZopeException | `RequestException | | | `XMLException | `IdException | | | `ReservedWordException | `DuplicateException Has this discussion taken place before? Would it be useful? Would its effort:benfits ratio be too great to justify doing? seb ___ 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] Fw: 2gb file size
Itamar Shtull-Trauring wrote: Shane Hathaway wrote: Not long ago I created a wrapper around File objects which automatically splits the file before it reached a predefined limit. It could handle any number of partitioned file segements. Yes please! Perhaps it could be integrated into the ZODB codebase while you're at it? I'm working on cleaning it up so that it integrates cleanly with FileStorage. Then I'll release it. BTW your roadmap document is fantastic. I hope you're getting lots of good feedback. It really brings everything together. 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 )
RE: [Zope-dev] Exceptions
snip good idea about exception hierarchies Oh if only!!! I love this idea, and comments haev coem from DC along those same lines, btu nothing ever really happened about it... If there are people willing to work on this, then a proposal would be most welcome... http://dev.zope.org/Wikis/DevSite/Proposals/FrontPage Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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] RFC : ZPatterns Customer Relationship Management Framework
Thanks a lot for all the guidance on ZPatterns so far. Our company is building a Customer Relationship Management system using ZOPE and ZPatterns. We have a object model and basic Dataskins and Specialists in place. At this point we thought it a good idea to share the object model with the Zope community and invite comments since we will be giving it back to the Zope community. Go to http://www.zope.org/Members/sparroy/CRM to download a pdf of the model and make some comments. Roché ___ 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] ZODB, Threads and Persistence
Hi. Reading from Jims 'Introduction to the Zope Database': "An object's state may be freed at any time by the ZODB to conserve memory usage." What does this mean? That the object can be freed even though there are references to it? The reason I'm asking is becase I want to use threads and persistence together. I would like to inherit both threading.Thread and Persistence.Persistent, but that gives an error. I guess thats because of the ExtentionClass. However, if i only inherit Persistence.Persistent and starts a thread using the thread module withing the persistent class, what will happen with it? Can the ZODB still decide to free my persistent object even thoght it has a reference to a thread that is running?? Or can I start my thread when the object first is used, and rely on that it will be running until I stop it or remove any reference to it? /Magnus ___ 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] Best way to start on ZPatterns ?
Hi Nigel, Yes.. the example still works. I am working on an update that incorporates some of the suggestions folks have made and better illustrates some ZPatterns concepts. Basically the example is *too* simple, and it doesn't separate PD, and UI issues very well.. -steve "Nigel" == Nigel Head [EMAIL PROTECTED] writes: Nigel OK, I've finally got a little leisure to re-assess my way Nigel of making Zope apps (which so far has been 99.9% ZClasses) Nigel and it seems the way to go might be ZPatterns. In true Zope Nigel tradition the docs (at least the simple docs) seem to leave Nigel quite a steep learning curve :-) Nigel After searching the zope-dev mail for a while I've happened Nigel on the thread from Steve S. describing the simplest example Nigel he could think of. Is this still a valid example for the Nigel current version of ZPatterns? Nigel -- Nigel Head Houbits Hi-Tech Servers [EMAIL PROTECTED] Nigel ___ Zope-Dev Nigel maillist - [EMAIL PROTECTED] Nigel http://lists.zope.org/mailman/listinfo/zope-dev ** No cross Nigel posts or HTML encoding! ** (Related lists - Nigel http://lists.zope.org/mailman/listinfo/zope-announce Nigel 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 )
[Zope-dev] [Fwd: [Zope] DataSkin Supplier?]
Erk... meant this for zope-dev :-S Chris Withers wrote: Hello... Okay, I'm still staring up at the ZPatterns learning cliff as I write this so forgive my ignorance. I'm looking at ZPatterns WRT to 'dynamically generated dataskins'. You what? Well, okay, I'll try and explain... Firstly, I'm assuming that DataSkins (or their subclasses?) are first-class zope objects, can be 'added', copied, pasted, have security tabs, can be catalogued, URL traversed, etc, etc. Is that assumption correct? I hope so :-S If it is, is there something which can generate DataSkins on the fly? ie: in the same way an AttributeProvider supplier attributes to an object, is there something like a 'DataSkin provider' which provides whole dataskins to a folderish object? Finally, and this is the important bit. Can one of these folderish objects also _be_ a DataSkin? So, to word it differently, there is a root 'DataSkin provider'. This provides DataSkins which are folderish and are also 'DataSkin providers' themselves. Why do I want this? Well, think objects in a tree where the parents/children are stored as a list of names refering to other objects. In addition, objects may have multiple parents, etc... Any ideas? Where should I start reading? cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ 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] RFClarification: Security on Product Attributes
Jim Fulton wrote: Strings; fine, at least they're secure, and when they become proper objects in Python 2.0, the problem should go away? Will Python 2.0 let you assign string attributes? % python Python 2.0 (#3, Oct 26 2000, 15:07:09) [GCC 2.95.2 19991024 (release)] on sunos5 Type "copyright", "credits" or "license" for more information. a='' a.foo='bar' Traceback (most recent call last): File "stdin", line 1, in ? TypeError: object has read-only attributes -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ 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] Observable Interface?
On Fri, 10 Nov 2000, Chris Withers wrote: Does this mean all of the classes in the diagram at that URL have been implemented? How come the Catalog doesn't use it so CatalogAware (bleugh!) isn't needed anymore? Heh, because we would have to make far-reaching changes (essentially, add an event channel :) to make CA redundant; otherwise, the catalog has no way to know *which* objects to observe (not to mention the problem of maintaining tens of thousands of point-to-point subscriptions within the catalog). Chris Petrilli is working on a fishbowl proposal for CatalogNG; I'm pretty sure he intends to adopt some kind of observer/event scheme to make it work. Also, is there any documentation about how to actually use the Observable interface? (excuse my ignorance if I've missed it...) Again, the wiki is it; the code deployed in Zope 2.2 implements the Observable interface, and is intended to be used as a mix-in, like so: from OFS.SimpleItem import SimpleItem from OFS.DefaultObservable import DefaultObservable class Foo( SimpleItem, DefaultObservable ): """ Some foo or other """ ... def bar( self, ... ): """ """ ... self.notify( "bar" ) Clients register with a Foo instance using the methods of the Observable interface, e.g.: foo.registerObserver( self.getPhysicalPath() + ( 'watchFoo',) ) When the Foo instance has its 'bar()' method called, it will notify all registered observers, passing 'bar' as the event; in this case, the client's 'watchFoo()' method will be called, with the foo object and 'bar' passed as parameters. (Thanks for the prodding -- I just checked in a docstring containing the substance of this email.) Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" http://www.zope.org ___ 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] ZODB, Threads and Persistence
AFAIK, you should be able to spawn a new thread from within any function within Zope and manipulate stuff in the ZODB as long as you lock properly. The number of database connections is fixed, but arbitrary threads can take up a database connection on an ad-hoc basis. If I were you, I'd mess around a little bit by spawning threads within a Product, and causing the thread to manipulate ZODB objects, keeping locking in mind. I've done this on a limited basis and it seems to work. Specifically, an object may be "ghosted" if it hasn't been accessed in a while. That doesn't mean its state goes away, it just means that it needs to reload its state when it's accessed again. Your manipulation of the object in a separate thread should prevent the object from being ghosted. - Original Message - From: "Magnus Heino (Rivermen)" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 10, 2000 10:35 AM Subject: [Zope-dev] ZODB, Threads and Persistence Hi. Reading from Jims 'Introduction to the Zope Database': "An object's state may be freed at any time by the ZODB to conserve memory usage." What does this mean? That the object can be freed even though there are references to it? The reason I'm asking is becase I want to use threads and persistence together. I would like to inherit both threading.Thread and Persistence.Persistent, but that gives an error. I guess thats because of the ExtentionClass. However, if i only inherit Persistence.Persistent and starts a thread using the thread module withing the persistent class, what will happen with it? Can the ZODB still decide to free my persistent object even thoght it has a reference to a thread that is running?? Or can I start my thread when the object first is used, and rely on that it will be running until I stop it or remove any reference to it? /Magnus ___ 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 )
[Zope-dev] Re: question re problem adding zwiki webs
Re this error when adding a zwiki web: Error Type: KeyError Error Value: H?v`H?v$y_?-006412673360557 Content-Disposition: form-data; name="wiki_type" basic Tony McDonald [EMAIL PROTECTED] writes: It is a Mac actually. IE 5.0. I've just asked a colleague to try creating a ZWikiWeb on his PC and it's worked fine! I do have other problems with IE 5.0 in that it has a limit on the number of things I can 'copy' and 'paste' - in general I don't bother doing it and export and reimport folders etc. I'd really like to know why it's behaving like that, I do have a *lot* of cookies in my IE and have also heard that the sequence in which HTTP headers are sent to IE can be an issue to (sigh) Thanks, that helps a lot! To narrow it down, if not to solve it :( It does appear that the problem is not with zwiki, but that HTTP form data headers are being sent in some unusual format and confusing zope. I wonder if you experience mac-IE-specific problems with other zope forms or forms in general. I suppose it could be related to your cut/paste problems. I'm cc'ing the list, perhaps someone knows more. Cheers, -Simon ___ 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] DTML processing variable
If this is your exact code, it looks like you should be using "sequence-item", instead of "sequence_item". You should also be able to do it without the external method like this: (100% untested) dtml-in expr="_.string.split(acctUsersEmail)" dtml-var name="sequence-item" /dtml-in "David W. Damon" wrote: Hey all, I'm having difficulty getting dtml-in to iterate over a list of strings returned from an external python method. Essentially, I have a string that is comprised of the contents of an HTML text area. I need to split the string into a list of words and iterate over this list. My external python method is this: def stringSplit( self, theString ): return string.split( theString ) Heres the pertinent DTML. --- dtml-call expr="REQUEST.set( 'userList', stringSplit(acctUsersEmail))" dtml-in userList dtml-var sequence_item /dtml-in dtml-var REQUEST --- If I comment out the dtml-in block, i have a userList variable in the REQUEST object that is something like: ['name1', 'name2', 'name3'] Any ideas? -- dave ___ 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 ) -- Paul Erickson | [EMAIL PROTECTED] Kaivo, Inc. | www.kaivo.com ___ 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] ZODB, Threads and Persistence
AFAIK, you should be able to spawn a new thread from within any function within Zope and manipulate stuff in the ZODB as long as you lock properly. I guess I wasn't clear enough, but my application isnt within zope, im just using zodb and some more components out of it. Specifically, an object may be "ghosted" if it hasn't been accessed in a while. That doesn't mean its state goes away, it just means that it needs to reload its state when it's accessed again. Your manipulation of the object in a separate thread should prevent the object from being ghosted. But I guess this still will be the same anyway. That is, if an object inhereted from Persistence.Persistance spawns a thread that manipulated data in the object, I will have no problems. The thread will be running just fine, and the data will be stored in the zodb. ? /Magnus - Original Message - From: "Magnus Heino (Rivermen)" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 10, 2000 10:35 AM Subject: [Zope-dev] ZODB, Threads and Persistence Hi. Reading from Jims 'Introduction to the Zope Database': "An object's state may be freed at any time by the ZODB to conserve memory usage." What does this mean? That the object can be freed even though there are references to it? The reason I'm asking is becase I want to use threads and persistence together. I would like to inherit both threading.Thread and Persistence.Persistent, but that gives an error. I guess thats because of the ExtentionClass. However, if i only inherit Persistence.Persistent and starts a thread using the thread module withing the persistent class, what will happen with it? Can the ZODB still decide to free my persistent object even thoght it has a reference to a thread that is running?? Or can I start my thread when the object first is used, and rely on that it will be running until I stop it or remove any reference to it? /Magnus ___ 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 ) -- /Magnus Heino ___ 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] ZODB, Threads and Persistence
But I guess this still will be the same anyway. That is, if an object inhereted from Persistence.Persistance spawns a thread that manipulated data in the object, I will have no problems. The thread will be running just fine, and the data will be stored in the zodb. This is how I've experienced it. :-) ___ 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] Security/Acquisition Bug? (take two)
I had posted about this previously, but no one has tackled this one, it seems to be a pretty serious issue, plus I've done a *lot* of poking around and learned a few things since I first reported it. What I have *not* found (or been told) is that the below described behavior is normal. First a simple exercise for those who would like to avoid my laborious novice Zoper description and just ferret out the likely bug: Create a fresh CVS copy of Zope on your *nix box. Build it (python wo_pcgi.py), configure 'start' with the ports of your choosing, set a superuser password, start Zope and try to visit the /index_html page. What I'm getting at that point is a BASICAUTH login box. One has to explicitly enable anonymous permissions on the index_html page in order to view it without logging in. I've read through all the security model discussion I could find, but saw no discussion of this issue. If somehow this behavior is intentional, I would greatly appreciate a clue to that effect. (Some response either way would be nice, actually...) Based on my recent flailings with LoginManager and finally, stock acl_users in Zope v2.2.cvs, it seems there this problem relates to the "scope" of acl_users and/or its parent folder not including the objects within. The security settings of the parent folder are apparently not regarded in determining access to objects within. Instead, acl_users is only impacting its sibling objects (and presumably their child objects). Apologies if I'm making the wrong noises in the wrong place in the wrong way. Any help or pointers welcome. -cw- -- ~ Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer... Visit the Radio For Peace International Website: http://www.rfpi.org/ ~ CLOBBER INTERNET SPAM: See!! http://spam.abuse.net/ Join!! http://www.cauce.org/ ~ QOTD: "Bush is a big corporation disguised as a human being running for president." -- Ralph Nader on David Letterman (9/28/00) ___ 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] PythonMethods: Can't Slice context.REQUEST.PARENTS
I cannot slice context.REQUEST.PARENTS The reason I want to do this is to travel up the URL tree for a breadcrumb navigation do-hicky. I want to slice it so I can make a copy because if I just do ...reverse() on it, I screw up everything afterwards. It says I'm unauthorized (Guarded.py __careful_getattr__) so I assume this is a feature. I suppose I can just .reverse() it back again at the end, but it seems.wrong some how. Attached is my code at the moment...it sucks, I know. This is python project numero uno and zope project duo... If anyone has a better example of how to hand text (I'm using buff and returning it) back, I'd appreciate it. I'm much to tired, so off I go to bed... Ciao! -- Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. -- Wernher von Braun The Doctor What: fill in the blank http://docwhat.gerf.org/ [EMAIL PROTECTED] KF6VNC paramsbuff='',lose=1/params """ This is a breadcrumb generator. A breadcrumb trail is what you get at yahoo as you traverse downward in their directory structure: computers-video-blah-etc. It shows you where you are in your site. My breadcrumbs shall follow these rules: 1) The current DTML Document shall be the last item. It will not be a link. 2) If the current DTML Document isn't index_html, then the parent crumb will be the index_html for the folder 3) All crumb names are overridable by setting the 'nickname' attribute. 4) The root folder will always be called "Home" Ciao! [EMAIL PROTECTED] """ ## Start being crumb-y! buff = "\n!-- start Breadcrumbs --\n[ " # Get the list of parents and reverse it list = context.REQUEST.PARENTS[:] list.reverse() # Iterate over all the parent objects, skipping the 'current'one # (see below for dealing with that for x in range(lose,len(list)-1): obj = list[x] url = obj.absolute_url() name = obj.title_or_id() buff = "%s\n - a href='%s'%s/a" % (buff, url, name) # Deal with the 'current' object(s) obj = list[-1] buff = "%s\n'%s'" % (buff, obj) buff = "%s\n'%s'" % (buff, context.id) if obj != context: buff = "%s\n - '%s'" % (buff, obj.title_or_id()) buff = "%s\n - '%s'" % (buff, obj.title_or_id()) buff = buff + "\n]\n!-- end Breadcrumbs --\n" return buff