RE: [Zope-dev] 2.7.0 corrupt Data.fs
[Thomas Anderson] > I'm seeing changes to the ZODB getting lost on reboot. I think it's > because there are no fsync() calls being issued by Zope or even by > zopectl on stopping Zope but I can't be sure. I'm using > /instance/bin/zopectl {start|stop} for controlling Zope. > > I added a "sync" command to my /etc/init.d/umountfs script (Debian > Woody) and this seems to have fixed the problem. I know postgresql > syncs to disk for every transaction by default, does Zope? ZODB does, as you can see in your installation's FileStorage.py FileStorage._finish method. Which version of Python are you using? If you're using one of the early 2.3 releases, that would explain it; from the NEWS file for Python 2.3.2: - A bug in the autoconf machinery meant that os.fsync was never available. 2.3.3 should be used now. ___ 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] 2.7.0 corrupt Data.fs
I'm seeing changes to the ZODB getting lost on reboot. I think it's because there are no fsync() calls being issued by Zope or even by zopectl on stopping Zope but I can't be sure. I'm using /instance/bin/zopectl {start|stop} for controlling Zope. I added a "sync" command to my /etc/init.d/umountfs script (Debian Woody) and this seems to have fixed the problem. I know postgresql syncs to disk for every transaction by default, does Zope? Tom ___ 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] TypeErrors during 'make test'
On Fri, 2004-02-13 at 14:38, Evan Simpson wrote: > I'm getting several TypeErrors when I run 'make test' on the HEAD. Each > of them involves a call to cAccessControl's 'validate' with 'roles' set > to a PermissionRole instance, complaining that it's not iterable. > > Any ideas? These tests have been failing for weeks. I'm not sure what the actual cause of the failure is. The symption is that validate() is being passed a single PermissionRole object as its roles argument. validate() expects roles to be a sequence and fails with a TypeError "iterable argument expected" when it sees the PermissionRole. What isn't clear to me is if the argument should be a Python sequence that contains a PermissionRole or if it should be an imPermissionsRole, which is a sequence. I don't understand the code well enough to know which of these is more likely. Jeremy ___ 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] TypeErrors during 'make test'
I'm getting several TypeErrors when I run 'make test' on the HEAD. Each of them involves a call to cAccessControl's 'validate' with 'roles' set to a PermissionRole instance, complaining that it's not iterable. Any ideas? Cheers, Evan @ 4-am ___ 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] This is a good time for people who care about packaging to get involved ;)
This would be a good time for people interested and knowledgeable about packaging systems and who want to influence the direction we take with Zope 3 to get involved. :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ 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] Strange loop with ZCatalog
On Fri, 13 Feb 2004 19:10:07 +0100 Pascal Samuzeau <[EMAIL PROTECTED]> wrote: > Hi Casey, > > Yes it doesn't lie at all, but i've tried till I suppress all and even > with 2 it suppressed only one. > > Can you tell me more about your message, I haven't found it. Bud, Google is your friend: http://aspn.activestate.com/ASPN/Mail/Message/zope-List/1993758 -Casey ___ 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] Strange loop with ZCatalog
Hi Casey, Yes it doesn't lie at all, but i've tried till I suppress all and even with 2 it suppressed only one. Can you tell me more about your message, I haven't found it. Cheers PS -- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com ___ 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] https with zope 2.7
That was easy. To get Zope 2.7 working behind the Pound SSL proxy: HTTPS ON On Fri, 2004-02-13 at 01:06, Thomas Anderson wrote: > A fairy clean way did exist in 2.6.x to get zope to generate "https:" > instead of "http" in self referencing URLs, using Pound, and without > standing on one leg and shaking a rattle at apache mod_proxy / rewrite. > > http://mail.zope.org/pipermail/zope/2004-February/thread.html#146614 > > The magic in z2.py happened by adding a new HTTPS server with: > > +try: > +del HTTPS_ENV['HTTP'] > +except KeyError: > +pass > +HTTPS_ENV['HTTPS']='ON' > > I'm not seeing an easy way to achieve the same in Zope 2.7, or perhaps > I'm just not as familiar with the code yet. Could someone point me in > the right direction?? > > Tom > > > ___ > 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] restrictedTraverse doesn't give the good container.
Please don't cross-post. You already posted this exact question to [EMAIL PROTECTED], and received two replies to which you did not follow up. On Fri, Feb 13, 2004 at 12:56:13PM +0100, Pascal Samuzeau wrote: (snip) > I have no time to have a look on this, but anyone have seen this > problem and resolved it? Why should we have time to fix your problem when you apparently don't have time to respond to our replies? -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's PICO-SLIPPERY EATER! (random hero from isometric.spaceninja.com) ___ 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] Strange loop with ZCatalog
On Fri, 13 Feb 2004 16:14:05 +0100 Pascal Samuzeau <[EMAIL PROTECTED]> wrote: > Hi, > > > > I already replied to this, but I never heard back from you. > > I haven't seen your answer before, I'll search for it. That's ok. I think there are inconsistencies in the loop code. In my message I explained what didn't make sense to me. > > What does the following return for a value: > > > > len(list(context.TheCatalog.searchResults(Type='TypeTest'))) > > Just for now 62418. > > len (context.TheCatalog.searchResults(Type='TypeTest')) returns 62418 > too. Good, so that means that len() of the result set isn't lying. -Casey ___ 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] https with zope 2.7
I suspect you can put "HTTP ON" in the section of zope.conf. There isn't any way now to get rid of "HTTP" if it exists in the same namespace, though. Is that necessary? On Fri, 2004-02-13 at 01:06, Thomas Anderson wrote: > A fairy clean way did exist in 2.6.x to get zope to generate "https:" > instead of "http" in self referencing URLs, using Pound, and without > standing on one leg and shaking a rattle at apache mod_proxy / rewrite. > > http://mail.zope.org/pipermail/zope/2004-February/thread.html#146614 > > The magic in z2.py happened by adding a new HTTPS server with: > > +try: > +del HTTPS_ENV['HTTP'] > +except KeyError: > +pass > +HTTPS_ENV['HTTPS']='ON' > > I'm not seeing an easy way to achieve the same in Zope 2.7, or perhaps > I'm just not as familiar with the code yet. Could someone point me in > the right direction?? > > Tom > > > ___ > 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] Strange loop with ZCatalog
Hi, > I already replied to this, but I never heard back from you. I haven't seen your answer before, I'll search for it. > What does the following return for a value: > > len(list(context.TheCatalog.searchResults(Type='TypeTest'))) Just for now 62418. len (context.TheCatalog.searchResults(Type='TypeTest')) returns 62418 too. Sincerily PS -- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com ___ 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] Strange loop with ZCatalog
I already replied to this, but I never heard back from you. What does the following return for a value: len(list(context.TheCatalog.searchResults(Type='TypeTest'))) ?? -Casey On Fri, 13 Feb 2004 13:01:35 +0100 Pascal Samuzeau <[EMAIL PROTECTED]> wrote: > Hi, > > For some tests I have done : > > - Create about 5000 folders under the Root Zope Site > - Inside those folders, I have created about 30 000 objects ( as > document, just an id, title and a Type). > - I've catalogued all inside a catalog named TheCatalog > > I have written just this function, in intend to test my CPU ( that why > I've written it like this): > > allobject = context.TheCatalog.searchResults(Type='TypeTest') > l=len(allobject) > i = 0 > #for i in range(len(allobject)): > for object in allobject: > #path = allobject[i].getPath() > #course = allobject[i][0] > path = allobject.getPath() > course = allobject[0] > thepath = string.split(path,'/') > lepath = string.join(thepath[:-1],'/') > lieu=context.restrictedTraverse(lepath) > lieu.manage_delObjects(course) > i+=1 > return "Len: %s and Number parsed: %s" %(i,l) > > Phase A: > I have 30 000 objects and the message following: > Len: 3 and Number parsed: 15001 > In my catalog: 15000 object only were destroyed. !!! > > Phase B: > I de-comment my comment lines, but I've got the same message. > > I try to understand what it happens, but I can't. Anyone has a > brillant idea? > > Sincerily > PS > -- > Oreka ! Nous sommes l'internet moins cher ! > Surfez 25% moins cher avec http://www.oreka.com > > ___ > 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 )
[Zope-dev] Strange loop with ZCatalog
Hi, For some tests I have done : - Create about 5000 folders under the Root Zope Site - Inside those folders, I have created about 30 000 objects ( as document, just an id, title and a Type). - I've catalogued all inside a catalog named TheCatalog I have written just this function, in intend to test my CPU ( that why I've written it like this): allobject = context.TheCatalog.searchResults(Type='TypeTest') l=len(allobject) i = 0 #for i in range(len(allobject)): for object in allobject: #path = allobject[i].getPath() #course = allobject[i][0] path = allobject.getPath() course = allobject[0] thepath = string.split(path,'/') lepath = string.join(thepath[:-1],'/') lieu=context.restrictedTraverse(lepath) lieu.manage_delObjects(course) i+=1 return "Len: %s and Number parsed: %s" %(i,l) Phase A: I have 30 000 objects and the message following: Len: 3 and Number parsed: 15001 In my catalog: 15000 object only were destroyed. !!! Phase B: I de-comment my comment lines, but I've got the same message. I try to understand what it happens, but I can't. Anyone has a brillant idea? Sincerily PS -- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com ___ 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] restrictedTraverse doesn't give the good container.
Hi, Today, I have this situation: Under my root Zope Site, I have this hierachy: - FolderA ---FolderB FolderC -FolderC What is interesting is that a folder named "FolderC" appears under another folder named with the same name. Assuming the path is the good one (path=.../.../FolderB) I try : herenow = context.restrictedTraverse(path+'/FolderC') -> OK herenow = herenow.restrictedTraverse(path+'/FolderC') -> OK Now I just delete the last FolderC, I have: - FolderA ---FolderB FolderC I try : herenow = context.restrictedTraverse(path+'/FolderC') -> OK herenow = herenow.restrictedTraverse(path+'/FolderC') -> OK BUT here I'm just not where I think to be, just because of the acquisition !!! I have no time to have a look on this, but anyone have seen this problem and resolved it? Sincerily PS -- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com ___ 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] Put an adapted object in context
> Okay, though Acquisition.Implicit is actually going to make your namespace > issues worse; better use Acquisition.Explicit and enjoy another benefit of > adapters -- namespace separation. I suspect though that your application's > goals/design are different than mine. I appreciate adapters in part because > they can support a much cleaner partioning of code, while you're interested > in them primarily for the added dynamism, which is of course another major > benefit of them. > That's it. > > Sure. Now my little adapters systems is beginning to work fine, and I > > will move my application this way. I'm using a simple engine, a method > > to define which adapters should be applied to each meta_type (this info > > is stored in SESSION) and then this adapters are transparently applied > > when accessing this kind of objects (writing some code in > > __bobo_traverse__). > > Sounds a bit like views (which is a special kind of adapter in a way); what're > the adapters doing? > > A registry that maps meta_type to views is what we've been using inside Silva for > a long time, but we're going to move away from this towards mapping interface > to views/adapters, like in Zope 3, hopefully soon. > > One important idea is that an object can have multiple views simultaneously, > instead of one big view standing in for all aspects of looking at the object. > Associating views with interfaces makes it possible to associate some views for > the 'base interfaces' of an object (and thus for a large class of objects) while > others only apply to very particular interfaces (and thus a much smaller class > of objects). > Yes, the most important difference is that CMF and Silva are content management systems, and I'm focussing my efforts in to use Zope as a bussiness applications development framework. I use adapters to apply a Model View Controler pattern. I've diveded my development into: 1) Types. Basic objects with its model methods and its unitary views. For instance, a Folder with its creation and modification methods and forms, but without any logic (neither navigation between methods, REQUEST doesn't appear here). 2) Applications. Each application acts as a controller of used Types, and also can add some custom views. This functionallity is added throught adapters. So, the application can decide in which framework should appear the add_folder_view, where its submit should be sended, and what should be done after adding. This way, same object could be used from various applications with no problems. All the logic and navigation is decided in each application. Regards -- Santi Camps http://zetadb.sourceforge.net ___ 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] Put an adapted object in context
Santi Camps wrote: > Thats very interesting !! I was rewriting __getattr__ to allow the > adapter access adapted object attributes, but doing this way its clear > and easier. Inheriting from Acquisition Implicit and applying the > adapter using __of__ I obtain the same result and have less problems. Okay, though Acquisition.Implicit is actually going to make your namespace issues worse; better use Acquisition.Explicit and enjoy another benefit of adapters -- namespace separation. I suspect though that your application's goals/design are different than mine. I appreciate adapters in part because they can support a much cleaner partioning of code, while you're interested in them primarily for the added dynamism, which is of course another major benefit of them. > > P.S. In the course of the coming weeks I'll be backporting parts of Zope 3's > > component architecture, especially adapters, into Zope 2. Contact me if > > you're interested. I also expect I'll be making more noise about this in > > a few weeks. > > Sure. Now my little adapters systems is beginning to work fine, and I > will move my application this way. I'm using a simple engine, a method > to define which adapters should be applied to each meta_type (this info > is stored in SESSION) and then this adapters are transparently applied > when accessing this kind of objects (writing some code in > __bobo_traverse__). Sounds a bit like views (which is a special kind of adapter in a way); what're the adapters doing? A registry that maps meta_type to views is what we've been using inside Silva for a long time, but we're going to move away from this towards mapping interface to views/adapters, like in Zope 3, hopefully soon. One important idea is that an object can have multiple views simultaneously, instead of one big view standing in for all aspects of looking at the object. Associating views with interfaces makes it possible to associate some views for the 'base interfaces' of an object (and thus for a large class of objects) while others only apply to very particular interfaces (and thus a much smaller class of objects). Regards, Martijn ___ 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 )