[Zope-dev] Zope Tests: 7 OK

2007-03-06 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Mon Mar  5 12:00:00 2007 UTC to Tue Mar  6 12:00:00 2007 UTC.
There were 7 messages: 7 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.6 Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:09:14 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007391.html

Subject: OK : Zope-2.6 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:10:45 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007392.html

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:12:15 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007393.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:13:45 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007394.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:15:15 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007395.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:16:45 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007396.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Mar  5 21:18:15 EST 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-March/007397.html

___
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-dev] ZopeTestCase.doctest is not aware of local sites

2007-03-06 Thread Hanno Schlichting
Hi all,

while pushing local site support in CMF/Plone I came across some weird
test failures. After a while of debbuging I could track this down to the
http method in ZopeTestCase's doctest support.

The method in its Zope2 incarnation is not aware of local sites, while
the one in zope.app.testing is.

I have attached a patch that mirrors the Zope3 behavior and saves the
site information before publishing a module and restores it back, just
like the security manager is saved/restored.

As this is causing some test failures in Plone 3 now, I would be happy
if somebody could take a look at this.

Thank you,
Hanno
Index: 
/opt/plone30/parts/zope2/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
===
--- 
/opt/plone30/parts/zope2/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
  (revision 72995)
+++ 
/opt/plone30/parts/zope2/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
  (working copy)
@@ -117,6 +117,7 @@
 
 import urllib
 import rfc822
+from zope.app.component.hooks import setSite, getSite
 from cStringIO import StringIO
 from ZPublisher.Response import Response
 from ZPublisher.Test import publish_module
@@ -126,6 +127,10 @@
 # Save current Security Manager
 old_sm = getSecurityManager()
 
+# And we need to store the old site
+old_site = getSite()
+setSite(None)
+
 # Commit work done by previous python code.
 transaction.commit()
 
@@ -193,6 +198,9 @@
 # by calling the publish method above
 setSecurityManager(old_sm)
 
+# And we need to restore the site again
+setSite(old_site)
+
 # Sync connection
 sync()
 
___
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 )


Re: [Zope-dev] Re: Caching ZCatalog results

2007-03-06 Thread Dieter Maurer
Roché Compaan wrote at 2007-2-25 11:48 +0200:
 ...
 I see several problems:
 
   *  the RAMCacheManager does not provide an API to implement
  this policy
 
   *  a cache manager would need a special data structure
  to efficiently implement the policy (given a documentId,
  find all cached results containing the documentId).

Can you elaborate. Would and IISet be efficient?

You need a mapping documentId -- cached results
and (maybe) the inverse map in order to update the first one
when cached results are invalidated for different reasons (e.g. timed out).

   *  Apparently, your cache key contains the indexes involved
  in producing the result.

This is coincidental. I'm building a cache key from all arguments passed
in as keyword arguments and on the REQUEST.

  The problem with this is that these indexes are known
  only after the query has been performed:
 
 The catalog API allows indexes to respond to subqueries,
 that do not contain their own name.
 
 I use this feature to allow a Managable RangeIndex
  to transparently replace effective, expires queries.
 
  But otherwise, the feature is probably not used
  intensively.

If these parameters are on the request or in keywords they will form
part of the cache key.

The are on the request but do not identify the index directly.

Let's make an example:

  My ValidityRange Managable RangeIndex can respond to
  queries containing subqueries effective = some_time = expires.

  The request contains effective and expires but does not
  indicate that in fact the ValidityRange index is relevant.

  When I correctly understood your policy, you wanted to
  invalidate any cached results depending on an index which
  is updated. Thus, how do you recognize (from the request alone)
  that you should invalidate all queries including effective
  and expires when the ValidityRange index is updsted?

 ...
Let's assume we have a specialised cache manager and a cache that copes
with the subtleties of sub queries, do think that the invaliding the
cache according to the logic I suggested would work? Can you think of
cases where it can lead to stale results that one should guard against.

Your original policy seemed quite conservative to me.

You weaken conservatism when you want to handle more special
cases for non invalidation (such as do not invalidate UID query results,
when new entries are added).



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


Re: [Zope-dev] Re: Caching ZCatalog results

2007-03-06 Thread Dieter Maurer
Lennart Regebro wrote at 2007-2-23 21:25 +0100:
 ...
Compared with Lucene for example, which instead will create iterators
who will only resturn the next match. This saves you from a lot of
index searching when you have big results.

I don't know if it is feasible to do something like that, but it would
be interesting to look into it.

It is done in IncrementalSearch2.


  http://www.dieter.handshake.de/pyprojects/zope



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


Re: [Zope-dev] Re: [Zope3-dev] Google Summer of Code

2007-03-06 Thread Martijn Pieters

On 3/5/07, Martijn Pieters [EMAIL PROTECTED] wrote:

On 3/5/07, Philipp von Weitershausen [EMAIL PROTECTED] wrote:
 Great. I've added you to http://wiki.zope.org/zope3/SummerOfCode2007. If
 you happen to have any project suggestions, feel free to add them to the
 list.

I've added myself to the mentors list as well.


Google will need your Google account, so I've added mine to the Wiki.

--
Martijn Pieters
___
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] Zope Patch for Zeo Client Connection.py

2007-03-06 Thread Paul Williams

Hi Everyone,

We were experience problems with our zeo client setup on redhat rhel4. 
The client would just quit responding.  No memory or cpu increase was 
associated with this.  The client would remain hung until it was 
restarted.


We looked on the client using Netstat and the status was ESTABLISHED 
with the zeo server.  On the zeo server the netstat said LISTENING.


When running the deadlockdebugger, one thread was in asnycore wait.  The 
others were normal actions such as folder listing or folder contents.


We implemented a couple of lines of code on line 641 of connection.py in 
the ZEO/zrpc packages


We added and else clause to call self.close() if delay is over one 
second.  We found that one second wasn't quite enough and moved it to 5 
seconds.


Now we find out that this drastically improved our performance. The 
servers are now  1 second per page load.  Before, they could be 5 
seconds or more, if they loaded at all.  Also, our servers used to crash 
several times a day and they now haven't crashed in almost a week.


I just wanted to put this out there and see if anyone has any comments 
at all.  I need to get a more permenant solution than this, but it is 
what we have for now.


Thank you,
Paul Williams

___
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] Download Large Files in Zope

2007-03-06 Thread [EMAIL PROTECTED]
Hi,
I've just installed Zope 2.8 with Apache 2 and I made a download library (a CMS 
site is too much for me and I can't find a simple download area product, so 
I've done it!)
Now, when I click on a large .exe file link (href) it seems it load all data 
before prompt for download and the zope service memory usage grow until 1/2 Gb.
How can i manage downloads  uploads?

Thank you in advance

Illorca


--
Con Prometeo prestiti senza spese fino a 31.000 Euro!
http://click.libero.it/webnation06marz07


___
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] Download Large Files in Zope

2007-03-06 Thread Jonathan


- Original Message - 
From: [EMAIL PROTECTED]

To: zope zope@zope.org
Sent: Tuesday, March 06, 2007 2:49 PM
Subject: [Zope] Download Large Files in Zope



Hi,
I've just installed Zope 2.8 with Apache 2 and I made a download library 
(a CMS site is too much for me and I can't find a simple download area 
product, so I've done it!)
Now, when I click on a large .exe file link (href) it seems it load all 
data before prompt for download and the zope service memory usage grow 
until 1/2 Gb.

How can i manage downloads  uploads?


This is one possible solution:

http://www.infrae.com/download/tramline



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 )


Re: [Zope] Download Large Files in Zope

2007-03-06 Thread Maciej Wisniowski
 I've just installed Zope 2.8 with Apache 2 and I made a download library (a 
 CMS site is too much for me and I can't find a simple download area 
 product, so I've done it!)
What about railorad: http://www.infrae.com/products/railroad

 How can i manage downloads  uploads?
In general it is bad idea to hold and serve large files directly from
ZODB. This should be done by Apache etc.

-- 
Maciej Wisniowski
___
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] Download Large Files in Zope

2007-03-06 Thread Maciej Wisniowski
 What about railorad: http://www.infrae.com/products/railroad
I meant tramline: http://www.infrae.com/products/tramline

-- 
Maciej Wisniowski
___
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 Patch for Zeo Client Connection.py

2007-03-06 Thread Chris Withers

Paul Williams wrote:
I just wanted to put this out there and see if anyone has any comments 
at all.  I need to get a more permenant solution than this, but it is 
what we have for now.


It might help to put your patches up somewhere so we can see what you've 
done.


Also might help to document your server setup somewhere a bit more.

Finally, zodb-dev@zope.org might be a more responsive mailing list for 
you...


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] invalid property value: wrapped object

2007-03-06 Thread Dieter Maurer
Anthony Monta wrote at 2007-2-23 09:39 -0800:
Running Zope 2.6.1/Python 2.1.3, I get the following error when I try
to pass form values to a custom ZClass instance-creating method:

Error Type: ValueError
Error Value: Invalid property value: wrapped object

Apparently, you try to store an acquisition wrapped object into
a property. This will not work.



-- 
Dieter
___
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] safe read-only access to acquisition parent objects

2007-03-06 Thread Dieter Maurer
Eric Bréhault wrote at 2007-3-5 13:14 +0100:
I have build a Plone product which allows users to enter a piece of Python
code.
This way, users can easily define their own actions without changing the
product source code.

Those pieces of code are executed using the exec Python command.

I would instead use TALES expressions of type python.

There are restricted -- which is very essential if you cannot
fully trust your users.



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