Re: [Zope-dev] Re: [ez] DISCUSS: Eurosprint in February

2002-01-09 Thread Chris Withers

Lennart Regebro wrote:
 
 Oops. Wrong list, the discussion should be on the eurozope list...
 My mistake.

Not everone is on that list :-S

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: [ZPT] accessing object attributes from python expression raises error

2002-01-09 Thread Wolfram Kerber


From: Chris McDonough:


  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.

security.setDefaultAccess({'meta_type': 1}) should do

the parameter is what has been __allow_access_to_unprotected_subobjects__,
that can be a boolean, dictionary or callable


___
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.0b3 a UnpickleableError

2002-01-09 Thread Chris Withers

Hi,

trying to use the new sessioning in Zope 2.5.0b3 and get this:

UnpickleableError
Sorry, a site error occurred.

Traceback (innermost last):
  File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
line 151, in publish_module
  File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
line 115, in publish
  File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line
158, in zpublisher_exception_hook
(Object: Live)
  File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
line 103, in publish
  File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line
172, in commit
  File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Transaction.py, line
233, in commit
  File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Connection.py, line
345, in commit
(Info: (('Products.CMFCore.FSPythonScript', 'FSPythonScript'),
'\x00\x00\x00\x00\x00\x00\x00!', ''))
UnpickleableError: Cannot pickle type 'code' objects

Has anyone else experienced this?

More importantly, can anyone help with how we should find out what is actually
going on here?

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

2002-01-09 Thread Anthony Baxter


 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.

Well, I know _I_ think Session support is important (hint: I wouldn't
have spent the effort on SQLSession otherwise). If the decision was
made to take the CST package and change the interface before making 
it part of the preinstalled set of Products, I'd _strongly_ urge that
the documentation for it be updated.

Anthony
-- 
Anthony Baxter [EMAIL PROTECTED]   
It's never too late to have a happy childhood.


___
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

2002-01-09 Thread Chris McDonough

 Well, I know _I_ think Session support is important (hint: I wouldn't
 have spent the effort on SQLSession otherwise). If the decision was
 made to take the CST package and change the interface before making
 it part of the preinstalled set of Products, I'd _strongly_ urge that
 the documentation for it be updated.

FTR, and to clarify, the *API* docs for the sessioning capabilities in Zope
2.5 exist in the help system.  The narrative docs, however, are scant and
consist mainly of a mention in the CVS version of the Zope Book.  It is this
that I'd like to remedy, once I catch my breath.

- 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] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris McDonough

How does this relate to sessioning?

- Original Message -
From: Chris Withers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 09, 2002 6:09 AM
Subject: [Zope-dev] Zope 2.5.0b3 a UnpickleableError


 Hi,

 trying to use the new sessioning in Zope 2.5.0b3 and get this:

 UnpickleableError
 Sorry, a site error occurred.

 Traceback (innermost last):
   File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
 line 151, in publish_module
   File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
 line 115, in publish
   File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line
 158, in zpublisher_exception_hook
 (Object: Live)
   File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
 line 103, in publish
   File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line
 172, in commit
   File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Transaction.py, line
 233, in commit
   File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Connection.py, line
 345, in commit
 (Info: (('Products.CMFCore.FSPythonScript', 'FSPythonScript'),
 '\x00\x00\x00\x00\x00\x00\x00!', ''))
 UnpickleableError: Cannot pickle type 'code' objects

 Has anyone else experienced this?

 More importantly, can anyone help with how we should find out what is
actually
 going on here?

 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 )



Re: [Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris Withers

Chris McDonough wrote:
 
 How does this relate to sessioning?

Well, I was trying to store a DirectoryView object in the session so I could get
to it easily from a multiple-frame page.
Of course, this means the DriectoryView gets committed to a storage.

Now DirectoryViews have FSPythonScripts as attributes, so I'm guessing that when
the DirectoryView gets committed to the TemporaryStorage, the FSPythonScripts do
as well.

...and apparently they don't like being pickled :-(

Any ideas?

cheers,

Chris

  trying to use the new sessioning in Zope 2.5.0b3 and get this:
 
  UnpickleableError
  Sorry, a site error occurred.
 
  Traceback (innermost last):
File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
  line 151, in publish_module
File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
  line 115, in publish
File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line
  158, in zpublisher_exception_hook
  (Object: Live)
File /usr/local/zope/2.5.0b3_base/lib/python/ZPublisher/Publish.py,
  line 103, in publish
File /usr/local/zope/2.5.0b3_base/lib/python/Zope/__init__.py, line
  172, in commit
File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Transaction.py, line
  233, in commit
File /usr/local/zope/2.5.0b3_base/lib/python/ZODB/Connection.py, line
  345, in commit
  (Info: (('Products.CMFCore.FSPythonScript', 'FSPythonScript'),
  '\x00\x00\x00\x00\x00\x00\x00!', ''))
  UnpickleableError: Cannot pickle type 'code' objects
 
  Has anyone else experienced this?
 
  More importantly, can anyone help with how we should find out what is
 actually
  going on here?
 
  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 )



Re: [Zope-dev] Zope 2.5.0b3 a UnpickleableError

2002-01-09 Thread Chris McDonough

 Now DirectoryViews have FSPythonScripts as attributes, so I'm guessing that when
 the DirectoryView gets committed to the TemporaryStorage, the FSPythonScripts do
 as well.
 
 ...and apparently they don't like being pickled :-(


Ah I see.  What's probably happening here is that FSPythonScripts have 
a file object as an attribute.  File objects can't be pickled because 
files and Python pickles are two different kinds of persistence systems, 
and the file might go away without the pickle knowing about it.

I think the answer here might be don't do that ;-).  Note also that 
the next issue you're going to run in to is that because you can't 
distribute object references across ZODB databases, and because the 
sessioning machinery is based on a mounted ZODB storage, that you're not 
going to be able to store many (any?) objects that are already part of 
the main storage in the session.  You will, however, be able to store 
newly created objects in the session.

waiting-for-your-one-line-question-that-makes-me-retype-docs, ;-)

- 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] Cache detail error

2002-01-09 Thread Brian Lloyd

 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__

Hi Andrew - 

I'm not able to reproduce this with a stock 2.5b3 install :(

What products do you have installed? From looking at the code, 
it looks like you somehow have an object in your ZODB cache 
whose class has no __module__ attribute. I'm not sure how that 
would happen, unless the __class__ of the object is not really 
a class :(


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.361.1716   
Zope Corporation   http://www.zope.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] Re: [ZPT] accessing object attributes from pythonexpression raises error

2002-01-09 Thread Michael R. Bernstein

On Wed, 2002-01-09 at 01:40, Wolfram Kerber wrote:
 
 From: Chris McDonough:
 
 
   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.
 
 security.setDefaultAccess({'meta_type': 1}) should do
 
 the parameter is what has been __allow_access_to_unprotected_subobjects__,
 that can be a boolean, dictionary or callable

Interesting. I didn't think you could have more than one
setDefaultAccess in a class. If you can, then you can set:

security.setDefaultAccess('deny')
security.setDefaultAccess({'meta_type': 1})

But otherwise, you would have to list all attributes of the class in the
dict of a single statement, wouldn't you?

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] Cache detail error

2002-01-09 Thread Chris Withers

Brian Lloyd wrote:
 
 it looks like you somehow have an object in your ZODB cache
 whose class has no __module__ attribute. I'm not sure how that
 would happen, unless the __class__ of the object is not really
 a class :(

Don't ExtentionClass objects behave like that?

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] a long type property dosen't appear in any manage_propertiesForm

2002-01-09 Thread Takakazu Tamaki

Hi folks,

As mentioned in subject, it dosen't appear.
I'm not sure it's a bug or feature. :(

Could anyone give a suggestion ?

Zope-2.4.3
in lib/python/OFS/dtml/properties.dtml

--- properties.dtml.origTue Mar  6 06:01:02 2001
+++ properties.dtml Thu Jan 10 01:58:53 2002
@@ -62,7 +62,7 @@
   dtml-elif type == 'long'
   input type=text name=dtml-var id:dtml-var type size=35
value=dtml-if hasProperty(id)dtml-var
-   ('%s' % getProperty(id))[:-1] html_quote/dtml-if
+   ('%s' % getProperty(id)) html_quote/dtml-if
   dtml-elif type in ('float', 'date')
   input type=text name=dtml-var id:dtml-var type size=35
value=dtml-var getProperty(id) html_quote


---
kaz


___
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] Cache detail error

2002-01-09 Thread Andrew Sydelko

Brian Lloyd wrote:
  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__
 
 Hi Andrew - 
 
 I'm not able to reproduce this with a stock 2.5b3 install :(
 
 What products do you have installed? From looking at the code, 
 it looks like you somehow have an object in your ZODB cache 
 whose class has no __module__ attribute. I'm not sure how that 
 would happen, unless the __class__ of the object is not really 
 a class :(

Well, what happens if there is no cache (I'm assuming the c1-*.zec
files are the cache)? Is this the error I'm getting?

The cache detail function doesn't actually query the ZODB in anyway,
right?

We've run into some other interesting things because our ZODB was
started such a long time ago (Zope 1.0 days). 

I'm very interested in a way to run a sanity checker on the Data.fs 
file that we currently have, removing any cruft (and yes, we've 
packed) like invalid objects that Zope would pass over on startup.

--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 )



[Zope-dev] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Darrell Gallion

I went to the collector, filled out the form.
Only to find out I need and account to submit the
form!!

The Transient Object Container is transient.. 
I wanted the SessionDataManager to create it's
Transient Object Container as needed. 

Added properties to the SessionDataManger to make this
possible. 





=
Darrell Gallion




__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

___
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] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Chris McDonough

Darrell,

Thanks for the bugreport, but I'm not sure I understand it.  Do you 
think you can describe in more detail what you want that it did (does?) 
not do?

Darrell Gallion wrote:

 I went to the collector, filled out the form.
 Only to find out I need and account to submit the
 form!!
 
 The Transient Object Container is transient.. 
 I wanted the SessionDataManager to create it's
 Transient Object Container as needed. 
 
 Added properties to the SessionDataManger to make this
 possible. 
 
 
 
 
 
 =
 Darrell Gallion
 
 
 
 
 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/
 
 ___
 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] accessing object attributes from pythonexpression raises error

2002-01-09 Thread Wolfram Kerber


 Interesting. I didn't think you could have more than one
 setDefaultAccess in a class. If you can, then you can set:

 security.setDefaultAccess('deny')
 security.setDefaultAccess({'meta_type': 1})

The last 'setDefaultAccess' statement in a class will define the actual
behaviour, i.e use only one.


 But otherwise, you would have to list all attributes of the class in the
 dict of a single statement, wouldn't you?

No, all attributes that aren't in the dict are private.


Wolfram


___
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

2002-01-09 Thread Brian Lloyd

  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.

I agree - it also needs to pay special attention to describing
the expected behavior, as it won't be easy to deal with existing
objects without relying on b_m_t in some way.

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.361.1716
Zope Corporation   http://www.zope.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] Cache detail error

2002-01-09 Thread Jens Vagelpohl

ok, i reproduced it. looks like having *any* ZClass among the products in 
your products folder will cause this symptom.

i told brian about it and i assume he will fix it for CVS.

jens



On Wednesday, January 9, 2002, at 11:55 , Brian Lloyd wrote:

 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__

 Hi Andrew -

 I'm not able to reproduce this with a stock 2.5b3 install :(

 What products do you have installed? From looking at the code,
 it looks like you somehow have an object in your ZODB cache
 whose class has no __module__ attribute. I'm not sure how that
 would happen, unless the __class__ of the object is not really
 a class :(


 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.361.1716
 Zope Corporation   http://www.zope.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 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] Cache detail error

2002-01-09 Thread Brian Lloyd

 ok, i reproduced it. looks like having *any* ZClass among the products in 
 your products folder will cause this symptom.
 
 i told brian about it and i assume he will fix it for CVS.
 
 jens

I just checked in a fix to the head and 2.5 branch. Jens, 
could you do a quick update and check that it works for 
the sandbox where you reproduced this? Thanks!


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.361.1716   
Zope Corporation   http://www.zope.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] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Chris McDonough

OIC.  Thanks!

This patch probably makes sense for some class of usage.  I'm a little 
skittish because I think doing magic (e.g. if I dont find a data 
container where I said there was one, make one in  /temp_folder) might 
tend to bite folks.  Also, doing writes on reads (explicitly commiting 
a transaction in the middle of a request-bounded transaction) is 
probably a bad idea because it might cause half of something to be 
committed inadvertently.

The right solution for this is to create some sort of analogue of 
rc.d/init.d for Zope where you can hook Zope startup and thus 
repopulate the temp_folder with the separate data containers then.  I 
thought of this a while back but lacked the time to implement it.

- C

Darrell Gallion wrote:

 I wanted each SessionDataManager to have it's own
 Session Data Container in the /temp_folder
 This allows me to invalidate them one by one and
 provide various timeouts. 
 
 Since these are not persistent, there's a problem.
 So I added properties to SessionDataManager so it
 could create it's own
 /temp_folder/SessionDataContainer if need be.
 
 Maybe I'm using this all wrong?
 
 Thanks
 --Darrell
 
 
 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/
 



___
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] Cache detail error

2002-01-09 Thread Jens Vagelpohl

my own quick test works now. :)

jens


On Wednesday, January 9, 2002, at 02:01 , Brian Lloyd wrote:

 ok, i reproduced it. looks like having *any* ZClass among the products in
 your products folder will cause this symptom.

 i told brian about it and i assume he will fix it for CVS.

 jens

 I just checked in a fix to the head and 2.5 branch. Jens,
 could you do a quick update and check that it works for
 the sandbox where you reproduced this? Thanks!


 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.361.1716
 Zope Corporation   http://www.zope.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] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Darrell Gallion

Is it magic if the Session manager creates it's own
data container? The first one is created for you but
not by the Session system. That seems like magic. 

Since you say my approach to creating the tempData is
flawed from a ZODB stand point. Then rc.d/init.d
sound good.

Although the /startup folder is a common idea for
Windows users. Until the temp folder arrived I didn't
need such a thing.

Maybe the sessionDataManager could register a
callback, called during startup. This might be a safer
time to create any required temp data.

--Darrell


=
Darrell Gallion




__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

___
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] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Matthew T. Kromer

Chris McDonough wrote:

 OIC.  Thanks!

 This patch probably makes sense for some class of usage.  I'm a little 
 skittish because I think doing magic (e.g. if I dont find a data 
 container where I said there was one, make one in  /temp_folder) 
 might tend to bite folks.  Also, doing writes on reads (explicitly 
 commiting a transaction in the middle of a request-bounded 
 transaction) is probably a bad idea because it might cause half of 
 something to be committed inadvertently.

 The right solution for this is to create some sort of analogue of 
 rc.d/init.d for Zope where you can hook Zope startup and thus 
 repopulate the temp_folder with the separate data containers then.  I 
 thought of this a while back but lacked the time to implement it.

 - C


Actually, we did have the Temporary Folder have the capability to 
automatically import its contents at system startup, but that got tossed 
out as being function inappropriate to a temporary storage container by 
executive fiat.



___
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.5b3 Management Tabs

2002-01-09 Thread brian.r.brinegar.1

I've noticed in a fresh install Zope 2.5b3 management tabs which users do
not have access to view show up. In the past only management tabs that a
user had permission to view the associated action showed up. Is this a
known issue? or a new feature?

--Brian Brinegar
  ECN Web Technician
  MSEE 104 A 494-3106
  http://www.geeksoft.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] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Chris McDonough

Darrell Gallion wrote:

 Is it magic if the Session manager creates it's own
 data container? The first one is created for you but
 not by the Session system. That seems like magic. 


It's created by the Zope package, which indeed is magic, but something 
needed to populate it with default data; it has the minimum amount of 
magic necessary ;-)

 Although the /startup folder is a common idea for
 Windows users. Until the temp folder arrived I didn't
 need such a thing.


Yup.

 Maybe the sessionDataManager could register a
 callback, called during startup. This might be a safer
 time to create any required temp data.

The problem with this is that the SessionDataManager class can do this, 
but individual instances of the class cannot.  There is no efficient way 
to find all the instances of one kind in a ZODB and call a method on 
them at start time unless you were to create some sort of custom 
registry someplace to do keep track of them.

It seems cleaner to be procedural ala some sort of etc/rc.d/init.d at 
startup time which contains scripts that have the power to do arbitrary 
things to instances in the databse.  Then the logic that does the 
necessary minimal magic in the Zope package now could be moved out and 
into this.

This would be a great idea for a Product.

- 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] sessionDataManager should create it's temp/xxxx

2002-01-09 Thread Chris McDonough

 Actually, we did have the Temporary Folder have the capability to 
 automatically import its contents at system startup, but that got tossed 
 out as being function inappropriate to a temporary storage container by 
 executive fiat.

Yeah.. I actually think now that this was the right decision.


___
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] poor mans solution to startup folder

2002-01-09 Thread Darrell Gallion

External methods aren't the best solution I know.
It wasn't obvious to me how to call python scripts at
this point. For that matter if this is a good point to
do this kind of thing. Or how to hook the startup
event with a product.

Added these lines to the bottom of initialize(app) in
application.py



# Ensure that a startup folder exists
if not hasattr(app, 'startup'):
from OFS import Folder
Folder.manage_addFolder(app, id='startup',
title='Startup')
get_transaction().note('Added startup folder')
get_transaction().commit()

# Call any external methods found in the startup
folder
# Only call external methods
startup = getattr(app, 'startup')
for obj in startup.objectIds():
obj=getattr(startup, obj)
if hasattr(obj,'__call__') and
obj.__class__.__name__=='ExternalMethod':
obj(app)
   

=
Darrell Gallion




__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

___
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] poor mans solution to startup folder

2002-01-09 Thread Chris McDonough

That looks like a workable solution!

This can also be done in a Product by getting hold of the supersecret
attribute of the context object that is passed in to initialize which is
the database connection (or maybe it's the root root object.. in either
case, given either, you can get the other).  It might be better that way in
order to keep the logic out of the Zope init routine and in a separate
product so it can be modified outside of Zope and used with various Zope
versions until its baked enough to make it in...

- Original Message -
From: Darrell Gallion [EMAIL PROTECTED]
To: Chris McDonough [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 09, 2002 7:13 PM
Subject: Re: [Zope-dev] poor mans solution to startup folder


 External methods aren't the best solution I know.
 It wasn't obvious to me how to call python scripts at
 this point. For that matter if this is a good point to
 do this kind of thing. Or how to hook the startup
 event with a product.

 Added these lines to the bottom of initialize(app) in
 application.py



 # Ensure that a startup folder exists
 if not hasattr(app, 'startup'):
 from OFS import Folder
 Folder.manage_addFolder(app, id='startup',
 title='Startup')
 get_transaction().note('Added startup folder')
 get_transaction().commit()

 # Call any external methods found in the startup
 folder
 # Only call external methods
 startup = getattr(app, 'startup')
 for obj in startup.objectIds():
 obj=getattr(startup, obj)
 if hasattr(obj,'__call__') and
 obj.__class__.__name__=='ExternalMethod':
 obj(app)


 =
 Darrell Gallion




 __
 Do You Yahoo!?
 Send FREE video emails in Yahoo! Mail!
 http://promo.yahoo.com/videomail/



___
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 )