[Zope-Checkins] CVS: Packages/ZODB - BaseStorage.py:1.34.4.5

2005-10-05 Thread Tim Peters
Update of /cvs-repository/Packages/ZODB
In directory cvs.zope.org:/tmp/cvs-serv29632/ZODB

Modified Files:
  Tag: Zope-2_7-branch
BaseStorage.py 
Log Message:
tpc_abort():  Release the commit lock no matter what.


=== Packages/ZODB/BaseStorage.py 1.34.4.4 = 1.34.4.5 ===
--- Packages/ZODB/BaseStorage.py:1.34.4.4   Fri Apr 22 15:36:07 2005
+++ Packages/ZODB/BaseStorage.pyWed Oct  5 15:03:59 2005
@@ -144,8 +144,8 @@
 self._abort()
 self._clear_temp()
 self._transaction = None
-self._commit_lock_release()
 finally:
+self._commit_lock_release()
 self._lock_release()
 
 def _abort(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Packages/ZODB - BaseStorage.py:1.34.4.6

2005-10-05 Thread Tim Peters
Update of /cvs-repository/Packages/ZODB
In directory cvs.zope.org:/tmp/cvs-serv6225/ZODB

Modified Files:
  Tag: Zope-2_7-branch
BaseStorage.py 
Log Message:
tpc_abort():  Repair fubar'ed repaired logic.


=== Packages/ZODB/BaseStorage.py 1.34.4.5 = 1.34.4.6 ===
--- Packages/ZODB/BaseStorage.py:1.34.4.5   Wed Oct  5 15:03:59 2005
+++ Packages/ZODB/BaseStorage.pyWed Oct  5 15:31:01 2005
@@ -141,11 +141,13 @@
 try:
 if transaction is not self._transaction:
 return
-self._abort()
-self._clear_temp()
-self._transaction = None
+try:
+self._abort()
+self._clear_temp()
+self._transaction = None
+finally:
+self._commit_lock_release()
 finally:
-self._commit_lock_release()
 self._lock_release()
 
 def _abort(self):

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ Move to ZODB 3.4.2b3.

2005-10-05 Thread Tim Peters
Log message for revision 38783:
  Move to ZODB 3.4.2b3.
  

Changed:
  _U  Zope/branches/Zope-2_8-branch/doc/
  _U  Zope/branches/Zope-2_8-branch/lib/python/
  _U  Zope/branches/Zope-2_8-branch/utilities/

-=-

Property changes on: Zope/branches/Zope-2_8-branch/doc
___
Name: svn:externals
   - ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/doc/ZEO

   + ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/doc/ZEO



Property changes on: Zope/branches/Zope-2_8-branch/lib/python
___
Name: svn:externals
   - zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1

   + zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/BTrees
Persistencesvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/Persistence
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1



Property changes on: Zope/branches/Zope-2_8-branch/utilities
___
Name: svn:externals
   - ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/scripts

   + ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/scripts


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/ Merge rev 38783 from 2.8 branch.

2005-10-05 Thread Tim Peters
Log message for revision 38784:
  Merge rev 38783 from 2.8 branch.
  
  Move to ZODB 3.4.2b3.
  

Changed:
  _U  Zope/trunk/doc/
  _U  Zope/trunk/lib/python/
  _U  Zope/trunk/utilities/

-=-

Property changes on: Zope/trunk/doc
___
Name: svn:externals
   - ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/doc/ZEO

   + ZEO  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/doc/ZEO



Property changes on: Zope/trunk/lib/python
___
Name: svn:externals
   - zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/BTrees
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1

   + zope   
svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.1-Zope-2.8/src/zope
ZConfigsvn://svn.zope.org/repos/main/ZConfig/tags/ZConfig-2.3
BTrees svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/BTrees
persistent svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/persistent
ThreadedAsync  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ThreadedAsync
transactionsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/transaction
ZEOsvn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ZEO
ZODB   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ZODB
ZopeUndo   svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/ZopeUndo
zdaemonsvn://svn.zope.org/repos/main/zdaemon/tags/zdaemon-1.1



Property changes on: Zope/trunk/utilities
___
Name: svn:externals
   - ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b2/src/scripts

   + ZODBTools  svn://svn.zope.org/repos/main/ZODB/tags/3.4.2b3/src/scripts


___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Coders] Zope tests: 8 OK

2005-10-05 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Tue Oct  4 11:01:01 2005 UTC to Wed Oct  5 11:01:01 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:22:39 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003247.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:24:09 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003248.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:25:39 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003249.html

Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:27:10 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003250.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:28:40 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003251.html

Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:30:10 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003252.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:31:40 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003253.html

Subject: OK : Zope-trunk Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Tue Oct  4 22:33:10 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-October/003254.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


Re: [Zope-dev] log levels

2005-10-05 Thread Chris Withers

Florent Guillaume wrote:
For instance the transaction code logs at DEBUG level every  transaction 
start and end (self.log.debug(...)). This makes the logs  very verbose, 
and any other code I write that logs at DEBUG level  gets drowned in it. 
Previously transaction logs were at TRACE level  but this doesn't exist 
anymore, and the python logging framework  doesn't have anything between 
INFO and DEBUG or below DEBUG.


Well, it supports numeric log levels, and you can define your own log 
levels too.


I'd suggest the transaction code either logs at a numeric level:

logger.log(-100,...)

or we define another logging level for TRACE:

import logging
logging.TRACE = logging.DEBUG - 10
logging.addLevelName(logging.TRACE,'TRACE')

...which can then be used in the transaction code as follows:

logger.log(logging.TRACE,...)

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] Unable to start Zope

2005-10-05 Thread John Poltorak

Following a server reboot, I can't get Zope to run. I get a socket error - 
permission denied. How do I identify and delete this open socket?


-- 
John 


___
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] Accessing CURRENT property

2005-10-05 Thread Chris Withers

Peter Bengtsson wrote:

Not sure what it's called in Page Templates or Python Scripts but in
DTML it's called careful_hasattr() which wraps hasattr() in a
restricted context.


I wouldn't trust that either ;-)

hasattr's insane in that it catches prettymuch all exception, including 
ConflictErrors...


I much prefer get patterns of getattr(something,'something',None) or 
variants thereof, depending on the situation...


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] Testing products: Testing all in one batch

2005-10-05 Thread Chris Withers

Paul Winkler wrote:

Has anybody set up a batch job to test all installed Products
in a zope instance?


Yes ;-)


Seems like the only *useful* way I can get it to run is with a loop that
does bin/zopectl test once for each subdirectory of Products
that I actually care about, taking care to ignore problematic
third-party products.  Which is OK I guess, but I'd prefer not
to have to skip anything.


I have a python script that builds a big command line to test.py of the 
form:


bin/zopectl test Products/Product1|Products/Products2|etc

...it's not pretty, but it does work, and lets you exclude geb0rken 
products like Archetypes from test runs...



- Some otherwise excellent third-party products have tests with
  dependencies that the product itself does not have, and which
  I do not want to install. (I will contact the author(s) privately.)


Yep, I exclude them too ;-)


- Some third-party products (e.g. CMF) ship with tests that just plain
  fail.


Really? That's not been the case for a long time. When trying to test a 
Plohn setup, I found some of the Plohn tests were causing CMF tests to 
fail if the CMF tests were run in the same batch, 'cos they no doubt 
leave lots of crap lying around :-(



  If I install CMF 1.4.8 and nothing else, and run ./bin/zopectl test,
  I get 1 error and 1 failure.  


Why are you using something so ancient? ;-)


- Some of my own Product tests run fine in isolation but break when
  run alongside other installed product tests.


Then either your tests or the other tests are leaving turds...


- Does this jibe with others' experience?


Yes.


- Is there a better (or best) way to run all my Product tests?


If you find it, let me know! :-)


- *Should* we expect that ./bin/zopectl test will run all installed
Products tests, and if so, what can we do as a community to get
authors to fix their products?


Beat them with sticks, embarass them in public, etc...

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] Mysql 5? Just curious.

2005-10-05 Thread Chris Withers

Greg Fischer wrote:

This is totally unimportant, but I was just curious to know if anyone is
running Mysql 5 on Zope right now.


That would be some achievement! ISn't MySQL written in C++ or something?

Seriously though, Andy Dustman is your man, maybe try compiling mySQLdb 
and seeing if it'll connect to MySQL 5?


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] Unable to start Zope

2005-10-05 Thread John Poltorak
Sorry about this... the email was from yesterday and escaped by mistake.

My problems were relalted to mismatches of permissions and userids being 
used.


On Mon, Oct 03, 2005 at 12:48:00PM +0100, John Poltorak wrote:
 
 Following a server reboot, I can't get Zope to run. I get a socket error - 
 permission denied. How do I identify and delete this open socket?
 
 
 -- 
 John 


___
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] Unable to start Zope

2005-10-05 Thread Peter Bengtsson
2005/10/3, John Poltorak [EMAIL PROTECTED]:

 Following a server reboot, I can't get Zope to run. I get a socket error -
 permission denied. How do I identify and delete this open socket?

Permission denied? Have some of your files accidently become owned by root?
Try (if you know what you're doing)
# chown -R john: /home/john/zope/

Otherwise, what are the errors?

 --
 John


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



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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: Presentations Available

2005-10-05 Thread Nick Davis

Chris
   I agree that 2+ years should have produced maturity. Zope seems to 
be a lot more stable than Plone.
   Maybe the reason people focus on your Plone talk is you touch a 
chord with people who too are wrestling with Plone.
   Probably at least once a week the thought crosses our minds of 
ditching Plone and going back down to the Zope level, with some of our 
own stuff sitting on top of CMF. But then, Plone does provide some good 
things. If only these things would work consistently and not keep 
changing. Also while performance problems have been addressed in 2.1 
there seem to still be migration problems and broken products which 
prevent people going to 2.1 yet. My colleague has spent a long time 
trying to migrate a Product he wrote, from Archetypes 1.2.5 to 1.3.4, 
due to the fact he had to hack around problems with references.
  My fear is as more features are added, what you describe as a shaky 
stack of complex fragile components will get ever more dependencies and 
therefore ever more complex and fragile.
  People often talk about the steep learning curve of Zope and Plone. 
When one is learning it, one tends to blame oneself for finding it 
difficult, and its a bad workman blames his tools. After a while though 
  the question arises of why this seems to be harder to learn than say, 
some mathematical concept commonly considered hard to get your head 
around. The answer seems to be because its Plone's complexity and 
inconsistencies we are learning. This is not good and doesn't bode well 
for increasing mind share.
  This is not actually any worse than the J2EE / Java / class explosion 
world, but isn't one of the points of open source and collaboration that 
it should be much much better?
  It is great that so many people are willing to contribute their own 
free time, effort and resources, to write code that they freely share.
It may well be that the quality of this code is miraculously good 
considering how its done by volunteers scattered geographically. That 
doesn't make the problems with Plone go away.
  It seems to me your recommendation to people to not use Plone at all, 
coming from someone who's been around in the Zope worldfor quite some 
time, is quite controversial but may in a roundabout way help if it 
forces people to make Plone more stable and mature.

  Well I guess I better don my asbestos clothing too. ;-)
Regards
Nick



___
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] Accessing CURRENT property

2005-10-05 Thread Peter Bengtsson
2005/10/5, Chris Withers [EMAIL PROTECTED]:
 Peter Bengtsson wrote:
  Not sure what it's called in Page Templates or Python Scripts but in
  DTML it's called careful_hasattr() which wraps hasattr() in a
  restricted context.

 I wouldn't trust that either ;-)

 hasattr's insane in that it catches prettymuch all exception, including
 ConflictErrors...

Didn't know that.

 I much prefer get patterns of getattr(something,'something',None) or
 variants thereof, depending on the situation...


careful_hasattr() uses a getattr() to test if it works and does this
in a restricted manner.

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Testing products: Testing all in one batch

2005-10-05 Thread Jens Vagelpohl


On 4 Oct 2005, at 23:21, Paul Winkler wrote:


Has anybody set up a batch job to test all installed Products
in a zope instance?


bin/zopectl test --dir Products/

from the instance home will test all products in that instance home.

jens

___
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] ZWiki RecentChanges as RSS feed

2005-10-05 Thread Peter Bengtsson
I've got a Zwiki instance that works just fine. If I visit it at
http://localhost:8080/wiki/RecentChanges?action=rss_rc I get a nice
feed of all the recent changes.
But I don't want to reach it by URL, I want to reach it
programmatically. How do I do that??

return self.wiki.RecentChanges() gives an AttributeError.

I've looked throught the sources but there's too much DTML magic and
other getSkinTemplate() magic.
Thanks, Peter

--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Upgrading from 2.7.6 to 2.8.1

2005-10-05 Thread Kris Adcock

Afternoon all,

I'd like to upgrade our Zope/Plone/CMFPhotoAlbum/etc installation from 
2.7.6 to 2.8.1. I'm having trouble performing the upgrade - I couldn't 
find any instructions on how to do it, and my attempt at a fresh install 
followed by a copy-over of the var and Products folders resulted in 
failure.


Is there a document around that I've missed that describes what I should do?

I'm also hoping that any help with this problem will indicate what the 
important files are in a Zope installation. This is because I need to 
make sure I have backups all sorted so that I can easily do a restore 
if/when the server goes bang. We're using Zope+Plone+others as our 
attempt at a new library, and so far the data weighs in at around 250 gig!


The server is a HP ProLiant rackmount unit, driving a 8TB iSCSI storage 
unit, running Suse Linux 9.3 Pro.


All the best, and thanks in advance,

Kris.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

This e-mail is confidential and may be read only by the intended recipient.
If you are not the intended recipient, please do not forward, copy or take
any action based on it and, in addition, please delete this email and
inform the sender.
We cannot be sure that this e-mail or its attachments are free from
viruses.  In keeping with good computing practice, please ensure that
you take adequate steps to check for any viruses.  Before replying
or sending any email to us, please consider that the internet is inherently
insecure and is an inappropriate medium for certain kinds of information.
We reserve the right to access and read all e-mails and attachments
entering or leaving our systems.

___
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] Upgrading from 2.7.6 to 2.8.1

2005-10-05 Thread Andreas Jung



--On 5. Oktober 2005 13:45:35 +0100 Kris Adcock [EMAIL PROTECTED] wrote:


Afternoon all,

I'd like to upgrade our Zope/Plone/CMFPhotoAlbum/etc installation from
2.7.6 to 2.8.1. I'm having trouble performing the upgrade - I couldn't
find any instructions on how to do it, and my attempt at a fresh install
followed by a copy-over of the var and Products folders resulted in
failure.


Failure means what? Your description is pretty much useless without having
details about your particular problem.

-aj


pgpHSB3kceRh3.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: ZWiki RecentChanges as RSS feed

2005-10-05 Thread Simon Michael

Hi Peter,

I've got a Zwiki instance that works just fine. If I visit it at
http://localhost:8080/wiki/RecentChanges?action=rss_rc I get a nice
feed of all the recent changes.
  
I'm not familiar with ?action=rss_rc at all, it sounds like a local 
customization.

But I don't want to reach it by URL, I want to reach it
programmatically. How do I do that??

return self.wiki.RecentChanges() gives an AttributeError.
  

If you want to know why, post the traceback and I'll say more.
Generally, to get a zwiki page to render itself programmatically, give 
it a REQUEST. Eg self.wiki.RecentChanges(REQUEST=REQUEST). In certain 
contexts you might still have skin trouble, in which case try 
self.wiki.RecentChanges(REQUEST=REQUEST,bare=1) to render without the skin.


Current Zwiki has changes_rss and pages_rss methods built in, eg 
wiki.AnyPage.pages_rss().


Cheers
-Simon

___
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] Testing products: Testing all in one batch

2005-10-05 Thread Paul Winkler

Jens Vagelpohl said:

 On 4 Oct 2005, at 23:21, Paul Winkler wrote:

 Has anybody set up a batch job to test all installed Products
 in a zope instance?

 bin/zopectl test --dir Products/

 from the instance home will test all products in that instance home.

Well, so will bin/zopectl test without the --dir argument,
but I guess you didn't read the rest of my message ;-)
Thanks anyway.

-- 
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] Testing products: Testing all in one batch

2005-10-05 Thread Jens Vagelpohl


On 5 Oct 2005, at 14:44, Paul Winkler wrote:


bin/zopectl test --dir Products/

from the instance home will test all products in that instance home.



Well, so will bin/zopectl test without the --dir argument,
but I guess you didn't read the rest of my message ;-)


I answered one of the questions you asked, that's all. The issue you  
are having with tests failing when you run them is separate. It's a  
combination of lack of quality control (products whose tests fail  
out of the box when you run them separately) or lack of cleanup in  
testing code.


jens

___
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] Testing products: Testing all in one batch

2005-10-05 Thread Jens Vagelpohl


On 5 Oct 2005, at 14:49, Lennart Regebro wrote:


On 10/5/05, Jens Vagelpohl [EMAIL PROTECTED] wrote:


from the instance home will test all products in that instance home.



Often doesn't work, the different products tests will walk all over  
each other.

But setting up a script that walks all the Product directories and
runs the test for the separately shouldn't be a problem.


This is correct, but you're just papering over a deeper problem,  
namely bad cleanup in some unit tests.


jens

___
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] Testing products: Testing all in one batch

2005-10-05 Thread Paul Winkler
Chris Withers said:
 Paul Winkler wrote:
 Seems like the only *useful* way I can get it to run is with a loop
 that does bin/zopectl test once for each subdirectory of Products
 that I actually care about, taking care to ignore problematic
 third-party products.  Which is OK I guess, but I'd prefer not
 to have to skip anything.

 I have a python script that builds a big command line to test.py of the
 form:

 bin/zopectl test Products/Product1|Products/Products2|etc

 ...it's not pretty, but it does work, and lets you exclude geb0rken
 products like Archetypes from test runs...

Aha, that's much like what I'm doing except that yours runs in one go
and thus exposes tests that don't clean up after themselves.
Which is a Good Thing if I can just find and fix all the nasty things...

 - Some third-party products (e.g. CMF) ship with tests that just plain
   fail.

 Really? That's not been the case for a long time. When trying to test a
 Plohn setup, I found some of the Plohn tests were causing CMF tests to
 fail if the CMF tests were run in the same batch, 'cos they no doubt
 leave lots of crap lying around :-(

   If I install CMF 1.4.8 and nothing else, and run ./bin/zopectl test,
 I get 1 error and 1 failure.

 Why are you using something so ancient? ;-)

Irrelevant to this discussion, but A) it's hardly ancient,
and B) upgrading to 1.5.x has been postponed indefinitely as it breaks a
lot of old things (some mine, some third-party) and I have not had any
time to devote a day or three to resolving the incompatibilities.
Anyway, as somebody replied to me in zope-cmf list last night,
the breakage is fixed on the 1.4 branch and there will likely be
a 1.4.9 release.

 - Some of my own Product tests run fine in isolation but break when
   run alongside other installed product tests.

 Then either your tests or the other tests are leaving turds...

Indeed. I wish it was easier to diagnose and resolve problems like this.
The problem is that tests seem to be run in alphabetical order, I
don't know of a way to force another order, and so I'm left
with adding and removing things from Products to see what minimal
set of products will trigger the error - which is a crude technique
since some products' tests will not run at all unless some other
product is present (e.g. you can't run CMFDefault tests if
CMFCore is not present).

 - Does this jibe with others' experience?

 Yes.

Thanks.  I'm always hoping that things like this are just me doing
something stupid and the problem will go away with some trivial tweak
I've overlooked... sadly, no such luck.

 - Is there a better (or best) way to run all my Product tests?

 If you find it, let me know! :-)

Will 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] Testing products: Testing all in one batch

2005-10-05 Thread Paul Winkler

Jens Vagelpohl said:

 On 5 Oct 2005, at 14:49, Lennart Regebro wrote:

 On 10/5/05, Jens Vagelpohl [EMAIL PROTECTED] wrote:

 from the instance home will test all products in that instance home.


 Often doesn't work, the different products tests will walk all over
 each other.
 But setting up a script that walks all the Product directories and
 runs the test for the separately shouldn't be a problem.

 This is correct, but you're just papering over a deeper problem,
 namely bad cleanup in some unit tests.

Indeed. Anybody have tips on troubleshooting this?
I'm currently finding it really annoying to even find which tests
are the culprit(s).

All I've been doing is:
- try every combination of products (ugh, combinatorial explosion)
- run tests with -vv so I know for sure which tests have already run
  when the problem occurs.

-- 
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] Testing products: Testing all in one batch

2005-10-05 Thread Paul Winkler

Alan Milligan said:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Paul Winkler wrote:

 The problem is that tests seem to be run in alphabetical order, I
 don't know of a way to force another order, and so I'm left
 with adding and removing things from Products to see what minimal set
 of products will trigger the error - which is a crude technique since
 some products' tests will not run at all unless some other product is
 present (e.g. you can't run CMFDefault tests if
 CMFCore is not present)

 def test01SomeName() ...

 def test02AnotherName() ...

Well, at the individual test level, yeah, but I'm talking at the suite or
even module level.  I'm hardly going to go renaming a product folder
and then have to globally change the product name in all referring code,
that would be a huge mess.  (Sure, I could use sed or whatever, but
make one little mistake and you might have to wipe out your sandbox and
start over from square one...)

Would be nice if test.py allowed you to specify an order
to run suites in.  I'm going to go look and see how hard that
would be to hack in.

-- 
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] ZOPE and DEBIAN INSTALLTION

2005-10-05 Thread benmania


Hello, 

I tried to install ZOPE from sources via configure - make - make instance but 
unfortunately I always get the following error message when typing in the 
make command. 

  command 'gcc' failed with exit status 1 
  -basherror:: command not found 

In my last message, I assumed that gcc was not installed. I derived this 
assumption from the error message 

The weird thing is that whenever I type in the command 'gcc'. There is always 
the following error message: 
'No input files found'

I am wondering why: If gcc was not installed, there should be an error message 
that is similar to 'command not found'. 
The output 'No input files found' implies that - in my opinion - gcc is 
actually installed. 

What do you think of that? 

__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193

___
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: Upgrading from 2.7.6 to 2.8.1

2005-10-05 Thread Nick Davis

Coyping across var and Products directories should be sufficient I believe.
Have you packed the database recently?

Rather obvious question but have you actually run Portal Migration 
(from the ZMI) ? ;-)


If your Products use Archetypes you may run into Catalog errors. We 
haven't succeeded in migrating to Plone2.1/Zope 2.8 but that is due to 
other problems with Archetypes migration.
If your installation heavily customised Plone's templates, this may 
cause problems due to Plone's templates having changed in 2.1. You'd 
have to re-customise the new templates.


Hope this helps,
Nick


___
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 and DEBIAN INSTALLTION

2005-10-05 Thread Jonathan


- Original Message - 
From: [EMAIL PROTECTED]
I tried to install ZOPE from sources via configure - make - make 
instance but unfortunately I always get the following error message when 
typing in the make command.



 command 'gcc' failed with exit status 1
 -basherror:: command not found


In my last message, I assumed that gcc was not installed. I derived this 
assumption from the error message


The weird thing is that whenever I type in the command 'gcc'. There is 
always the following error message:

'No input files found'

I am wondering why: If gcc was not installed, there should be an error 
message that is similar to 'command not found'.
The output 'No input files found' implies that - in my opinion - gcc is 
actually installed.


What do you think of that?


if you enter 'which gcc' at the command line prompt (shell) it will tell you 
where gcc is installed on your system.

eg.
$ which gcc
/usr/bin/gcc


hth

Jonathan 



___
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: Testing products: Testing all in one batch

2005-10-05 Thread Florent Guillaume

Paul Winkler wrote:

- Some third-party products (e.g. CMF) ship with tests that just plain
  fail.
  If I install CMF 1.4.8 and nothing else, and run ./bin/zopectl test,
  I get 1 error and 1 failure.  This is a bit surprising from a stable
  release, I'd expect not to get any... will forward those to the CMF
  list and follow up there, if there are not already issues filed for
  these.


CMF 1.4 tests were not designed to be run through bin/zopectl test.
This was changed in CMF 1.5.

Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [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] Testing products: Testing all in one batch

2005-10-05 Thread Lennart Regebro
On 10/5/05, Jens Vagelpohl [EMAIL PROTECTED] wrote:
 This is correct, but you're just papering over a deeper problem,
 namely bad cleanup in some unit tests.

Sure, but that's how reality looks. It's unfortunate, but there ya go.
--
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 )


Re: [Zope] ZOPE and DEBIAN INSTALLTION

2005-10-05 Thread Andreas Pakulat
On 05.10.05 17:09:45, [EMAIL PROTECTED] wrote:
 Hello, 
 
 I tried to install ZOPE from sources via configure - make - make instance 
 but unfortunately I always get the following error message when typing in the 
 make command. 
 
   command 'gcc' failed with exit status 1 
   -basherror:: command not found 

Could you please post the whole output that make produces? I just
tested this on my box with zope-2.7.7 and it works. Do you have
python-dev installed?

Andreas

-- 
So you're back... about time...
___
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] Zope Scalability

2005-10-05 Thread Tom Wilde




Hi folks, 

I've been using Zope for a while now and found it to be an excellent solution however I've got a few enterprise questions about the scalability of Zope that just need to be answered.

[ nb: I'm using V2.72 at the moment, not having moved over to V3 ]

ZODB size
What is the maximum size of this file and/or maximum object ID?
= just how many objects can the zodb hold? millions? tens of millions..?? billions...??? I have a feeling we'll run out of ram long before actually hitting the limit but it'd be nice to know the theoretical top limit.

ExtFile
Managed to serve 500,000 files through extfile - anybody come across an upper limit here? Planning to serve larger sites off a SAN hopefully - has anyone tried this?

Zeo and Cataloging
If I have my site on one server and ZCatalog (using TextIndexNG) on another server (connected by ZEO) where does the actual index operation occur? Do just the results get propogated to the catalog?

LDAP Authentication
I understand that can use the LDAPUserFolder Product to provide authentication against an ldap server. Could I throw,say, 5+ users at zope using this system?

Load Balancing and Cookie Based Sessions
Currently we use cookie based sessions via cookie crumbler presumably in a load balanced server setup we'd have to host acl_users ona ZEO'd izope instance somewhere on the backend?

thanks in advance, any advice welcome - in a brave new world here.

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] Zope Scalability

2005-10-05 Thread Andreas Jung



--On 5. Oktober 2005 17:37:08 +0100 Tom Wilde [EMAIL PROTECTED] 
wrote:



Hi folks,

I've been using Zope for a while now and found it to be an excellent
solution however I've got a few enterprise questions about the
scalability of Zope that just need to be answered.

[ nb: I'm using V2.72 at the moment, not having moved over to V3 ]

ZODB size
What is the maximum size of this file and/or maximum object ID?
= just how many objects can the zodb hold? millions? tens of
millions..?? billions...??? I have a feeling we'll run out of ram long
before actually hitting the limit but it'd be nice to know the
theoretical top limit.


Several million  objects are common  for large installations. The ZODB 
keeps an internal index of the objects (the size is proportional to the 
number of objects). In addition you have caches. Their size depends on the 
configuration. Running a ZEO client with 1-2  GB of RAM for large 
installation is common.





ExtFile
Managed to serve 500,000 files through extfile - anybody come across an
upper limit here? Planning to serve larger sites off a SAN hopefully -
has anyone tried this?


no idea



Zeo and Cataloging
If I have my site on one server and ZCatalog (using TextIndexNG) on
another server (connected by ZEO) where does the actual index operation
occur? Do just the results get propogated to the catalog?


The indexing work is always happens on the ZEO clients, not on the server.
Just the results are transferred to the ZEO Server.



LDAP Authentication
I understand that can use the LDAPUserFolder Product to provide
authentication against an ldap server. Could I throw,say, 5+ users
at zope using this system?


This should work in general. Possibly it requires some tweaking here and 
there depending on your usecases.




Load Balancing and Cookie Based Sessions
Currently we use cookie based sessions via cookie crumbler presumably in
a load balanced server setup we'd have to host acl_users ona  ZEO'd
izope instance somewhere on the backend?



I don't see what sessions have to do with acl_users. In your ZEO setup you 
have identical data except sessions on every ZEO client. You just have to 
ensure somehow that users get to the same ZEO client for the lifetime of 
the session. How this is done depends basically on the load balancer.


-aj


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


Re: [Zope] Re: ZWiki RecentChanges as RSS feed

2005-10-05 Thread Peter Bengtsson
  http://localhost:8080/wiki/RecentChanges?action=rss_rc I get a nice
  feed of all the recent changes.
 
 I'm not familiar with ?action=rss_rc at all, it sounds like a local
 customization.

I'm sorry. That was for MoinMoin which we had before but upgraded to
Zwiki. My script was assuming MoinMoin, hence the action=rss_rc stuff.


 Current Zwiki has changes_rss and pages_rss methods built in, eg
 wiki.AnyPage.pages_rss().


If I do :
return self.wiki.FrontPage.changes_rss() I seem to get what I want,
I think. The big problem with this is that it seems to be in reverse
order with the first wiki page first. I'd like it the other way
around.

What I want is basically
http://localhost:8080/wiki/FrontPage/recentchanges but in RSS or RDF
format so that I can use them somewhere else.


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] MailingLogger 2.4.1 and 2.5.0 Released!

2005-10-05 Thread Chris Withers
MailingLogger allows configured entries from the event log to be mailed 
to a list of configured recipients.


These releases fix a major bug involving email flood protection and add 
support for Zope 2.8


These releases fix the following bugs:

- A bug in the email flood protection often meant that no more mail was
  ever sent after midnight on the day when the flood protection was
  triggered.

- Two issues with headers set in the mails sent by MailingLogger were
  corrected.

In addition, support for Zope 2.8 was added.

- MailingLogger 2.4.1 works with Zope 2.7.x

- MailingLogger 2.5.0 works with Zope 2.8.0 and above

For more information, please see: 
http://www.simplistix.co.uk/software/zope/mailinglogger


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] Re: ZWiki RecentChanges as RSS feed

2005-10-05 Thread Simon Michael

Peter Bengtsson wrote:

The big problem with this is that it seems to be in reverse
order with the first wiki page first. I'd like it the other way
around.
  

Have a look at the changes_rss method in RSS.py (in 0.46). It calls
pages(), which is essentially a catalog query restricted to this folder.
You could move this method back to a pythonscript and tweak that query,
or do it in dtml.

___
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: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Doyon, Jean-Francois
Alec,

Heh, thanks for the reply, I somehow have been using python for a few years
now without ever running into that!

I'm afraid I'm still baffled by it, mostly because I've used attributes
named in such a manner up until now without problem ...

From what you're saying I guess hasattr() being a built-in function, it's
not recognized as part of the instance, so the mangling doesn't work right?

But then, why does this code work ok?

class CrosslingualSupport:
 Mix-in class to provide content objects with support for
cross-lingual properties when needed.


def clearCrosslingualAttributes(self, lang):
 For a given language, remove all internal attributes related to
it. 
for propertyname in [ propname for propname in
self.__multilingualproperties__.keys() if
self.__multilingualproperties__[propname][1] == True ]:
attname = '__' + propertyname + '_' + lang
if hasattr(self, attname): delattr(self, attname)

As you see on the last line, I'm doing a hasattr() on an attribute who's
name starts with 2 underscores, and it works fine in this case (has been for
weeks, if not months).

BUT, in my other situation, it isn't!!  Heck, I think I even tried
getattr(self, '__attribute') and it didn't work right.  ONLY
self.__attribute seems to work.  But then, I'm back to wondering why the
above works fine, and worry that something's going to come bite me later ...

I'm starting to wonder if subclassing and/or my usage of metaclasses might
be a cause for the different behavior?? Either that, or there's something
buggy with zope's versions of get/set/has/delattr ...

Even though I've gotten around it, I'll keep looking, it's driving me nuts
:)

J.F.

On Friday 30 September 2005 12:49 pm, Doyon, Jean-Francois wrote:
 Hello,

 I'm using new-style classes and properties to implement multilingual
 support in my objects. I might therefore have something like:

 mything = property(__get_mything)

 def __get_mything:
 return self.__mything_en

 (Extremely simplified!)

 This works fine.

 Now however I'm discovering that doing a hasattr() on anything that starts
 with 2 underscores always returns false!

 So hasattr(self, '__thumbnail') doesn't work as expected, but
hasattr(self,
 '_thumbnail') DOES! (All other things being equal of course).

This is actually a feature of python.  Names starting with '__' are mangled
by 
the interpreter so that they are not directly accessible outside the class 
itself; it is an attempt to simulate private class members.  If you are 
finding yourself in need of using a variable that someone else has decided 
needed to be named with '__' then you may want to rethink what you are
doing.  
It is somewhat rare that a python programmer would use this trick, so you 
should probably heed the warning and avoid using it if at all possible.  If 
these are methods that you created then just rename them to use a single or 
preferably no underscores if you need to use them from outside the class 
itself (a single underscore is still bad form, as '_' is an indicator that a

variable is intended to be private and a suggestion that it only be used in 
the class itself).

Alec Mitchell
___
Zope maillist  -  Zope at 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 )


Re: [Zope] Zope Scalability

2005-10-05 Thread Jens Vagelpohl

ZODB size
What is the maximum size of this file and/or maximum object ID?
= just how many objects can the zodb hold? millions? tens of  
millions..?? billions...??? I have a feeling we'll run out of ram  
long before actually hitting the limit but it'd be nice to know the  
theoretical top limit.


There is no answer to this question because it cannot be answered. No  
one has come against a limit yet as far as I know. Hitting RAM  
limits depends on the settings you apply to the Zope/ZEO instance(s)  
that serve(s) the content and how much RAM you put in, you can  
control ZODB memory cache size via zope.conf. No one sets up Zope so  
that the whole ZODB is loaded into memory, if that's what you mean.




Zeo and Cataloging
If I have my site on one server and ZCatalog (using TextIndexNG) on  
another server (connected by ZEO) where does the actual index  
operation occur? Do just the results get propogated to the catalog?


The actual indexing operation happens on the Zope/ZEO instance, and  
the resulting database changes are applied to the respective storage  
where the catalog resides when the transaction commits.




LDAP Authentication
I understand that can use the LDAPUserFolder Product to provide  
authentication against an ldap server. Could I throw,say, 5+  
users at zope using this system?


I see no problems with that. It doesn't matter one bit to the  
LDAPUserFolder (or the Zope security machinery) how many user records  
you have in the DIT. If there are any slowdowns as the number of user  
records increases it is most likely due to misconfigurations on the  
LDAP server itself, such as bad indexing or overcomplicateed/ 
unnecessary access control checks.




Load Balancing and Cookie Based Sessions
Currently we use cookie based sessions via cookie crumbler  
presumably in a load balanced server setup we'd have to host  
acl_users ona  ZEO'd izope instance somewhere on the backend?


Cookie crumbler has nothing to do with sessions. All it does is set/ 
read a cookie with credentials and then fake regular HTTP  
authentication with this data. There is no state information being  
stored on the server side, so in a ZEO setup it does not matter which  
ZEO client you hit.


jens

___
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: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Paul Winkler
Doyon, Jean-Francois said:
 But then, why does this code work ok?

 class CrosslingualSupport:
  Mix-in class to provide content objects with support for
 cross-lingual properties when needed.
 

 def clearCrosslingualAttributes(self, lang):
  For a given language, remove all internal attributes related
 to
 it. 
 for propertyname in [ propname for propname in
 self.__multilingualproperties__.keys() if
 self.__multilingualproperties__[propname][1] == True ]:
 attname = '__' + propertyname + '_' + lang
 if hasattr(self, attname): delattr(self, attname)

 As you see on the last line, I'm doing a hasattr() on an attribute who's
 name starts with 2 underscores, and it works fine in this case (has been
 for weeks, if not months).

But do those names *end* with underscores as well?
If so, Python doesn't mangle those names.
See: http://docs.python.org/ref/atom-identifiers.html

Also, what do you intend to communicate by naming
__multilingualproperties__ with the leading and trailing underscores?
Might want to read the style guide at
http://www.python.org/peps/pep-0008.html
if you haven't lately...  see the Naming Conventions section.

-- 
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: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Paul Winkler
 for propertyname in [ propname for propname in
 self.__multilingualproperties__.keys() if
 self.__multilingualproperties__[propname][1] == True ]:
 attname = '__' + propertyname + '_' + lang
 if hasattr(self, attname): delattr(self, attname)

 As you see on the last line, I'm doing a hasattr() on an attribute
 who's name starts with 2 underscores, and it works fine in this case
 (has been for weeks, if not months).

 But do those names *end* with underscores as well?

(snip)

Oops, sent too quickly; actually it looks to me like they don't
(unless lang ends in __).
However, it's not clear what it works means.
Your code above won't raise any exceptions, but it
shouldn't delete any attributes either :-)

 class Foo:
 def __init__(self):
 self.__blech = 1
 self.__blah__ = 1
 self._bloop = 1
 def do(self):
 print hasattr(self, __blech)
 print hasattr(self, _Foo__blech)
 print hasattr(self, __blah__)
 print hasattr(self, _bloop)

 x = Foo()
 x.do()
False
True
True
True

-- 
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] Zope Scalability

2005-10-05 Thread Matthew X. Economou
Jens wrote:

 There is no answer to this question because it cannot be answered.
 No one has come against a limit yet as far as I know. Hitting RAM
 limits depends on the settings you apply to the Zope/ZEO instance(s)
 that serve(s) the content and how much RAM you put in, you can
 control ZODB memory cache size via zope.conf. No one sets up Zope so
 that the whole ZODB is loaded into memory, if that's what you mean.

I got the impression that he was asking about the maximum object size.
I don't know if there is a limit in Zope itself, but I've run into
problems with PloneExFile when uploading files larger than about 25 MB.
Who knows - it might be a bug in PloneExFile, AttachmentField, or
Archetypes.  I lack the expertise required to troubleshoot the error, so
take this with the proverbial grain of salt.

BTW: I'm using LDAPUserFolder in a 10,000-user Active Directory
environment.  It works great.

Best wishes,
Matthew

-- 
jsoffron: I'm generally pretty high on national defense...
Mr. Bad Example: Careful...it's a gateway policy. Before you know it,
 you'll be mainlining the hard stuff like trade agreements.
jsoffron: Too late...I've been freebasing Nafta all day... Sweet,
 sweet NAFTA.
- As seen on Slashdot
___
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 Scalability

2005-10-05 Thread Jens Vagelpohl


On 5 Oct 2005, at 20:35, Matthew X. Economou wrote:

There is no answer to this question because it cannot be answered.
No one has come against a limit yet as far as I know. Hitting RAM
limits depends on the settings you apply to the Zope/ZEO instance(s)
that serve(s) the content and how much RAM you put in, you can
control ZODB memory cache size via zope.conf. No one sets up Zope so
that the whole ZODB is loaded into memory, if that's what you mean.



I got the impression that he was asking about the maximum object size.


Well, the question was actually What is the maximum size of this  
file and/or maximum object ID? = just how many objects can the zodb  
hold?. There is only a theoretical limit that has to do with the  
largest index key for the ZODB index I believe, and that is some  
ludicrously high number that no one has ever reached.


jens

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

2005-10-05 Thread Tim Peters
[Jens Vagelpohl]
 Well, the question was actually What is the maximum size of this
 file and/or maximum object ID? = just how many objects can the zodb
 hold?. There is only a theoretical limit that has to do with the
 largest index key for the ZODB index I believe, and that is some
 ludicrously high number that no one has ever reached.

If you're using FileStorage, a technical detail in the implementation
of the FileStorage index limits the maximum file offset that can be
used to 2**48-1, or about 281 terabytes.  Object IDs are effectively
64-bit integers (masquerading as 8-byte strings).
___
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 Scalability

2005-10-05 Thread Andreas Jung



--On 5. Oktober 2005 15:57:14 -0400 Tim Peters [EMAIL PROTECTED] wrote:


[Jens Vagelpohl]

Well, the question was actually What is the maximum size of this
file and/or maximum object ID? = just how many objects can the zodb
hold?. There is only a theoretical limit that has to do with the
largest index key for the ZODB index I believe, and that is some
ludicrously high number that no one has ever reached.


If you're using FileStorage, a technical detail in the implementation
of the FileStorage index limits the maximum file offset that can be
used to 2**48-1, or about 281 terabytes.  Object IDs are effectively
64-bit integers (masquerading as 8-byte strings).



This would require how much RAM for the index? :-)

-aj



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


Re: [Zope] Zope Scalability

2005-10-05 Thread Jens Vagelpohl


On 5 Oct 2005, at 20:57, Tim Peters wrote:


[Jens Vagelpohl]


Well, the question was actually What is the maximum size of this
file and/or maximum object ID? = just how many objects can the zodb
hold?. There is only a theoretical limit that has to do with the
largest index key for the ZODB index I believe, and that is some
ludicrously high number that no one has ever reached.



If you're using FileStorage, a technical detail in the implementation
of the FileStorage index limits the maximum file offset that can be
used to 2**48-1, or about 281 terabytes.  Object IDs are effectively
64-bit integers (masquerading as 8-byte strings).


If that's not falling in the ludicrous category, I don't know what  
is ;)  I suppose we'll all be safe for a while.


jens

___
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: Problem with hasattr() and Zope 2.8.1

2005-10-05 Thread Doyon, Jean-Francois
Your example shows my problem, or what I see as a problem anyways:

 def __init__(self):
 self.__blech = 1

 def do(self):
 print hasattr(self, __blech)

 x = Foo()
 x.do()
False

False? Really? hasattr() is used within the context of the class itself, so
the fact it's private shouldn't be a problem, should it? If I was using
hasattr() outside the scope/context of the class/instance, then ok ... But
within it? I'm not breaking any privacy rules by doing this ... I'd expect
the (un)mangling to be applied here.

Of course, hasattr() is a standalone function ... So maybe that's a factor.

Unintuitive behavior, I say ... Maybe I'll take this to c.l.p :)

So how does an instance test whether it has a private attribute set?  Is it
really proper for to unmangle manually? (This would strike me as bad form
when already working within the class/instance)

So then that leaves me wondering why my other pieces of code DON'T do this,
and work the way I initially expect ... No, my lang never ends in an _
... It's always __attname_en for example, or __attname_fr ... Etc ...

These are internal attributes wrapped by properties, though there is some
metaclass trickery going on here as well ... Might be a factor? The fact
some of the related logic (too long to show here, unless you're really
interested) is dynamically bound through metaclasses maybe changes the scope
of the attribute, and hence its mangling behavior?

Basically I use something like the autoprop examples from the Python docs
to do multilingual objects, where the language differences are handled at
the property level (i.e. the getters/setters handle language differences).

It's a pretty slick system if I may say so myself, works very well so far :)
Just don't want my hasattr() to blow up in my face at some unfortunate time!

Ah well, whatever it is, it's working ... I suppose I just don't understand
why ... But this isn't a Zope problem I guess :)

Thanks!
J.F.

-Original Message-
From: Paul Winkler [mailto:[EMAIL PROTECTED] 
Sent: October 5, 2005 3:28 PM
To: [EMAIL PROTECTED]; zope@zope.org
Subject: Re: [Zope] Re: Problem with hasattr() and Zope 2.8.1

 for propertyname in [ propname for propname in
 self.__multilingualproperties__.keys() if 
 self.__multilingualproperties__[propname][1] == True ]:
 attname = '__' + propertyname + '_' + lang
 if hasattr(self, attname): delattr(self, attname)

 As you see on the last line, I'm doing a hasattr() on an attribute 
 who's name starts with 2 underscores, and it works fine in this case 
 (has been for weeks, if not months).

 But do those names *end* with underscores as well?

(snip)

Oops, sent too quickly; actually it looks to me like they don't (unless lang
ends in __).
However, it's not clear what it works means.
Your code above won't raise any exceptions, but it shouldn't delete any
attributes either :-)

 class Foo:
 def __init__(self):
 self.__blech = 1
 self.__blah__ = 1
 self._bloop = 1
 def do(self):
 print hasattr(self, __blech)
 print hasattr(self, _Foo__blech)
 print hasattr(self, __blah__)
 print hasattr(self, _bloop)

 x = Foo()
 x.do()
False
True
True
True

--
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] Zope Scalability

2005-10-05 Thread Tim Peters
[Tim Peters]
 If you're using FileStorage, a technical detail in the implementation
 of the FileStorage index limits the maximum file offset that can be
 used to 2**48-1, or about 281 terabytes.  Object IDs are effectively
 64-bit integers (masquerading as 8-byte strings).

[Andreas Jung]
 This would require how much RAM for the index? :-)

Unfortunately, that's a complicated question -- the index is an
OOBTree mapping 6-byte strings to a specialized kind of BTree mapping
2-byte strings to 6-byte strings.  The complications add up.  The good
news is that if there are only two objects, say each consuming 128
terabytes, the index has only two entries and is actually very small
wink.
___
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: need help python-zope

2005-10-05 Thread Jonathan Cyr




Hello,

You may want to send questions to the Zope list at zope@zope.org. You
can join the list at 

http://www.zope.org/Resources/MailingLists

The authentication box in Zope by default is part of the standard HTTP
Authentication mechanism, and is available to most web servers. Very
little can be changed using this standard User Folder.

There are many replacement User Folder objects available for extended
functionality. Check out the User Folders in Zope.org's Product
section.

Here's the latest version of the Zope Book at
http://www.plope.com/Books/2_7Edition

Hope this helps,

-Jon


ajit mote wrote:
Hello,
 i am new to zope.
 i want to access authentication dialog box which come initialy
(when ZMI link is clicked).
  
 i want to know from where this authentication dialog box is
created and opened
  
 Hoping u u'stand my problem .

 Thanks
  

No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.10/119 - Release Date: 10/4/2005
  


-- 
Jonathan Cyr
[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] Re: DTML-tree Custom sort

2005-10-05 Thread J Cameron Cooper

Chris Beaven wrote:

It's really more a cool way to do lists than if statements  :)


It's technically list comprehension. Sort of a one-line list transform 
tool.


I recommend reading through some of Dive Into Python 
(http://diveintopython.org/) for lots more cool hands-on tips on Python 
programming. Chapter 3 for a good overview of the uses of Python's 
different data types.


Good advice.

--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.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 )