Re: [Zope-dev] ghosts of removed products haunting ZSQL Methods?
Dieter Maurer wrote: >John Ziniti writes: > > I used to have the Product TrackerBase installed > > and have removed it. Now, however, attempts to > > access the "Advanced" tab of ZSQL Methods is > > broken because a chain of events attempt to get > > info about a the non-existent Product: > > ... > > 2) Is this schizophrenic state my fault? >Probably not. > I didn't think so, but I would think that the code which deletes Products and their associated ZClasses would be pretty rock solid at this point ?? >Looks like a bug, you should report to "http://collector.zope.org";. > I would, but as a developer myself, a bug that has a symptom bu no real evidence of a cause is one I wouldn't really think to look at it. "My ZODB is broken" is basically the best I can come up with at this point as a way to explain my problem. I can talk all the way in to Zope.app()._getProductRegistryData() about the way the problem manifests itself, but it happened at some point over the last ... oh ... three months of development??? It'll get ignored, for sure ... ( no offense intended) >> 3) How to rectify the problem (Make *all* of Zope > > know that TrackerBase is gone)? >I think this is the right approach. > Yep. I really just want to try something akin to: old_registry=app._getProductRegistryData('zclasses') app._SetProductRegistryData('zclasses')=old_registry[1:] ... but I'd like to hear from the guy who wrote _getProductRegistryData first before I even try it on a backup-devlopment-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] accessing object attributes from python expression raises error
> meta_type is an attribute, so you can't just do > > security.declareProtected(ACCESS_CONTENTS_PERM, 'meta_type') That's right. > The id attribute has the getId method, perhaps what's required is a > getMetaType method that can be suitably protected? > > This would still be a pretty easy fix: > > security.declareProtected(ACCESS_CONTENTS_PERM, 'getMetaType') > def getMetaType(self): > """ """ > return self.meta_type > > Am I missing something? Nope, that would work. But I think also: meta_type__roles__ = None .. as a class attr would work as well. I'll try it and let you know if it works. -- Chris McDonoughZope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones" ___ 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: [ZPT] accessing object attributes from python expressionraises error
On Tue, 2002-01-08 at 14:01, Evan Simpson wrote: > Michael R. Bernstein wrote: > > > > [snip stuff about accessing a browser_id_manager's > > meta_type from unrestricted code raising an > > unauthorized exception] > > > > Will this be fixed for 2.5 final? > > > That depends. We're currently waiting for feedback on 2.5b3. Depending > on how that goes, these changes may need to wait for 2.5.1. Perhaps I am under-estimating how difficult the fix is. I'm assuming that you simply need to add an appropriate security declaration to the BrowserIdManager class... Oh, wait... meta_type is an attribute, so you can't just do security.declareProtected(ACCESS_CONTENTS_PERM, 'meta_type') Hmm... The id attribute has the getId method, perhaps what's required is a getMetaType method that can be suitably protected? This would still be a pretty easy fix: security.declareProtected(ACCESS_CONTENTS_PERM, 'getMetaType') def getMetaType(self): """ """ return self.meta_type Am I missing something? Michael Bernstein. ___ 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] ghosts of removed products haunting ZSQL Methods?
John Ziniti writes: > I used to have the Product TrackerBase installed > and have removed it. Now, however, attempts to > access the "Advanced" tab of ZSQL Methods is > broken because a chain of events attempt to get > info about a the non-existent Product: > ... > 2) Is this schizophrenic state my fault? Probably not. Looks like a bug, you should report to "http://collector.zope.org";. > 3) How to rectify the problem (Make *all* of Zope > know that TrackerBase is gone)? I think this is the right approach. 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 )
Re: [Zope-dev] Session Tracking in 2.5
Chris McDonough writes: > The docs folks here dont seem to > think its important, so I may need to do this and put it in > the Dev Guide. As always, the developers are industrious and the documentors are lazy. As a result, source is usually far beyond the documentation ;-) 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 )
Re: [Zope-dev] ghosts of removed products haunting ZSQL Methods?
> I'm ready and eager to blame Z classes for everything :) Yeah, me too, hatin' em right about now ... > % cd lib/python > % python2.1.1 > >>> import Zope > >>> app = Zope.app() > >>> app.fixupZClassDependencies(rebuild=1) > >>> get_transaction().commit() > > Hopefully that will do it for you. Found that on a mailinglist archive last night. Tried it but it doesn't work. The offending Product's ZClasses are still in the Registry (but nowhere else). ___ 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] ghosts of removed products haunting ZSQL Methods?
John Ziniti wrote: > I used to have the Product TrackerBase installed > and have removed it. Now, however, attempts to > access the "Advanced" tab of ZSQL Methods is > broken because a chain of events attempt to get > info about a the non-existent Product: > > lib/python/Shared/DC/ZRDB/dtml/advanced.dtml calls > manage_product_zclass_info > > ../ZRDB/DA.py.manage_product_zclass_info (line 546) > calls self.aq_acquire('_getProductRegistryData')('zclasses') > > One of these items is the dict: > "{'id': 'Tracker', 'meta_type': 'Tracker', > 'product': 'Tracker', 'meta_class': } > > Then, line 548 calls "if hasattr(z._zclass_,'_p_deactivate')". > > The attempt to access z._zclass_ fails because this > product doesn't exist. > > 1) the call to z._zclass_ doesn't actuallt do anything >except: ## Eek, persistent > > 2) Is this schizophrenic state my fault? > > 3) How to rectify the problem (Make *all* of Zope >know that TrackerBase is gone)? > Hi John, I'm ready and eager to blame Z classes for everything :) In this case, lets try to force ZClasses to fix themselves up by going into Zope at the python command line prompt % cd lib/python % python2.1.1 >>> import Zope >>> app = Zope.app() >>> app.fixupZClassDependencies(rebuild=1) >>> get_transaction().commit() Hopefully that will do it for you. ___ 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] "Cache detail" error
Clicking on "Cache detail" in the Debug Information Control Panel, I get the following traceback: Zope Error! Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: __module__ Traceback (innermost last): File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/ZPublisher/Publish.py, line 99, in publish File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: cache_detail) File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/ZPublisher/Publish.py, line 40, in call_object (Object: cache_detail) File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/App/CacheManager.py, line 189, in cache_detail (Object: Control_Panel) File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/ZODB/DB.py, line 161, in cacheDetail File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/ZODB/DB.py, line 135, in _connectionMap File /data/www/Zope.testing/src/Zope-2.5.0b3-src/lib/python/ZODB/DB.py, line 157, in f AttributeError: __module__ Any ideas? --andy. ___ 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: [ez] DISCUSS: Eurosprint in February
Oops. Wrong list, the discussion should be on the eurozope list... My mistake. ___ 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: [ZODB-Dev] Replacing bobobase_modification_time
On Tuesday 08 January 2002 06:47 am, Chris McDonough wrote: > > I think that a much better approach, if modification time is important > > to your application, is to store the application modification time in the > > object as a data attribute. > > It might be better to cause common Zope objects to do what Casey proposes > (maybe via SimpleItem) as opposed to making folks keep app modtimes for > those and as opposed to changing the semantics of > bobobase_modification_time. In Zope2, this would be achieved via a mixin > named something like Modifiable mixed in to DTML Document, File, etc. this sounds like a much better approach to me. the only question i have then, is how to hook modification times (as opposed to storage timestamps) without messing with Transaction.py? cheers kapil ___ 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] _getProductRegistryData('zclasses') returns non-existent Products -- permission to muck around?
My ProductRegistry has references to products which no longer exist in my Zope installation. This causes a variety of problems in lots of different places when other products try to get more information about all the products in the ProductRegistry (obviously). 1) How does this occur? 2) Is it OK to put my boots on, get in there and manually delete entries which refer to non-existent Products? TIA Ziniti ___ 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: [ez] DISCUSS: Eurosprint in February
Lennart Regebro wrote: > > > Is there interest in such a sprint? Yup, obviously the nearer to the UK the better :-) 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 )
[Zope-dev] Re: [ZODB-Dev] Replacing bobobase_modification_time
On Tuesday 08 January 2002 09:47 am, Chris McDonough allegedly wrote: > > I think that a much better approach, if modification time is important > > to your application, is to store the application modification time in the > > object as a data attribute. > > It might be better to cause common Zope objects to do what Casey proposes > (maybe via SimpleItem) as opposed to making folks keep app modtimes for > those and as opposed to changing the semantics of > bobobase_modification_time. In Zope2, this would be achieved via a mixin > named something like Modifiable mixed in to DTML Document, File, etc. > > - C That had been my original instinct, but I wasn't sure. It sounds like the best way to approach it. I think this is complex enough so that a formal (if short) fishbowl proposal is probably warranted to discuss whether it should be part of an existing mix-in or a new one. /---\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association [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 )
[Zope-dev] Re: [ZODB-Dev] Replacing bobobase_modification_time
On Tuesday 08 January 2002 09:15 am, Jim Fulton allegedly wrote: > > The basic problem is that b_m_t is a database modification time, not > an application-meaningful time. You pointed out that there are > application-meaningful times that are not captured by the database time. > In addition, there are database modifications that are not meaningful > to the application. Operations like export/import (copy/paste), > version commit/abort, transactional undo, etc. cause the database times > to change without making application-meaningful changes. > > Also, there could be state changes in an object that are not meaningful > to the application. > > I think that a much better approach, if modification time is important > to your application, is to store the application modification time in the > object as a data attribute. > > Jim Do you think then that it might be reasonable to include such a service in a higher level Zope base class? It seems to me that creation and mod time are basic services that are needed in many applications. I certainly agree with you as far as "database" vs. "application". It seems that it has been widely encouraged to use b_m_t for something that it was not designed for. Especially in light of the fact that it is a default index/metadata entry in ZCatalog. I think that developing an application-level service in Zope that behaves as people expect would prove extremely useful. On that note I think a problem with doing that is the inevitable namespace pollution that occurs when attributes are added widely to objects across the system. Has any thought been given to creating a better naming standard for attributes so that it is easier to avoid collisions? Perhaps something like the "_p_" and "_v_" prefixes used now? Or even just prefixing them with "zope" (for "Zope level" attrs). /---\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association [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] Session Tracking in 2.5
> It's important because session tracking is such a crucial feature for > people migrating from other web platforms - seeing detailed > documentation will make them so much more comfortable. it would also be > a crying shame not to make use of all the docs you already generated > along the way. I agree. It's silly not to use the existing docs. > So, please do try to find the time, and show my plea to those who make > room for doing such things :-) They should be reading this list. - 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 )
[Zope-dev] Re: [ZODB-Dev] Replacing bobobase_modification_time
> I think that a much better approach, if modification time is important > to your application, is to store the application modification time in the > object as a data attribute. It might be better to cause common Zope objects to do what Casey proposes (maybe via SimpleItem) as opposed to making folks keep app modtimes for those and as opposed to changing the semantics of bobobase_modification_time. In Zope2, this would be achieved via a mixin named something like Modifiable mixed in to DTML Document, File, etc. - 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] Session Tracking in 2.5
On Tue, 2002-01-08 at 13:03, Chris McDonough wrote: > There are supposed to be docs for the sessioning stuff, and > there *are* API docs in the help system. However, the > narrative docs that went along with CST were not translated > for the Zope 2.5 stuff. The docs folks here dont seem to > think its important, so I may need to do this and put it in > the Dev Guide. It's important because session tracking is such a crucial feature for people migrating from other web platforms - seeing detailed documentation will make them so much more comfortable. it would also be a crying shame not to make use of all the docs you already generated along the way. So, please do try to find the time, and show my plea to those who make room for doing such things :-) seb > On 08 Jan 2002 11:39:35 + > seb bacon <[EMAIL PROTECTED]> wrote: > > I thought it was time to catch up on the CST stuff which > > has made it > > into the core, only to find that it's only *based on* > > Chris' CST stuff. > > And I can't find a fishbowl project anywhere describing > > the rationale, > > apis, whatever... > > > > Is there a fishbowl for this? Or was session tracking > > implemented as a > > guerilla project? > > > > 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 )
[Zope-dev] Re: [ZODB-Dev] Replacing bobobase_modification_time
Casey Duncan wrote: > > I am posting this here to get reactions here for something that we have been > discussing on zope-dev that pertains to the ZODB. > > Dieter M. discovered that bobobase_modification_time (henceforth referred to > as b_m_t) is not always an accurate representation of an object's > modification time, especially when an object has been modified in a > transaction that has not been commited. This is a problem when doing things > like cataloging an object in the same transaction that it is modified. > > I thought this issue created an opprotunity to solve two problems. The above > problem and the anachronistic b_m_t API itself, which is always good for a > laugh in Zope classes. The idea is to create a new method in PersistentExtra > "getModificationTime" which returns the actual modification time of an object > based on the time the change is registered if it has been changed and not > commited and then the last commit time if no change has been made. I also > propose we add a second method "getLastCommitTime" or some-such which behaves > the same as the current b_m_t method. At the same time we would deprecate > b_m_t. > > Kapil Thangavelu prototyped a couple of ideas. I think his latest code is > simple and straighforward enough to be incorporated, although it does not yet > replace and deprecate b_m_t, which I think is important. > > He posted sample code to zope-dev yesterday, here is a (rather long) link: > >http://zope.nipltd.com/public/lists/dev-archive.nsf/0a8715d5f3c7b6a3802568c1006328f7/9dcad434e2a73f2680256b3a006abc37?OpenDocument > > Thoughts anyone? The basic problem is that b_m_t is a database modification time, not an application-meaningful time. You pointed out that there are application-meaningful times that are not captured by the database time. In addition, there are database modifications that are not meaningful to the application. Operations like export/import (copy/paste), version commit/abort, transactional undo, etc. cause the database times to change without making application-meaningful changes. Also, there could be state changes in an object that are not meaningful to the application. I think that a much better approach, if modification time is important to your application, is to store the application modification time in the object as a data attribute. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (888) 344-4332http://www.python.org Zope Corporation http://www.zope.com 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] Re: [ez] DISCUSS: Eurosprint in February
I am interested to join that sprint. Robert - Original Message - From: "Lennart Regebro" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 08, 2002 12:20 PM Subject: [Zope-dev] Re: [ez] DISCUSS: Eurosprint in February > We at Torped are interested, and we *can't* host it, which seems to make us > unique in this. :-) > > - Original Message - > From: "Paul Everitt" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 07, 2002 1:45 PM > Subject: [ez] DISCUSS: Eurosprint in February > > > > > > Howdy. Eurozope has been pretty quiet. I'd like to throw something out > > for discussion. > > > > When last we talked, I was trying to plan an i18n-focused Zope3 sprint > > in January, somewhere in Europe. That didn't work out, so we're doing > > the sprint here in Fredericksburg with Juan David and Stephan, next week. > > > > (Note: As a reminder, "sprint" is a term meaning an extreme programming > > session. We are doing sprints for Zope3 as a way to push its > > development along, but also to open up its development to non-ZC people.) > > > > Instead, we'd like to do a more general sprint in Europe in the second > > half of February. We'll need: a place and host, a couple of people to > > act as coaches, and perhaps some topics. > > > > Beehive has volunteered to host, so that's the leading candidate right > > now. I realize this is going to spark a round of emails where some > > people will attempt to explain why the sprint should be located 7 km > > from their office. :^) > > > > Is there interest in such a sprint? > > > > --Paul > > > > > > _ > > EuroZope mailing list http://eurozope.beehive.de/ > > [EMAIL PROTECTED] > > https://admin.comlounge.net/mailman/listinfo/eurozope > > > > > > > ___ > 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] Zope 2.5.0 Sessions & Testing
> Is it solved in Zope 3? Zope3 is more modular, so probably. Though I dont think it's a goal. > Never even knew that existed. Where's it documented? What > does it do? What are > the side effects? "Zoper.test" as a side effect it commits a transaction. It's documented in the dev guide as "ZPublisher.Zope", sorry. > Well, we're using makerequest, and the following code > seems to be keeping the > SESSION stuff working: > > session = app.unrestrictedTraverse('/session_data_manager').getSessionData > app.REQUEST.set_lazy('SESSION', session) > > Is that the 'right thing' to do? That looks about right... ___ 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] asyncore.py & Broken-Pipe error
Broken pipe errors usually dont cause the system to stop working. Are you sure that this is the cause of the system crashing? It's almost certainly not, even though you may see errors on the console and in the log. On Tue, 8 Jan 2002 10:20:24 +0100 "Dirk Datzert" <[EMAIL PROTECTED]> wrote: ___ 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] Zope 2.5.0 Sessions & Testing
Chris McDonough wrote: > > Your problem is that a REQUEST is not created without the > publisher. This is a particularly annoying and unsolved > problem when doing tests. Is it solved in Zope 3? > Your options are to use "import > Zope; Zope.test('/some/method/name')" which has all sorts of > bad side effects, Never even knew that existed. Where's it documented? What does it do? What are the side effects? > or to dummy up the environment as much as > possible via things like makerequest, etc. enough for the > method to work. I can't say exactly what's needed for that > in this case, I'd need to mess with it endlessly (luckily > that's your job in this case ;-) Well, we're using makerequest, and the following code seems to be keeping the SESSION stuff working: session = app.unrestrictedTraverse('/session_data_manager').getSessionData app.REQUEST.set_lazy('SESSION', session) Is that the 'right thing' to do? 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] Session Tracking in 2.5
CST was done via the fishbowl project at http://dev.zope.org/Wikis/DevSite/Projects/CoreSessionTracking/FrontPage. There is an explanation of the difference between the Zope 2.5 stuff and CST on the CurrentStatus page. Note that this situation makes me want to cry as well. There are supposed to be docs for the sessioning stuff, and there *are* API docs in the help system. However, the narrative docs that went along with CST were not translated for the Zope 2.5 stuff. The docs folks here dont seem to think its important, so I may need to do this and put it in the Dev Guide. On 08 Jan 2002 11:39:35 + seb bacon <[EMAIL PROTECTED]> wrote: > I thought it was time to catch up on the CST stuff which > has made it > into the core, only to find that it's only *based on* > Chris' CST stuff. > And I can't find a fishbowl project anywhere describing > the rationale, > apis, whatever... > > Is there a fishbowl for this? Or was session tracking > implemented as a > guerilla project? > > 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] Zope 2.5.0 Sessions & Testing
Your problem is that a REQUEST is not created without the publisher. This is a particularly annoying and unsolved problem when doing tests. Your options are to use "import Zope; Zope.test('/some/method/name')" which has all sorts of bad side effects, or to dummy up the environment as much as possible via things like makerequest, etc. enough for the method to work. I can't say exactly what's needed for that in this case, I'd need to mess with it endlessly (luckily that's your job in this case ;-) Sorry, - C On Tue, 08 Jan 2002 10:16:16 + Chris Withers <[EMAIL PROTECTED]> wrote: > Hi, > > Trying to test a URL in a unittest.py test using code as > follows: > > apply(Site.restrictedTraverse('/folder/cmfsite/skinmethod'),params) > > Now, skinmethod uses the new Zope 2.5.0 sessioning: > > session=context.REQUEST.SESSION > session.set('key','value') > > but the BeforeTraversal hook doesn't seem to kick in when > restrictedTraverse is > used :-( > > We always get an AttributeError on SESSION. > > How should we fix this and go about testing this method > properly? > > 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 ) ___ 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] Session Tracking in 2.5
I thought it was time to catch up on the CST stuff which has made it into the core, only to find that it's only *based on* Chris' CST stuff. And I can't find a fishbowl project anywhere describing the rationale, apis, whatever... Is there a fishbowl for this? Or was session tracking implemented as a guerilla project? 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] Re: [ez] DISCUSS: Eurosprint in February
We at Torped are interested, and we *can't* host it, which seems to make us unique in this. :-) - Original Message - From: "Paul Everitt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 1:45 PM Subject: [ez] DISCUSS: Eurosprint in February > > Howdy. Eurozope has been pretty quiet. I'd like to throw something out > for discussion. > > When last we talked, I was trying to plan an i18n-focused Zope3 sprint > in January, somewhere in Europe. That didn't work out, so we're doing > the sprint here in Fredericksburg with Juan David and Stephan, next week. > > (Note: As a reminder, "sprint" is a term meaning an extreme programming > session. We are doing sprints for Zope3 as a way to push its > development along, but also to open up its development to non-ZC people.) > > Instead, we'd like to do a more general sprint in Europe in the second > half of February. We'll need: a place and host, a couple of people to > act as coaches, and perhaps some topics. > > Beehive has volunteered to host, so that's the leading candidate right > now. I realize this is going to spark a round of emails where some > people will attempt to explain why the sprint should be located 7 km > from their office. :^) > > Is there interest in such a sprint? > > --Paul > > > _ > EuroZope mailing list http://eurozope.beehive.de/ > [EMAIL PROTECTED] > https://admin.comlounge.net/mailman/listinfo/eurozope > > ___ 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] Zope 2.5.0 Sessions & Testing
Hi, Trying to test a URL in a unittest.py test using code as follows: apply(Site.restrictedTraverse('/folder/cmfsite/skinmethod'),params) Now, skinmethod uses the new Zope 2.5.0 sessioning: session=context.REQUEST.SESSION session.set('key','value') but the BeforeTraversal hook doesn't seem to kick in when restrictedTraverse is used :-( We always get an AttributeError on SESSION. How should we fix this and go about testing this method properly? 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 )
[Zope-dev] asyncore.py & Broken-Pipe error
Hi, I knew that sometimes ZServer stopps working with the error OS-error Broken-Pipe in the log-file. And I knew that this is fixed in Zope 2.5b with a change of asyncore.py I need a working asyncore.py for my 2.4.3 Zope. Can anybody sent me a working version ? Regards, Dirk Datzert Rasselstein Hoesch GmbH Informatik / AnwendungsentwicklungD-56626 AndernachKoblenzer Strasse 141 http://www.rasselstein-hoesch.de Tel.: +49 (0) 2631 81-4595Fax.: +49 (0) 2631 81-15-4595mailto:[EMAIL PROTECTED] BEGIN:VCARD VERSION:2.1 N:Datzert;Dirk FN:Dirk Datzert ORG:;Andernach TEL;WORK;VOICE:+49 2631 81 4595 TEL;WORK;FAX:+49 2631 81 15 4595 ADR;WORK:;;Andernach LABEL;WORK:Andernach KEY;X509;ENCODING=BASE64: MIIDVTCCAr6gAwIBAgIPAM2aAkJs9V5JP7ynMA0GCSqGSIb3DQEBBAUAMIG8MQswCQYD VQQGEwJERTEQMA4GA1UECBMHSGFtYnVyZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMx VEMgVHJ1c3RDZW50ZXIgZm9yIFNlY3VyaXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAG A1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMSBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlm aWNhdGVAdHJ1c3RjZW50ZXIuZGUwHhcNMDExMTEyMTIwMTM1WhcNMDMwMTAyMTIwMTM1WjBp MQswCQYDVQQGEwJERTEQMA4GA1UEBxMHTmV1d2llZDEVMBMGA1UEAxMMRGlyayBEYXR6ZXJ0 MTEwLwYJKoZIhvcNAQkBFiJEaXJrLkRhdHplcnRAcmFzc2Vsc3RlaW4taG9lc2NoLmRlMIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCog/5TyCRdMjACIM/U23qq0n0LUEeb+X3WpIn5 2UHosqQMDdLDEtlUOMSKTrqcsp3lHTOQWwj65/T3cI85brb7PkJDtbCI57MVTtMIKByd946g uIOe6xti0H+lJAscIO1a6FqFjjJLhudWpDqaWgW95qGaFVT1me2xPEaoiampxQIDAQABo4Gq MIGnMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2d1aWRlbGlu ZXMwEQYJYIZIAYb4QgEBBAQDAgWgMF0GCWCGSAGG+EIBAwRQFk5odHRwczovL3d3dy50cnVz dGNlbnRlci5kZS9jZ2ktYmluL2NoZWNrLXJldi5jZ2kvQ0Q5QTAwMDAwMDAyNDI2Q0Y1NUU0 OTNGQkNBNz8wDQYJKoZIhvcNAQEEBQADgYEAOHB5sq4AdTAwizcmGPgdnfPo9btBu1d/PRNO D/xoIhXlI4A0ehRZCBGuOup0L78YBj+DZUMDOK3H6+5M8rOfCazkcYlcfdxZ9LeNRkMy+RRx PbmXelKB7UjM6IfJyZiQzm/jTwxFle3L+W8TMSPwmAdTJOo0YkikHCAlxNLMn4w= EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020108T092024Z END:VCARD