Re: [EMAIL PROTECTED]: Re: [Zope-Checkins] CVS: Zope/lib/python/nt_svcutils - service.py:1.1.2.2]

2005-04-19 Thread Tim Peters
[Mark Hammond]
 [For some reason Tim's original still hasn't arrived!]

You know, from my POV that statement is pretty mysterious, since you
seem to be replying to my email here wink.

[Tim Peters]
...
 I'm trying to build a new ZRS release.  Trying to stop the ZRS service
 now suddenly and for no reason at all wink logs an error, because
 I believe its onStop() method is getting called twice now, but used to
 be called only once.  That's no good for ZRS, because its onStop
 method makes a connection to a special shutdown port, and ZRS proper
 responds by shutting ZRS down.  The socket goes away along with it, so
 trying to connect to the shutdown port a second time raises an
 exception.

 I'm not entirely sure why this didn't used to happen.  I'm guessing
 that a stop request with the current code:

 1. Triggers SvcStop, which calls onStop() and sets hWaitStop.
 2. Setting hWaitStop in turn triggers the  WaitForMultipleObjects in run(),
and then that calls SvcStop again (which calls onStop() again).

 Anyway, is this bug or feature?  If it's a feature, I can make the ZRS
 subclass onStop() methods safe to call multiple times.  It doesn't
 _feel_ like a feature, though wink.
 
 From the sounds of things it is a bug wink.

 FYI, SvcStop is called by the (Python win32serviceutil) framework when an
 external request comes in to stop the service.

I think that's my #1 above, and I think that part works fine here. 
The tracebacks I see have run() in the call stack, which is why I
guess #2 is doing SvcStop it a second time.

 However, a service can stop also stop by its own accord.

I don't think ZRS ever does that, and am not sure how I could write
code to do it.  Does a Zope service ever decide to stop by its own
accord?

 The question, then, is under what cases should the onStop() calls be made?  It
 sounds to me like you want it called only when that external request comes in.

Maybe.  In the end, by whatever means a service gets shut down
(external, internal, whatever), I want to see the subclass onStop()
method called exactly once.

But that's mostly because that's what used to happen for the two
ZRS-related services, not because it's a Holy Principle I'd fight to
death to defend wink.

 Assuming that is the case, I believe both explicit calls to SvcStop() are
 bogus and can be removed completely.  The report of
 SERVICE_STOP_PENDING will happen as soon as these functions return
 False.  In both cases, it is not necessary to set hWaitStop as nothing is 
 going
 to wait on it once these lines get hit.  It seems we also don't want onStop()
 called at these times, so nothing the function does is necessary at those 
 points.

 Also FYI, service.py is identical in both 2.7 and 2.8, so can be copied
 between them.  I believe the diff you want is simply:

 RCS file: /cvs-repository/Zope/lib/python/nt_svcutils/Attic/service.py,v
 retrieving revision 1.1.2.3
 diff -u -r1.1.2.3 service.py
 --- service.py  14 Apr 2005 01:47:48 -  1.1.2.3
 +++ service.py  19 Apr 2005 04:48:18 -
 @@ -234,7 +234,6 @@
win32event.INFINITE)
 if rc == win32event.WAIT_OBJECT_0:
 # user sent a stop service request
 -self.SvcStop()
 keep_running = False
 elif rc == win32event.WAIT_OBJECT_0 + 1:
 # user did not send a service stop request, but
 @@ -261,7 +260,6 @@
 # this was an abormal shutdown.
 if self.backoff_cumulative  BACKOFF_MAX:
 self.error(restarting too frequently; quit)
 -self.SvcStop()
 return False
 self.warning(sleep %s to avoid rapid restarts
  % self.backoff_interval)
 
 That seems to work fine here.

Seems to work fine for the ZRS-related services too, although I didn't
get into the restarting too frequently branch.  Thank you.  If
nobody objects in the next 10 minutes, then, I'll check this in (and
port to Zope trunk (2.8) too).
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Coders] Zope Bugs, Features, and Patches Collector: Open Issues

2005-04-19 Thread tseaver
The following supporters have open issues assigned to them in this collector
(http://www.zope.org/Collectors/Zope).

Assigned and Open


  Brian

- ZPT not being processed with text/vnd.wap.wml mime type,
  [Accepted] http://www.zope.org/Collectors/Zope/968


  Caseman

- ZCTextUndex should not hold a reference to a lexicon,
  [Accepted] http://www.zope.org/Collectors/Zope/505

- locale based sorting in ZCatalog,
  [Accepted] http://www.zope.org/Collectors/Zope/738


  LRA

- FileUpload not iterable,
  [Accepted] http://www.zope.org/Collectors/Zope/1199


  Tiran

- Zope 2.7 doesnot serve pages to some accept-charset request headers,
  [Accepted] http://www.zope.org/Collectors/Zope/1492


  ajung

- manage_catalogIndexes: '# objects' is misleading,
  [Accepted] http://www.zope.org/Collectors/Zope/1587

- Multilingual search gives a wrong results.,
  [Accepted] http://www.zope.org/Collectors/Zope/1343

- WebDAV broken in 2.7.0-b3,
  [Accepted] http://www.zope.org/Collectors/Zope/1145

- Mount-Points: documentation incomplete, behaviour surprising,
  [Accepted] http://www.zope.org/Collectors/Zope/1487

- Need a way to include non-xml valid structure in ZPT attributes,
  [Accepted] http://www.zope.org/Collectors/Zope/1281


  chrism

- ZODBMountPoint should not monkey-patch ZODB,
  [Accepted] http://www.zope.org/Collectors/Zope/1525

- poor error reporting on product initialization failure under windows,
  [Accepted] http://www.zope.org/Collectors/Zope/1020

- Potential bug in Python cgi.FieldStorage can lead to problematic memory 
growth,
  [Accepted] http://www.zope.org/Collectors/Zope/1685

- TemporaryStorage should be made MVCC-capable on HEAD,
  [Accepted] http://www.zope.org/Collectors/Zope/1526

- Lurking CPU eater in Transience,
  [Accepted] http://www.zope.org/Collectors/Zope/1633


  chrisw

- security.declareObjectProtected('View') appears to be buggy,
  [Accepted] http://www.zope.org/Collectors/Zope/1264

- Zope 2.7.3b1 DAV server doesn't provide DAV header,
  [Accepted] http://www.zope.org/Collectors/Zope/1518

- VHM and ZCatalog absolute paths,
  [Accepted] http://www.zope.org/Collectors/Zope/608

- default page encoding hardcoded to latin1,
  [Accepted] http://www.zope.org/Collectors/Zope/1490

- Debug Information Illegible,
  [Accepted] http://www.zope.org/Collectors/Zope/1736

- Windows Linefeeds in ZPT,
  [Accepted] http://www.zope.org/Collectors/Zope/1464


  ctheune

- hasattr_unacquired,
  [Accepted] http://www.zope.org/Collectors/Zope/742

- Shutdown ZEO Server under Windows,
  [Accepted] http://www.zope.org/Collectors/Zope/1508


  dreamcatcher

- PropertySheets xml_escape method with hardcoded encoding,
  [Accepted] http://www.zope.org/Collectors/Zope/1561


  efge

- default page encoding hardcoded to latin1,
  [Accepted] http://www.zope.org/Collectors/Zope/1490

- ZCatalog getObject broken,
  [Accepted] http://www.zope.org/Collectors/Zope/1713


  evan

- Cant declare classes in Scripts with 2.7 and Python 2.3,
  [Accepted] http://www.zope.org/Collectors/Zope/1074


  fdrake

- ZCTextUndex should not hold a reference to a lexicon,
  [Accepted] http://www.zope.org/Collectors/Zope/505

- [Weakness] analysis of Zope startup problems (log hidden),
  [Accepted] http://www.zope.org/Collectors/Zope/1285

- FTP server does not implement MLSD or MLST,
  [Accepted] http://www.zope.org/Collectors/Zope/1161

- Make possible to configure non-default logger hierarchies via zope.conf,
  [Accepted] http://www.zope.org/Collectors/Zope/1555


  htrd

- startup ConflictError,
  [Deferred] http://www.zope.org/Collectors/Zope/300


  jeremy

- Transaction Manager Brokenness,
  [Accepted] http://www.zope.org/Collectors/Zope/701

- ZODB load state error,
  [Accepted] http://www.zope.org/Collectors/Zope/1204


  jim

- aq_acquire on u'aq_parent',
  [Accepted] http://www.zope.org/Collectors/Zope/1738


  mcdonc

- filestream_iterator handling is not implemented for FastCGI protocol.,
  [Accepted] http://www.zope.org/Collectors/Zope/1647


  mj

- expectMultipleRanges test should use email package,
  [Accepted] http://www.zope.org/Collectors/Zope/579


  mjablonski

- Error in zmi when an object is named 'URL' or 'URL1',
  [Accepted] http://www.zope.org/Collectors/Zope/1217


  slinkp

- AcceleratedHTTPCacheManager doesn't PURGE correctly for virtual hosts,
  [Accepted] http://www.zope.org/Collectors/Zope/1447


  tim_one

- Zope 2.8/ZODB 3.3: Update all cPickle.Pickler instances to use protocal 
2,
  [Accepted] http://www.zope.org/Collectors/Zope/1519

- ZCTextUndex should not hold a reference to a lexicon,
  [Accepted] http://www.zope.org/Collectors/Zope/505

- ZODB load state 

Re: [Zope-Coders] Wrong username and password == Anonymous User?

2005-04-19 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 20 Apr 2005 12:09 pm, Sidnei da Silva wrote:
 - If you want to access a anonymous page, you will *not* be sending
   auth credentials.

Why do you say that? Cooke auth doesn't distinguish between anonymous pages 
and pages that require a user, so the cookie will be sent for every request. 
IIRC, this is also how Basic Auth works, once your browser knows you've got 
valid credentials for a site.


 Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCZcCyrGisBEHG6TARAvRoAJ4sWIc5jy9gmMmOR5dgfg8EVj4msACeIM80
fpLGmzjaZ7aJ8wG7uD0pH8g=
=aSFF
-END PGP SIGNATURE-
___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-dev] debug-mode on under Windows 2000.

2005-04-19 Thread Chris Withers
[EMAIL PROTECTED] wrote:
I'm trying to get Zope to reload my Python modules so I don't have to restart 
Zope after code changes. Even with debug-mode on (according to the zope 
config file, it defaults to on) my modules are not being reloaded unless I do a 
restart. Is there a fix for this?
Debug mode has nothing to do with this. Your products need to support 
refresh. Do they?

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope] Firefox manage_changePermissions issue?

2005-04-19 Thread Tony Addyman
I have experienced the following problem on two separate Zope/Plone sites.
It is reasonably repeatable, but sometimes works without problem. I have a
ZODB saved for testing purposes. I have tried fsrecovery.py on the
database. It is not corrupted. Firefox fails on this database every time.

The scenario: I change a permission setting using the ZMI of a Plone Site. I
press the Save Changes button. Firefox sends a
POST .../manage_changePermissions message to make the required change. A
200 response is returned. Firefox then immediately sends a
GET .../manage_changePermissions without any interaction from the user.
This totally destroys the permission settings for the object. Naturally,
two transactions are logged, and undoing the second one fixes the error.
However, it took over a day of digging to work this out, and the error is
quite heart-stopping when it hits, because you are locked out of the object
- in my case the entire Plone site.

I can make this behaviour occur with Firefox repeatedly, but not quite
always. If I continue to work on a site making changes and undoing them,
sometimes the manage_changePermissions is only sent once. If I return to
the saved ZODB and restart Zope, the duplicate sending happens in Firefox
without fail. I have tried both Firefox-1.0.1 and Firefox-1.0.3. I have not
managed to make it happen with Mozilla-1.7.2 or Konqueror-3.3.0, but I have
been using Firefox most of the time because of the Live HTTP Headers
extension.

I have the logs, HTTP messages between browser and server, etc. I can't see
anything in the Zope Access Control source which would cause a GET to be
used after the POST. The GET is logged in the Firefox Live HTTP Headers, so
it is not being generated further down the line by a proxy.

I have a solution to apply next time this happens (use undo), but I would
really like to track this one down. Any suggestions as to what to try next?
I don't really want to study the Firefox source. I would rather learn about
Zope and Plone :-)

Thanks
Tony Addyman
-- 
Eur Ing A.M.Addyman, School of Computing, Science and Engineering
University of Salford, Salford, M5 4WT

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Restart button in Control Panel

2005-04-19 Thread Milos Prudek
I don't think that debug mode has anything to do with it. Rather, if 
Correct. i have debug mode off, no Restart button.
you're using runzope it's not running in daemon mode, and so cannot 
restart. Run it as a service with 'zopectl start' and you'll have a 
Restart button.
Correct again. Thank you JCC.
--
Milos Prudek
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] tal:attributes and extra newline

2005-04-19 Thread bruno modulix
Andreas Jung wrote:
--On Montag, 18. April 2005 17:55 Uhr +0200 Pascal Peregrina 
[EMAIL PROTECTED] wrote:

Ok, it was TALInterpreter after all, but you need a long list of
attributes (on a single line / single tal:attributes statement I mean)...
It's because of the TAL.TALInterpreter.TALInterpreter.wrap value
defaulting to 60 (see __init__)
I managed, in my object that relies on PageTemplate, to set warp to 0 and
I got no more extra newlines.
So, just to know, why is the default value 60 ?

It could be 42 or 120 or 800 :-)
And it *really* should be 42.
--
Bruno Desthuilliers
Développeur
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] How to break up an external method over multiply source files

2005-04-19 Thread Lucas Hofman
I have an external method a.py (in $INSTANCE_HOME/Extensions) that 
becomes to big to be in one python file.

I have put some functions in b.py (also in $INSTANCE_HOME/Extensions) 
and want to use them from a.py. However 'import b' in a.py does not work.

How to get this to work?
Lucas
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to break up an external method over multiply source files

2005-04-19 Thread Andreas Jung

--On Dienstag, 19. April 2005 11:25 Uhr +0200 Lucas Hofman 
[EMAIL PROTECTED] wrote:

I have an external method a.py (in $INSTANCE_HOME/Extensions) that
becomes to big to be in one python file.
I have put some functions in b.py (also in $INSTANCE_HOME/Extensions) and
want to use them from a.py. However 'import b' in a.py does not work.
*Why* isn't it working? Errors? Tracebacks?
-aj



pgp1BnwMM4bLQ.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: How to break up an external method over multiply source files

2005-04-19 Thread Lucas Hofman
Andreas Jung wrote:

--On Dienstag, 19. April 2005 11:25 Uhr +0200 Lucas Hofman 
[EMAIL PROTECTED] wrote:

I have an external method a.py (in $INSTANCE_HOME/Extensions) that
becomes to big to be in one python file.
I have put some functions in b.py (also in $INSTANCE_HOME/Extensions) and
want to use them from a.py. However 'import b' in a.py does not work.
*Why* isn't it working? Errors? Tracebacks?
Sorry, I finished typing a little to early. I get an importerror:
Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.ExternalMethod.ExternalMethod, line 216, in __call__
  Module Products.ExternalMethod.ExternalMethod, line 157, in 
reloadIfChanged
  Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
  Module App.Extensions, line 148, in getObject
   - __traceback_info__: ('/data/technology/Extensions/Import.py', 
'Import')
  Module /data/technology/Extensions/Import.py, line 6, in ?
ImportError: No module named Translate

(Translate.py is in the same folder as Import.py)
Lucas
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: How to break up an external method over multiply source files

2005-04-19 Thread Lucas Hofman
Lucas Hofman wrote:
Andreas Jung wrote:

--On Dienstag, 19. April 2005 11:25 Uhr +0200 Lucas Hofman 
[EMAIL PROTECTED] wrote:

I have an external method a.py (in $INSTANCE_HOME/Extensions) that
becomes to big to be in one python file.
I have put some functions in b.py (also in $INSTANCE_HOME/Extensions) 
and
want to use them from a.py. However 'import b' in a.py does not work.

*Why* isn't it working? Errors? Tracebacks?
Sorry, I finished typing a little to early. I get an importerror:
Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.ExternalMethod.ExternalMethod, line 216, in __call__
  Module Products.ExternalMethod.ExternalMethod, line 157, in 
reloadIfChanged
  Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
  Module App.Extensions, line 148, in getObject
   - __traceback_info__: ('/data/technology/Extensions/Import.py', 
'Import')
  Module /data/technology/Extensions/Import.py, line 6, in ?
ImportError: No module named Translate

(Translate.py is in the same folder as Import.py)
In Import.py sys.path has the following value:
['/data/technology/Products/validation/validators/..', 
'/data/technology/lib/python', 
'/usr/local/zope272/lib/python/Zope/Startup', 
'/usr/local/zope272/lib/python', '/usr/local/lib/python23.zip', 
'/usr/local/lib/python2.3', '/usr/local/lib/python2.3/plat-linux2', 
'/usr/local/lib/python2.3/lib-tk', 
'/usr/local/lib/python2.3/lib-dynload', 
'/usr/local/lib/python2.3/site-packages']

(/data/technology in $INSTANCE_HOME). I would have expected 
/data/technology in sys.path.

Lucas
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope on cdrom

2005-04-19 Thread Chris Withers
Nicolas Perrier - Zindep wrote:
File /mnt/cdrom/python/lib/python2.3/asyncore.py, line 543, in __init__
  flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0)
AttributeError: 'module' object has no attribute 'fcntl'
Somebody can it help me? Is there any other handbook? Thanks.
This looks more like you are trying ot use zopectl on Windows than 
anything to do with being on a CDROM.

Is that the case?
cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Problem with Zope Threads on Debain

2005-04-19 Thread Chris Withers
David wrote:
I have installed the zope debian (sarge) package. The default number of 
threads is 4 but only one thread is running.
I installed this package in several machines and I have this problem in 
everyone.
How are you deducing that only one thread is running?
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Using USB smart token with Apache-enabled Zope web site

2005-04-19 Thread Chris Withers
[EMAIL PROTECTED] wrote:
I would like to create a collaborative environment where people would work  
on Blender files (among other file types) with yet unknown parties and  enforce 
2-way authenticated access to the Zope web site with smart tokens. I  want 
also manage the Zope web site from behind my NAT router.  How do I go  about 
this?
Sounds like looking at PluggableAuthenticationService or 
SimpleUserFolder would be a good start ;-)

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Meta Type change

2005-04-19 Thread Chris Withers
David wrote:
I was wondering if I could just alter the meta_type for the object from 
within Zope, maybe through a python script and see if that makes the 
object accessible again. I can't find anything on how to change the 
meta_type for an existing object though.
This is likely ot be the wrong way to go about it.
You need to put the code for the class of object with the problems back 
in a state it was when things were last working.

Changing meta_type, or worse still, trying to change the class of a 
persistent object will lead to much pain and suffering...

Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] problems with *.zip and IE6 behind Apache

2005-04-19 Thread Chris Withers
Sounds like this is an Apache problem and should be directed to an 
Apache mailing list...

Chris
robert wrote:
Hi there,
Internet Explorer can not open *.zip files served by Zope.
I use apache 2.49 and mod_deflate on Linux (Suse 9.1/2)
I use the following rule to supress compression:
# Don't compress images, java scripts and style sheets
 #_robert_ pdf, gz hinzugeuegt
 SetEnvIfNoCase Request_URI \
   \.(?:gif|jpe?g|png|js|css|pdf|gz|zip)$ no-gzip dont-vary

This helps for pdf but not for zip files.
The zip files load fine if I get ther directly from zope (by using a 
port number in the url)

thanks for any hints
Robert
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Firefox manage_changePermissions issue?

2005-04-19 Thread Chris Withers
Tony Addyman wrote:
I have experienced the following problem on two separate Zope/Plone sites.
It is reasonably repeatable, but sometimes works without problem. I have a
ZODB saved for testing purposes. I have tried fsrecovery.py on the
database. It is not corrupted. Firefox fails on this database every time.
I think I may have hosed a ZODB in just this way.
Anyone got any ideas on how to stop Firefox doing this? ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: How to break up an external method over multiply source files

2005-04-19 Thread Lucas Hofman
Lucas Hofman wrote:
Sorry, I finished typing a little to early. I get an importerror:
Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.ExternalMethod.ExternalMethod, line 216, in __call__
  Module Products.ExternalMethod.ExternalMethod, line 157, in 
reloadIfChanged
  Module Products.ExternalMethod.ExternalMethod, line 141, in getFunction
  Module App.Extensions, line 148, in getObject
   - __traceback_info__: ('/data/technology/Extensions/Import.py', 
'Import')
  Module /data/technology/Extensions/Import.py, line 6, in ?
ImportError: No module named Translate

(Translate.py is in the same folder as Import.py)
The solution was to set the path variable in zope.conf to 
$Instance/Extensions.

Thanks, Lucas
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: How to break up an external method over multiply source files

2005-04-19 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Andreas Jung wrote:
| --On Dienstag, 19. April 2005 11:25 Uhr +0200 Lucas Hofman
| [EMAIL PROTECTED] wrote:
|
| I have an external method a.py (in $INSTANCE_HOME/Extensions) that
| becomes to big to be in one python file.
|
| I have put some functions in b.py (also in
| $INSTANCE_HOME/Extensions) and want to use them from a.py. However
| 'import b' in a.py does not work.
|
| *Why* isn't it working? Errors? Tracebacks?
The file from which an ExternalMethod is instantiated is neither a
script nor a module, which means that Python's import rules don't work
for it.
In response to the original question:  I would put the 'b.py' file
somewhere on the PYTHONPATH ($INSTANCE_HOME/lib/python would be a good
choice);  'import b' will then work as expected.
Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  Zope Dealers   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCZQ2aGqWXf00rNCgRAtD/AKCC8E0O0mMEEF2eW0AGXf1aofWopgCfZIHr
xvjVCTq8SS2IxRntZv77BbM=
=0f3g
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Firefox manage_changePermissions issue?

2005-04-19 Thread Paul Winkler
On Mon, Apr 18, 2005 at 10:53:00PM +0100, Tony Addyman wrote:
 I have experienced the following problem on two separate Zope/Plone sites.
 It is reasonably repeatable, but sometimes works without problem. I have a
 ZODB saved for testing purposes. I have tried fsrecovery.py on the
 database. It is not corrupted. Firefox fails on this database every time.

(snip)

I have not been able to provoke anything similar with Firefox 1.03
and CMFDefault 1.4.2 which is what I had handy when I read your message.

You might try Shane's tcpwatch.py to further analyze the problem:
Start it like e.g. (if zope is running on http://fooserver:8080):

tcpwatch.py -h -L :fooserver:8080

then point your browser at http://localhost: and
tcpwatch will log *everything* that goes between server and browser -
all request data, all response headers and data.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] (no subject)

2005-04-19 Thread Maslak, Michael








Hi All,



How do I install multiple instances of Zope that are valid
Windows Services in W2K3 w/ SP1 installed? i.e. start like an automatic service
on startup?



Only the initial instance that gets created during the
installation process gets associated with a Hardware Profile,
Profile1 here. (cmd: services.msc - Zope Instance at
D:\Core-Instance - Log On tab - Profile1 is listed in the
properties. 



If I try to run the Zope installer again to create another
Windows service instance, it does not get associated with a Hardware Profile
like the first. (e.g. services.msc - Zope Instance at
D:\Next-Instance - brings up a complaint dialog:



Configuration Manager: The specified Device ID is not
a valid Device ID. Indeed, the properties box has NO entry for a Hardware
Profile of any kind.



And all other services created with the Create Zope Instance
tool require manual start.



Thank you.



Michael Maslak








___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread David Given
I apologise if this is a newbie question, but I can't seem to find
anything in the documentation about this.

The way Zope seems to want to organise things is so that folders roughly
equate to classes. That is, if I have B inside A, then B inherits its
behaviour from A. All of B's siblings are the same sort of object.

However, this means that I have to seperate all my various types of
object by kind, regardless of whether they're related.

Let's say I have a site that talks about flowers. I have two main kinds
of object: images of flowers, which support methods for scaling etc, and
descriptions of flowers, which support methods for rendering in various
interesting ways. I have to arrange things like this:

/
  Text
HistoryOfTheDaisy
MoreInformationAboutDaisies
HowToGeneticallyEngineerRoses
MyFavouriteRoseStories
  Images
WildDaisy
DomesticatedDaisy
MutatedDaisyFromBeyondTimeAndSpace
FakePictureOfABlackRose

This works, but is a bit icky. I have my daisies mixed in with my roses.

It would be far more convenient for organisational purposes if I
arranged things like this:

/
  Daisy
Text
  HistoryOfTheDaisy
  MoreInformationAboutDaisies
Images
  WildDaisy
  DomesticatedDaisy
  MutatedDaisyFromBeyondTimeAndSpace
  Rose
Text
  HowToGeneticallyEngineerRoses
  MyFavouriteRoseStories
Images
  MutatedDaisyFromBeyondTimeAndSpace
  FakePictureOfABlackRose

But to make this work, I need to duplicate all the code in each 'Text'
and 'Images' folder...

Is it possible to tell Zope that methods for a particular kind of object
should be found at a particular location, regardless of the containment
hierarchy? That way I could have /lib/text and /lib/image that contain
the reference code to make my text and images work; the Text and Images
folders would then point at these. Or even better, I'd like to do
without the Text and Images folders completely and just mix .pt and .jpg
files in the Daisy and Rose folders.

But I can't seem to find out whether I can do this.

Is this in fact possible, or do I need to start tinkering with custom
products?

-- 
+- David Given --McQ-+ Every planet is weird. I spent six weeks on a
|  [EMAIL PROTECTED]| moon where the principal form of recreation was
| ([EMAIL PROTECTED]) | juggling geese. Baby geese. Goslings. They were
+- www.cowlark.com --+ juggled. --- Firefly, _Our Mrs. Reynolds_

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Using USB smart token with Apache-enabled Zope web site

2005-04-19 Thread Tom Trelvik
Chris Withers wrote:
Sounds like looking at PluggableAuthenticationService or 
	Easier to find by searching for Pluggable*Auth*Service (without the 
asterisks for emphasis).

Tom
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread Paul Winkler
On Tue, Apr 19, 2005 at 04:31:15PM +0100, David Given wrote:
 Is this in fact possible, or do I need to start tinkering with custom
 products?

That's what I would do.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread bruno modulix
David Given wrote:
I apologise if this is a newbie question, but I can't seem to find
anything in the documentation about this.
The way Zope seems to want to organise things is so that folders roughly
equate to classes. 
Nope.
That is, if I have B inside A, then B inherits its
behaviour from A. 
B acquire part of its behavior from A. But acquisition is not only by 
containment, it's also by context.

All of B's siblings are the same sort of object.
Why do you have this strange idea ?
However, this means that I have to seperate all my various types of
object by kind, regardless of whether they're related.
Not at all. The most obvious think to do is to put your objects where 
they belongs - that is, use the ZODB hierarchie like you'd use a plain 
filesystem for a static site.

Let's say I have a site that talks about flowers. I have two main kinds
of object: images of flowers, which support methods for scaling etc, and
descriptions of flowers, which support methods for rendering in various
interesting ways. I have to arrange things like this:
/
  Text
HistoryOfTheDaisy
MoreInformationAboutDaisies
HowToGeneticallyEngineerRoses
MyFavouriteRoseStories
  Images
WildDaisy
DomesticatedDaisy
MutatedDaisyFromBeyondTimeAndSpace
FakePictureOfABlackRose
This works, but is a bit icky. I have my daisies mixed in with my roses.
It would be far more convenient for organisational purposes if I
arranged things like this:
/
  Daisy
Text
  HistoryOfTheDaisy
  MoreInformationAboutDaisies
Images
  WildDaisy
  DomesticatedDaisy
  MutatedDaisyFromBeyondTimeAndSpace
  Rose
Text
  HowToGeneticallyEngineerRoses
  MyFavouriteRoseStories
Images
  MutatedDaisyFromBeyondTimeAndSpace
  FakePictureOfABlackRose
But to make this work, I need to duplicate all the code in each 'Text'
and 'Images' folder...
Nope. The most obvious thing to do is : put that code in your root 
folder. Now everyone will acquire it, and you'll be a happy webmaster. 
(unless of course there are name clashes somewhere !-)


Is it possible to tell Zope that methods for a particular kind of object
should be found at a particular location, regardless of the containment
hierarchy? 
0/ Put all your code in the root folder and use acquisition by 
containment. QD, but proven to work.

1/ add (in the root folder, or anywhere on top of your Flowers) a folder 
for each 'type of object', put the 'methods' in, and use acquisition by 
context:

text_methods
  dothis
  dothat
image_methods:
  dosomething
  dosomethingelse
Then calls like:
Rose/Text/MyFavouriteRoseStories/text_methods/do_this
Should work. But I would not do it (at least for your exemple).
2/ Write a product for your object types. Here it could be a Flower 
object, extending Folder so you can put texts and images in, and having 
all the code needed for your texts and images.

Is this in fact possible, or do I need to start tinkering with custom
products?
Anyway, you *should* write your own Products - and for this kind of 
things, it's pretty easy.

--
Bruno Desthuilliers
Développeur
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread Lennart Regebro
On 4/19/05, David Given [EMAIL PROTECTED] wrote:
 I apologise if this is a newbie question, but I can't seem to find
 anything in the documentation about this.
 
 The way Zope seems to want to organise things is so that folders roughly
 equate to classes. That is, if I have B inside A, then B inherits its
 behaviour from A. All of B's siblings are the same sort of object.

You can do it like that, yes. You only HAVE to, if you develop
everything with pythin scripts. Disk-based products overcome this
completely.

 But to make this work, I need to duplicate all the code in each 'Text'
 and 'Images' folder...

Well, no. You can just put all of it in the top folder. ugh :)
Or, as mentioned above, make a python product.

 Is this in fact possible, or do I need to start tinkering with custom
 products?

Well, you *should* in any case. ;)


-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Convert Photos to ExtImage store

2005-04-19 Thread David Chandek-Stark
I have a few PhotoFolders containing Photos that are stored in the ZODB 
which I would like to convert to ExtImage storage. Since the number is 
large enough to make a manual process painful, I'd like to write a 
conversion script. Seems simple enough in principle, but I'm having 
trouble getting started. First, how do you use manage_addPhoto()? I 
assumed that photo_folder.manage_addPhoto() would work, but I get

AttributeError: manage_addPhoto
Ideally, the script would operate on a PhotoFolder object, say, making a 
new PhotoFolder, then creating all the new Photos based on the old ones. 
I can manually delete the old folder and rename the new one.

Thanks,
David
Zope 2.7.0/Python 2.3.2
Photo 1.2.3
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Convert Photos to ExtImage store

2005-04-19 Thread J Cameron Cooper
David Chandek-Stark wrote:
I have a few PhotoFolders containing Photos that are stored in the ZODB 
which I would like to convert to ExtImage storage. Since the number is 
large enough to make a manual process painful, I'd like to write a 
conversion script. Seems simple enough in principle, but I'm having 
trouble getting started. First, how do you use manage_addPhoto()? I 
assumed that photo_folder.manage_addPhoto() would work, but I get

AttributeError: manage_addPhoto
Ideally, the script would operate on a PhotoFolder object, say, making a 
new PhotoFolder, then creating all the new Photos based on the old ones. 
I can manually delete the old folder and rename the new one.
The factory method is not available in context: you must get it with 
manage_addProduct. See, for example,

http://zopelabs.com/cookbook/1012279676
You may also be interested in
http://vsbabu.org/webdev/zopedev/zodb2ext.html
		--jcc
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread David Given
On Tue, 2005-04-19 at 18:43 +0200, bruno modulix wrote:
[...]
  All of B's siblings are the same sort of object.
 
 Why do you have this strange idea ?

From, uh, the documentation... because all of B's siblings will inherit
the same methods from A.

[...]
 Then calls like:
 Rose/Text/MyFavouriteRoseStories/text_methods/do_this

Ah, so *that's* how acquisition by context works! (I couldn't find any
documentation on this. All the documentation about acquisition by
context just says 'this is really complicated and I'm not going to
describe it here'.)

 2/ Write a product for your object types. Here it could be a Flower 
 object, extending Folder so you can put texts and images in, and having 
 all the code needed for your texts and images.

Unfortunately, this requires having the code dealing with text and
images to be in the same place, which breaks encapsulation.

It actually looks like acquisition by context is most likely my best bet
so far...

Incidentally, is it possible to override the default behaviour of an
object? Is there any way of allowing Rose/MyFavouriteRoseStories do
something *other* than just executing the named page template, other
than making MyFavouriteRoseStories a folder and overriding index_html?

[...]
 Anyway, you *should* write your own Products - and for this kind of 
 things, it's pretty easy.

Meh. Can you point me at any good tutorial documentations?

-- 
+- David Given --McQ-+ The cup of Ireland's misfortunes has been
|  [EMAIL PROTECTED]| overflowing for centuries, and it is not full yet.
| ([EMAIL PROTECTED]) | --- Sir Boyle Roche
+- www.cowlark.com --+ 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread Paul Winkler
On Tue, Apr 19, 2005 at 06:17:30PM +0100, David Given wrote:
 On Tue, 2005-04-19 at 18:43 +0200, bruno modulix wrote:
 [...]
   All of B's siblings are the same sort of object.
  
  Why do you have this strange idea ?
 
 From, uh, the documentation... because all of B's siblings will inherit
 the same methods from A.

Sure, but that doesn't constrain the types you can add to a folder.

If you want to constrain availability of a method to instances of
a particular class, then it should be written as a method of that
class.  Acquisition is meta_type-agnostic.
 
 [...]
  Then calls like:
  Rose/Text/MyFavouriteRoseStories/text_methods/do_this
 
 Ah, so *that's* how acquisition by context works! (I couldn't find any
 documentation on this. All the documentation about acquisition by
 context just says 'this is really complicated and I'm not going to
 describe it here'.)

It's in the Advanced Scripting chapter of the online Zope Book,
and there are some warnings about ways it can make your system
harder to maintain.
 
 Incidentally, is it possible to override the default behaviour of an
 object? Is there any way of allowing Rose/MyFavouriteRoseStories do
 something *other* than just executing the named page template, other
 than making MyFavouriteRoseStories a folder and overriding index_html?
 
 [...]
  Anyway, you *should* write your own Products - and for this kind of 
  things, it's pretty easy.
 
 Meh. Can you point me at any good tutorial documentations?

http://zopewiki.org/DiskBasedProduct

- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Convert Photos to ExtImage store

2005-04-19 Thread David Chandek-Stark
OK, my problem now is how to feed the image data from the ZODB photos to 
the factory method. If 'photo' is the original image object, I've tried 
photo.file (attribute error: file), photo.data (attribute error: read - 
line 658 of Photo.py), and other things. There must be a simple way to 
get the file object that manage_addPhoto() wants.

Thanks,
David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Organisational vs. Functional hierarchies

2005-04-19 Thread Lennart Regebro
On 4/19/05, David Given [EMAIL PROTECTED] wrote:
 Unfortunately, this requires having the code dealing with text and
 images to be in the same place, which breaks encapsulation.

Zope is not a programming language. :-)
Yes, Acquisition has similarieties to class inheritance, but it isn't,
and trying to use is as if it was will just get strange.

Acquisition can be handy for inheriting data (or rather,
configuration), but not methods.

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Writing products (was: Organisational vs. Functional hierarchies)

2005-04-19 Thread Milos Prudek

Meh. Can you point me at any good tutorial documentations?
I just learned how to write products in about four hours by reading the 
following tutorials:

Start with the minimal Product
http://www.zope.org/Members/maxm/HowTo/minimal_01/
Then read about Boring product
http://www.zope.org/Members/gtk/Boring
and finish with JMBoring
http://www.zope.org/Members/jmeile/JMBoring
You then do not need to write your product from scratch. You can easily 
modify JMBoring.

Thanks to Paul Winkler and Cliff Ford who pointed these excellent docs 
to me.

--
Milos Prudek
http://www.spoxdesign.com - your web usability testing
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Organisational vs. Functional hierarchies

2005-04-19 Thread Lennart Regebro
  Acquisition can be handy for inheriting data (or rather,
  configuration), but not methods.
 
 Hmmm CMF skins (templates, Python Scripts, etc.) all work via
 acquisition;  placeful scripting in general relies on it heavily.
 There is admittedly a lot of extra machinery in place to make sure that
 CMF objects select the right templates, based on their 'portal_type',
 but CMF / Plone / CPS wouldn't work at all without the ability to
 acquire software.

Ah, and you create nice contained classes with CMF skins? Or, do all
object have all methods? CMF skins is not an object oriented
programming language either.

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope2.7.4 with Python2.4?

2005-04-19 Thread Luis N
Hi,

I fired up zope ona new server yesterday. It's very very slow! I didn't think about it much at first (because I didn't think it possible), but,
 sh bin/runzope/usr/local/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom module is deprecated; please use the random moduleDeprecationWarning)trimmed
line 99, in ?import psycopgImportError: No module named psycopg/trimmed


 /usr/local/bin/python2.3Python 2.3.4 (#2, Jan 1 2005, 23:02:40)[GCC 2.95.4 20020320 [FreeBSD]] on freebsd4Type help, copyright, credits or license for more information.
 import psycopg
Zope appears to be defaulting, and running with Python2.4

Forgive my newbieness, but might this be because I did something silly like:

 python mkzopeinstance.py

rather than,

 /usr/local/bin/python2.3 mkzopeinstance.py

when the instance was first created?___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope2.7.4 with Python2.4?

2005-04-19 Thread Luis N
Hi,


Zope appears to be defaulting, and running with Python2.4

Forgive my newbieness, but might this be because I did something silly like:
 python mkzopeinstance.py

rather than,

 /usr/local/bin/python2.3 mkzopeinstance.py

when the instance was first created?

nm, I fixed 'runzope', and 'zopectl' to reflect the appropriate python.___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope2.7.4 with Python2.4?

2005-04-19 Thread Paul Winkler
On Tue, Apr 19, 2005 at 05:45:08PM -0500, Luis N wrote:
  Forgive my newbieness, but might this be because I did something silly 
 like:
   python mkzopeinstance.py
  rather than,
   /usr/local/bin/python2.3 mkzopeinstance.py
  when the instance was first created?

Yep, that'd be my guess.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Zope2.7.4 with Python2.4?

2005-04-19 Thread Paul Winkler
On Tue, Apr 19, 2005 at 06:45:04PM -0500, Luis N wrote:
 Hi, 
   Zope appears to be defaulting, and running with Python2.4
  
 Forgive my newbieness, but might this be because I did something silly 
 like:
 
  python mkzopeinstance.py
  
 rather than,
  
  /usr/local/bin/python2.3 mkzopeinstance.py
  
 when the instance was first created?
  nm, I fixed 'runzope', and 'zopectl' to reflect the appropriate python.

Note that python2.4 is not officially blessed by the core
zope developers for zope 2.7.  Everybody still runs python 2.3
except maybe a few who live on the bleeding edge.
Just so you're properly warned :-)


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Memory management problems

2005-04-19 Thread Peter Millar
I have a serious memory problem.  And would like to hear from anyone who
has large image files being served up to a large number of simultaneous
user base.

I am running plone 2.0, zope 2.7.3, python 2.3.3, on windows 2003 server
with 1.5 GB RAM.

I have a 1MB image.  I have created a little script to copy and paste
this image.  To do it 50 times takes 6 minutes and uses up 300 MB of
RAM.  If I then view the folder that contains all the images and start
viewing the zpt that serves a single image it takes 40 seconds to a
minute 20 and chews up approx 2-5MB.  If I then get a few other machines
to request the same image at the same time, it takes 20seconds for the
first machine, 40 seconds for the next machine and 1 min for the next
machine and another 20 MB of ram has been chewed up.  Each time I go to
serve a page my CPU usage jumps to 50% for the minute or so.

After doing this over and over for a few minutes sees my machine has no
RAM left.  The only way to recover is to restart zope.

My question after all of this is how in the world can anyone seriously
use plone/zope in a real world scenario with potentially millions of
users accessing a site viewing content if you have to restart your zope
service every minute.

I have spent the past two days looking at all sorts of cacheing ideas,
session ideas etc.

Is there some magic that I need to apply for this to work like any
number of web image viewers.  Or is it a case of throwing 100GB of Ram
at the machine.

 
Peter Millar 



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] Memory management problems

2005-04-19 Thread Pascal Peregrina
My useless comment:

In such a real world scenario, anyone would put squid between Zope and the
millions of users. :)

Pascal

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de
Peter Millar
Envoyé : mercredi 20 avril 2005 02:28
À : [EMAIL PROTECTED]; Zope
Objet : [Zope] Memory management problems


I have a serious memory problem.  And would like to hear from anyone who
has large image files being served up to a large number of simultaneous
user base.

I am running plone 2.0, zope 2.7.3, python 2.3.3, on windows 2003 server
with 1.5 GB RAM.

I have a 1MB image.  I have created a little script to copy and paste
this image.  To do it 50 times takes 6 minutes and uses up 300 MB of
RAM.  If I then view the folder that contains all the images and start
viewing the zpt that serves a single image it takes 40 seconds to a
minute 20 and chews up approx 2-5MB.  If I then get a few other machines
to request the same image at the same time, it takes 20seconds for the
first machine, 40 seconds for the next machine and 1 min for the next
machine and another 20 MB of ram has been chewed up.  Each time I go to
serve a page my CPU usage jumps to 50% for the minute or so.

After doing this over and over for a few minutes sees my machine has no
RAM left.  The only way to recover is to restart zope.

My question after all of this is how in the world can anyone seriously
use plone/zope in a real world scenario with potentially millions of
users accessing a site viewing content if you have to restart your zope
service every minute.

I have spent the past two days looking at all sorts of cacheing ideas,
session ideas etc.

Is there some magic that I need to apply for this to work like any
number of web image viewers.  Or is it a case of throwing 100GB of Ram
at the machine.

 
Peter Millar 



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Memory management problems

2005-04-19 Thread Chris McDonough
Many things could be going on here.  I don't know of any outstanding
memory leaks in Zope itself.  There may be one in Plone or another
3rd-party product you're using.  Or you may have created one within your
own code.  Tracking down memory leaks is hard and it's not clear to even
tell you where to start.  Best advice is to use binary exclusion in the
template that serves up the page (comment out half of it, serve it up,
see if that leaks, if so, divide in half again, and so on).  Once you've
tracked it down, remediation is another thing altogether, however.

On Tue, 2005-04-19 at 20:27, Peter Millar wrote:
 I have a serious memory problem.  And would like to hear from anyone who
 has large image files being served up to a large number of simultaneous
 user base.
 
 I am running plone 2.0, zope 2.7.3, python 2.3.3, on windows 2003 server
 with 1.5 GB RAM.
 
 I have a 1MB image.  I have created a little script to copy and paste
 this image.  To do it 50 times takes 6 minutes and uses up 300 MB of
 RAM.  If I then view the folder that contains all the images and start
 viewing the zpt that serves a single image it takes 40 seconds to a
 minute 20 and chews up approx 2-5MB.  If I then get a few other machines
 to request the same image at the same time, it takes 20seconds for the
 first machine, 40 seconds for the next machine and 1 min for the next
 machine and another 20 MB of ram has been chewed up.  Each time I go to
 serve a page my CPU usage jumps to 50% for the minute or so.
 
 After doing this over and over for a few minutes sees my machine has no
 RAM left.  The only way to recover is to restart zope.
 
 My question after all of this is how in the world can anyone seriously
 use plone/zope in a real world scenario with potentially millions of
 users accessing a site viewing content if you have to restart your zope
 service every minute.
 
 I have spent the past two days looking at all sorts of cacheing ideas,
 session ideas etc.
 
 Is there some magic that I need to apply for this to work like any
 number of web image viewers.  Or is it a case of throwing 100GB of Ram
 at the machine.
 
  
 Peter Millar 
 
 
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZPsycopgDA dropping connections?

2005-04-19 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Has anyone else seen ZPsycopgDA just lose its connection? I've got two ZEO 
clients set up to use it, and every now and then one of them (the primary) 
just up and loses its connection. There doesn't appear to be any message in 
the log file *except* for the message saying that the connection's not 
active:

2005-04-20T14:35:46 INFO(0) ZEC:/var/cache/cgzope/zope-8000/cmain-main-1.zec 
flipping cache files.  new current = 1
- --
2005-04-20T14:53:25 INFO(0) ZEC:/var/cache/cgzope/zope-8000/cmain-main-0.zec 
flipping cache files.  new current = 0
- --
2005-04-20T14:58:11 ERROR(200) SiteError 
http://laurastein.cgpublisher.com/CGPublisher
Traceback (most recent call last):
  File /home/cgzope/prod/Zope/lib/python/ZPublisher/Publish.py, line 92, in 
publish
  File /home/cgzope/prod/Zope/lib/python/ZPublisher/BaseRequest.py, line 
259, in traverse
  File /home/cgzope/prod/Zope/lib/python/ZPublisher/BeforeTraverse.py, line 
104, in __call__
  File /home/cgzope/prod/Zope/lib/python/ZPublisher/BeforeTraverse.py, line 
144, in __call__
  File /home/cgzope/prod/Products/CookieCrumbler/CookieCrumbler.py, line 
217, in __call__
attempt = self.modifyRequest(req, resp)
  File /home/cgzope/prod/Products/CGPublisher/SessionCookieCrumbler.py, line 
55, in modifyRequest
creds = req.SESSION.get(key,None)
  File /home/cgzope/prod/Zope/lib/python/ZPublisher/HTTPRequest.py, line 
1218, in __getattr__
  File /home/cgzope/prod/Zope/lib/python/ZPublisher/HTTPRequest.py, line 
1178, in get
  File 
/home/cgzope/prod/Products/ZSQLSessionDataManager/ZSQLSessionDataManager
.py, line 100, in getSessionData
return self._getSessionDataObject(key)
  File 
/home/cgzope/prod/Products/ZSQLSessionDataManager/ZSQLSessionDataManager
.py, line 233, in _getSessionDataObject
c = self._getSessionDataConnection()
  File 
/home/cgzope/prod/Products/ZSQLSessionDataManager/ZSQLSessionDataManager
.py, line 250, in _getSessionDataConnection
return self.restrictedTraverse(self.obpath)()
  File /home/cgzope/prod/Zope/lib/python/Shared/DC/ZRDB/Connection.py, line 
173, in __call__
BadRequest: The database connection is not connected
- --

(apologies for the wrapping, of course)

Any ideas?


 Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCZedirGisBEHG6TARAo6WAJ98cBlOZqoZ62Amg0zreDkTPFiyAQCeJGla
gmhpp4lXn2wjFb6PnPkF3cI=
=8g/U
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZPsycopgDA dropping connections?

2005-04-19 Thread Tino Wildenhain
Hi,

Am Mittwoch, den 20.04.2005, 15:23 +1000 schrieb Richard Jones:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Has anyone else seen ZPsycopgDA just lose its connection? I've got two ZEO 
 clients set up to use it, and every now and then one of them (the primary) 
 just up and loses its connection. There doesn't appear to be any message in 
 the log file *except* for the message saying that the connection's not 
 active:
 

I remember there was a thread in the mailinglist about the new version
of ZPsycopgDA not automatically reconnecting after loosing connection.
So instead of the previous versions you now see the fact the connections
are dropped.

The reason for dropping the connection in the first place often lay in 
the inproper configuration of a intermediate firewall (see tcp session
timeout there)

Regards
Tino

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope-DB] Returning values from Oracle function/procedure withZSQLMethod

2005-04-19 Thread Chris Withers
Hi Cynthia,
Cynthia Kiser wrote:
When you do our own connection management, are you able to avoid
DCOracle2 leaking connections? In our Zope 2.6.1/DCOracle2-1.3b
server, we accumulate sessions where Oracle is waiting for a response
from Zope, but Zope apparently thinks it closed that connection and
opened a new one.
If you google for my name, Oracle and Zope you'll find lots of 
information on the problem ;-)
It's basically ZOracleDA's funny idea of connection pooling that causes 
the problem. Unless your ZSQL methods are hammered heavilly, you'll see 
plenty of unused oracle sessions. These aren't being leaked as you 
suggest, just not used very often. This results in Oracle Not 
Connected errors if your DBA sets a timeout on unused Oracle sessions...

 Manually closing and reopening the connection does
not clean up the forgotten sessions, so I periodically (~monthly)
restart the Zope server to clean up. 
Control Panel - Database - Main - Flush Cache will have the same 
effect...

me with the impression that its connection closing function did not
work.
It doesn't ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db