[Zope-dev] Zope Tests: 5 OK

2008-01-28 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Sun Jan 27 12:00:00 2008 UTC to Mon Jan 28 12:00:00 2008 UTC.
There were 5 messages: 5 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Sun Jan 27 21:00:03 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009016.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Sun Jan 27 21:01:34 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009017.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Sun Jan 27 21:03:04 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009018.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Sun Jan 27 21:04:34 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009019.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Sun Jan 27 21:06:04 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-January/009020.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 )


RE: [Zope-dev] FileUpload and blob on Windows

2008-01-28 Thread Mark Hammond
Hi Leo,
  I'm not familiar with the Zope side of the world at all, so this may be
completely useless...

 However, if one tries to consume a NamedTemporaryFile and then open its
 generated blob before closing the tempfile, Windows complains:
 
 
 
  import ZODB.blob, tempfile
  f = tempfile.NamedTemporaryFile()
  b = ZODB.blob.Blob()
  b.consumeFile(f.name)
  b.open('r')
  Traceback (innermost last):
  ...
  IOError: [Errno 13] Permission denied:
 'c:\\buildout\\var\\tmp\\tmpsuykkc'
 
...

 unless we use some non-portable win32 code to allow writing and 
 reading to the same file simultaneously.

I'm not sure exactly what you mean by simultaneously, but assuming you
just need the ability to read and write to a file, you already can.  Does
this behaviour help?

 import tempfile
 f = tempfile.NamedTemporaryFile()
 f.write(hello)
 f.seek(0,0)
 f.read()
'hello'

I can easily see it might not - as soon as the file is closed you have
(obviously) lost it.

Mark


___
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] FileUpload and blob on Windows

2008-01-28 Thread Leonardo Rochael

Hi Mark,


Mark Hammond-3 wrote:
 
 [...]
 unless we use some non-portable win32 code to allow writing and 
 reading to the same file simultaneously.
 
 I'm not sure exactly what you mean by simultaneously, but assuming you
 just need the ability to read and write to a file, you already can.  Does
 this behaviour help?
 
 import tempfile
 f = tempfile.NamedTemporaryFile()
 f.write(hello)
 f.seek(0,0)
 f.read()
 'hello'
 
 I can easily see it might not - as soon as the file is closed you have
 (obviously) lost it.
 
 

I should've been clearer, I meant reading and writing at the same time from
2 different file handles. 

NamedTemporaryFile has the added complication of removing the file from
under 'blob' when it's closed, so even if I don't try to open the blob after
consuming the file, the file disappears after the request is gone, and the
transaction subsequently fails when trying to rename the consumed file to
it's final location.

I also tried win32file.CreateHardLink() but if a file is open by one
hard-link, renaming the other hard-link fails, so we're stuck with copying
files wholesale on Windows, or closing the FileUpload object and letting
subsequent uses of it fail.
-- 
View this message in context: 
http://www.nabble.com/FileUpload-and-blob-on-Windows-tp15129190p15152299.html
Sent from the Zope - Dev mailing list archive at Nabble.com.

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


AW: [Zope-dev] FileUpload and blob on Windows

2008-01-28 Thread Roger Ineichen
Hi 

 Betreff: RE: [Zope-dev] FileUpload and blob on Windows
 
 
 Hi Mark,
 
 
 Mark Hammond-3 wrote:
  
  [...]
  unless we use some non-portable win32 code to allow writing and 
  reading to the same file simultaneously.
  
  I'm not sure exactly what you mean by simultaneously, but 
 assuming 
  you just need the ability to read and write to a file, you already 
  can.  Does this behaviour help?
  
  import tempfile
  f = tempfile.NamedTemporaryFile()
  f.write(hello)
  f.seek(0,0)
  f.read()
  'hello'

Why are you using a NamedTemporaryFile? If I'm right the 
goal is to store the file stream from the upload directly
in this file and copy this file over to the real directory 
location.
This means you can cut down the amount of read and write file data, right?

Why not use a own file class like:

class TMPFile(file):
Temorary file.

This temporary file can remove a file in request.close() form the file
system.


def release(self):
Release the object in the requests (_held) list.
if self.name is not None and os.path.exists(self.name):
os.unlink(self.name)

You can move such a file with shutil.move(self.tmpPath, targetPath).

I implemented such a file upload accelerator. With this beast I was able
to upload a ubuntu vmware image with  950 MB in about 75 seconds to Zope3.
And this with a memory usage below 50 MB. It really rocks.

Note; I implemented this on windows and it works well.

Regards
Roger Ineichen


___
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] FileUpload and blob on Windows

2008-01-28 Thread Christian Theune

Hi,

Leonardo Rochael schrieb:

I should've been clearer, I meant reading and writing at the same time from
2 different file handles. 


NamedTemporaryFile has the added complication of removing the file from
under 'blob' when it's closed, so even if I don't try to open the blob after
consuming the file, the file disappears after the request is gone, and the
transaction subsequently fails when trying to rename the consumed file to
it's final location.

I also tried win32file.CreateHardLink() but if a file is open by one
hard-link, renaming the other hard-link fails, so we're stuck with copying
files wholesale on Windows, or closing the FileUpload object and letting
subsequent uses of it fail.


Hmm. The Python docs already mention this problem for Windows. To avoid 
copying, we'd have to adjust the publisher not to use a 
NamedTemporaryFile, but actually use a regular temporary file that gets 
deleted when the publisher decides to.


Christian

--
gocept gmbh  co. kg - forsterstrasse 29 - 06112 halle (saale) - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
___
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] zope 2.9.6 stops servicing requests

2008-01-28 Thread Peter Bengtsson
Look for the DeadlockDebugger and install that and follow the 
instructions. Hopefully it can help you debug what Zope is doing when 
it's not responding but still ticking.
Perhaps you've got some dead connections to the database that refuse to 
timeout.


Chris Hoy wrote:

Hi

Several weeks ago I moved one of my machine to a new server and upgraded
zope from 2.7 to 2.9 as well as the database from mysql 4.1 to 5.0.38.
All seems to be going well expect that on a couple of occasions the zope
server has stop repsonding to request. The server is takeing 0% cpu and the
only way to get it going again is to re-start zope.
I can't see anything in the event.log file or on the machine (the debug info
is below)

Can anybody point me in the right direction to try and find out what is
happening 


# Zope version: (Zope 2.9.6-final, python 2.4.4, linux2)
# Python version: 2.4.4 (#2, Apr 12 2007, 21:22:23) [GCC 4.1.2 (Ubuntu
4.1.2-0ubuntu4)]
# System Platform: linux2
# SOFTWARE_HOME: /usr/lib/zope2.9/lib/python
# INSTANCE_HOME: /home/zope/instance
# CLIENT_HOME: /home/zope/instance/var
# Process ID: 31605 (1140881728)
# Running for: 13 min 15 sec
# sys.path:
  /home/zope/instance/Products/Hnd
  /home/zope/instance/lib/python
  /home/zope/instance/lib/python
  /usr/lib/zope2.9/lib/python/Zope2/Startup
  /usr/lib/python2.4/site-packages/setuptools-0.6c6-py2.4.egg
  /usr/lib/python2.4/site-packages/simplejson-1.7.1-py2.4.egg
  /usr/lib/zope2.9/lib/python
  /home/zope/instance
  /usr/lib/python24.zip
  /usr/lib/python2.4
  /usr/lib/python2.4/plat-linux2
  /usr/lib/python2.4/lib-tk
  /usr/lib/python2.4/lib-dynload
  /usr/local/lib/python2.4/site-packages
  /usr/lib/python2.4/site-packages
  /usr/lib/python2.4/site-packages/PIL 



Chris



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


Re: [Zope] Zope product to rate an aticles

2008-01-28 Thread Andreas Jung



--On 28. Januar 2008 14:57:37 + Kamal Hamzat [EMAIL PROTECTED] 
wrote:



Thanks aj.

But I could not find the content ratings Could you please send me the
URL if you know it.



Google content ratings plone :-)

-aj

pgpyYzZG5VzBc.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] ZMI in zope 2.10.5 broken

2008-01-28 Thread quizzical

Hi everyone,

I'm new to Zope and have just installed Zope2.10.5. I have created a new
Zope instance in my home folder and then browsed to my servers ip address at
port 8080 and logged into the ZMI. 

This is the problem, the top and main frames of the ZMI render perfectly and
I can navigate to the links in the main window, however, the tree menu in
the left frame does not load. Instead I get this error:

Error Type: NameError
Error Value: global name 'util' is not defined

I have had a look through the mailing lists and googled for hhours and have
found no indication as to what could be causing this.

The only clue I have is that when I click on the 'help' link in the main
frame the left frame of the window fails to render, even though it is a
completely different url. I have tried this in both Mozilla and IE and on
several different computers, one on XP and one on Vista.  

Some information about my setup:

I am running an ubuntu 7.10 server, installed both Zope installations from
the .tgz files on Zope.org. Python version 2.4.4

please tell me what extra information I can provide, I have zero experience
with Zope and am finding it pretty tough to learn, so I know nothing about
standard log files or debugging.

Cheers for any help

Alex
-- 
View this message in context: 
http://www.nabble.com/ZMI-in-zope-2.10.5-broken-tp15125493p15125493.html
Sent from the Zope - General mailing list archive at Nabble.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] ZMI in zope 2.10.5 broken

2008-01-28 Thread Andreas Jung



--On 28. Januar 2008 07:14:36 -0800 quizzical [EMAIL PROTECTED] wrote:




Error Type: NameError
Error Value: global name 'util' is not defined



Please provide the full traceback - either from the error_log within the ZMI
or from messages on your console (requires Zope running in the foreground 
(zopectl fg)).


-aj

pgpKRtCBGBTU7.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 product to rate an aticles

2008-01-28 Thread Kamal Hamzat

Thanks aj.

But I could not find the content ratings Could you please send me the URL 
if you know it.


Regards
- Original Message - 
From: Andreas Jung [EMAIL PROTECTED]

To: Kamal Hamzat [EMAIL PROTECTED]; zope@zope.org
Sent: Saturday, January 26, 2008 4:41 PM
Subject: Re: [Zope] Zope product to rate an aticles



___
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] DeadlockDebugger, Ubuntu 2.9.6 Threadframe

2008-01-28 Thread Andreas Jung



--On 28. Januar 2008 16:53:50 + Chris Hoy [EMAIL PROTECTED] 
wrote:



Hi
I need to put the DeadlockDebugger on my machine but it requires the
python threadframe component. I can get this to compile in this
evironment has any body done this?


If there is a problem, what is the problem?

-aj

pgpsAWFe1s5Sw.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] DeadlockDebugger, Ubuntu 2.9.6 Threadframe

2008-01-28 Thread Chris Hoy
Hi 
I need to put the DeadlockDebugger on my machine but it requires the python
threadframe component. I can get this to compile in this evironment has any
body done this?
 
Chris
 
 
___
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] ZMI in zope 2.10.5 broken

2008-01-28 Thread quizzical

Here it is:

/home/alex/playground/bin/runzope -X debug-mode=on
2008-01-28 15:53:17 INFO ZServer HTTP server started at Mon Jan 28 15:53:17
2008
Hostname: 0.0.0.0
Port: 8080
2008-01-28 15:53:20 INFO Zope Ready to handle requests
2008-01-28 15:53:20 ERROR Zope.SiteErrorLog
http://192.168.1.67:8080/manage_menu
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module App.special_dtml, line 178, in _exec
  Module TreeDisplay.TreeTag, line 88, in render
  Module TreeDisplay.TreeTag, line 209, in tpRender
  Module TreeDisplay.TreeTag, line 461, in tpRenderTABLE
   - __traceback_info__: (['AAE=', []], {'url': 'tpURL', 'nowrap':
'1', 'branches': 'tpValues', 'id': 'tpId', 'childless_decoration': ''},
(['AAE=', []],), (['AAE=', []],))
  Module TreeDisplay.TreeTag, line 337, in tpRenderTABLE
  Module zlib, line 38, in compress
NameError: global name 'util' is not defined


Andreas Jung-5 wrote:
 
 
 
 --On 28. Januar 2008 07:14:36 -0800 quizzical [EMAIL PROTECTED] wrote:
 
 

 Error Type: NameError
 Error Value: global name 'util' is not defined


 Please provide the full traceback - either from the error_log within the
 ZMI
 or from messages on your console (requires Zope running in the foreground 
 (zopectl fg)).
 
 -aj
  
 ___
 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 )
 
 

-- 
View this message in context: 
http://www.nabble.com/ZMI-in-zope-2.10.5-broken-tp15125493p15138278.html
Sent from the Zope - General mailing list archive at Nabble.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] Package recommendations (?) for minimal ZCA environment

2008-01-28 Thread sean.upton
All:

I figured I would survey this list for recommendations of zope packages
that have minimal dependencies -- specifically for non-web, non-ZODB ZCA
applications.  My criteria for this minimal environment:

1. No ZCML, ZODB, or zope.app.* dependencies.
2. Egg available in cheeseshop; svn is okay too (e.g.
zope.cachedescriptors trunk does not require ZODB; PYPI egg does at the
moment).  I will use zc.buildout and virtualenv for deployment
environment.
3. Not specifically targeted at web applications only.

Currently, I'm using zope.component, zope.interface, zope.schema,
zope.datetime, zope.event, and a related but small set of dependencies
installed from PYPI.

Background: I'm working on a set of components for working with
mass-media content that are to be generically useful across multiple
environments, application frameworks (web and non-web), etc.  The core
of these components depends on some zope 3 libraries, but my goal is to
keep dependencies to a minimum.  

A superset of this minimum framework would be used to deploy components
to specific application environments including basic automation scripts
to move content from one system to another, middleware applications
exposing these components over XML-RPC, web applications in Z3, Django,
and Plone/Z2.

Any recommendations appreciated.  Maybe compiling a list like this is
helpful for the community to reach out to non-Zope python developers too
-- makes the technology more approachable.

Thanks,
Sean

+--+
 Sean Upton The San Diego Union-Tribune
 619.293.1451Systems Applications Supervisor - Newsroom   
 Information Technology
 350 Camino De La Reina
 San Diego, CA 92108   [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] Package recommendations (?) for minimal ZCA environment

2008-01-28 Thread Chris McDonough

[EMAIL PROTECTED] wrote:

All:

I figured I would survey this list for recommendations of zope packages
that have minimal dependencies -- specifically for non-web, non-ZODB ZCA
applications.  My criteria for this minimal environment:

1. No ZCML, ZODB, or zope.app.* dependencies.
2. Egg available in cheeseshop; svn is okay too (e.g.
zope.cachedescriptors trunk does not require ZODB; PYPI egg does at the
moment).  I will use zc.buildout and virtualenv for deployment
environment.
3. Not specifically targeted at web applications only.

Currently, I'm using zope.component, zope.interface, zope.schema,
zope.datetime, zope.event, and a related but small set of dependencies
installed from PYPI.

Background: I'm working on a set of components for working with
mass-media content that are to be generically useful across multiple
environments, application frameworks (web and non-web), etc.  The core
of these components depends on some zope 3 libraries, but my goal is to
keep dependencies to a minimum.  


A superset of this minimum framework would be used to deploy components
to specific application environments including basic automation scripts
to move content from one system to another, middleware applications
exposing these components over XML-RPC, web applications in Z3, Django,
and Plone/Z2.

Any recommendations appreciated.  Maybe compiling a list like this is
helpful for the community to reach out to non-Zope python developers too
-- makes the technology more approachable.


Hi Sean!

Some of the ones that we've compiled (visible via http://svn.repoze.org or 
http://dist.repoze.org):


repoze.vhm (virtual hosting services)
repoze.retry (retry a request when an exception is encountered)
repoze.tm2 (transaction management, depends only on the 'transaction' module and 
zope.interface, see also http://repoze.org/tmdemo.html ... note that repoze.tm 
depends on all of ZODB, repoze.tm2 depends on only the smaller packages but 
does the same thing, at the expense of not being compatible with ZODB 3.6)


You might also take a look at repoze.zope2 to service Zope/Plone requests via 
WSGI: http://static.repoze.org/misc/developingwithrepoze-zope2.pdf and check out 
repoze.org in general, as your goals seem to closely align with its.


Also:

IRC:  irc://irc.freenode.net#repoze
maillists: http://lists.repoze.org/listinfo

HTH,

- C




Thanks,
Sean

+--+
 Sean Upton The San Diego Union-Tribune
 619.293.1451Systems Applications Supervisor - Newsroom   
 Information Technology
 350 Camino De La Reina
 San Diego, CA 92108   [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 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 )