[Zope-dev] Blob detection in the ZODB for bug 739692

2011-04-26 Thread William Heymann
I am working on a patch for Blob support in OFS.Image/File and I am running 
into a small problem. What is the correct way to detect if the current ZODB 
supports blobs?

If I just do

self.data = ZODB.blob.Blob(data)

in update_data in OFS.Image

and a system does not support blobs

I get this error

Traceback (innermost last):
  Module ZPublisher.Publish, line 134, in publish
  Module Zope2.App.startup, line 301, in commit
  Module transaction._manager, line 89, in commit
  Module transaction._transaction, line 329, in commit
  Module transaction._transaction, line 443, in _commitResources
  Module ZODB.Connection, line 563, in commit
  Module ZODB.Connection, line 619, in _commit
  Module ZODB.Connection, line 662, in _store_objects
Unsupported: Storing Blobs in ZEO.ClientStorage.ClientStorage object at 
0x3248590 is not supported.

which does not even mention OFS.Image anywhere

I tried putting in

try:
self.data = ZODB.blob.Blob(data)
except zExceptions.Unsupported:
self.data = data

and this of course did not work since the error is not actually occurring 
here.

What I am trying to do is make is to that Blobs are used if blobs are 
supported and not used if they are not currently supported. For all of my 
systems this is not an issue since I only support blobs but for a patch to be 
accepeted it seems that it would need to work either way.

I considered putting in a configuration switch in zope.conf to say if blobs 
should be used or not so that it is up to the developer to set the switch and 
enable blob support and the system would just give errors if setup incorrectly 
but that does not seem like a good idea.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Blob detection in the ZODB for bug 739692

2011-04-26 Thread David Glick
On 4/26/11 7:40 AM, William Heymann wrote:
 I am working on a patch for Blob support in OFS.Image/File and I am running
 into a small problem. What is the correct way to detect if the current ZODB
 supports blobs?

 If I just do

 self.data = ZODB.blob.Blob(data)

 in update_data in OFS.Image

 and a system does not support blobs

 I get this error

 Traceback (innermost last):
Module ZPublisher.Publish, line 134, in publish
Module Zope2.App.startup, line 301, in commit
Module transaction._manager, line 89, in commit
Module transaction._transaction, line 329, in commit
Module transaction._transaction, line 443, in _commitResources
Module ZODB.Connection, line 563, in commit
Module ZODB.Connection, line 619, in _commit
Module ZODB.Connection, line 662, in _store_objects
 Unsupported: Storing Blobs inZEO.ClientStorage.ClientStorage object at
 0x3248590  is not supported.

 which does not even mention OFS.Image anywhere

 I tried putting in

 try:
  self.data = ZODB.blob.Blob(data)
 except zExceptions.Unsupported:
  self.data = data

 and this of course did not work since the error is not actually occurring
 here.

 What I am trying to do is make is to that Blobs are used if blobs are
 supported and not used if they are not currently supported. For all of my
 systems this is not an issue since I only support blobs but for a patch to be
 accepeted it seems that it would need to work either way.

 I considered putting in a configuration switch in zope.conf to say if blobs
 should be used or not so that it is up to the developer to set the switch and
 enable blob support and the system would just give errors if setup incorrectly
 but that does not seem like a good idea.
You can get (persistent object)._p_jar.db().storage and check if it 
provides ZODB.interfaces.IBlobStorage.


--  
David Glick
 Web Developer
 davidgl...@groundwire.org
 206.286.1235x32

Groundwire: You Are Connected   
 http://groundwire.org  

Online tools and strategies for the environmental movement.  Sign up for 
Groundwire News!
 http://groundwire.org/email-capture


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


[Zope-dev] zope-tests - FAILED: 8, OK: 55

2011-04-26 Thread Zope tests summarizer
This is the summary for test reports received on the 
zope-tests list between 2011-04-25 00:00:00 UTC and 2011-04-26 00:00:00 UTC:

See the footnotes for test reports of unsuccessful builds.

An up-to date view of the builders is also available in our 
buildbot documentation: 
http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds

Reports received


   ZTK 1.0 / Python2.4.6 Linux 64bit
   ZTK 1.0 / Python2.5.5 Linux 64bit
   ZTK 1.0 / Python2.6.5 Linux 64bit
   ZTK 1.0dev / Python2.4.6 Linux 64bit
   ZTK 1.0dev / Python2.5.5 Linux 64bit
   ZTK 1.0dev / Python2.6.5 Linux 64bit
   Zope 3.4 KGS / Python2.4.6 64bit linux
   Zope 3.4 KGS / Python2.5.5 64bit linux
   Zope 3.4 Known Good Set / py2.4-32bit-linux
   Zope 3.4 Known Good Set / py2.4-64bit-linux
   Zope 3.4 Known Good Set / py2.5-32bit-linux
   Zope 3.4 Known Good Set / py2.5-64bit-linux
   Zope Buildbot / zope2.12-py2.6 slave-ubuntu32
   Zope Buildbot / zope2.13-py2.6 slave-ubuntu32
   Zope Buildbot / zope2.13-py2.7 slave-ubuntu32
   Zope Buildbot / zope2.13_win-py2.6 slave-win
   Zope Buildbot / zope2.13_win-py2.7 slave-win
   Zope Buildbot / zope2.14-py2.6 slave-ubuntu32
   Zope Buildbot / zope2.14-py2.7 slave-ubuntu32
   Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32
   Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu64
   Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu32
   Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu64
   Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu32
   Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu64
   Zope Buildbot / zopetoolkit-1.0_win-py2.4 slave-win
   Zope Buildbot / zopetoolkit-1.0_win-py2.5 slave-win
   Zope Buildbot / zopetoolkit-1.0_win-py2.6 slave-win
   Zope Buildbot / zopetoolkit-1.1-py2.5 slave-ubuntu32
   Zope Buildbot / zopetoolkit-1.1-py2.5 slave-ubuntu64
   Zope Buildbot / zopetoolkit-1.1-py2.6 slave-ubuntu32
   Zope Buildbot / zopetoolkit-1.1-py2.6 slave-ubuntu64
   Zope Buildbot / zopetoolkit-1.1_win-py2.5 slave-win
   Zope Buildbot / zopetoolkit-1.1_win-py2.6 slave-win
[1]Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu32
   Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu64
   Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu32
   Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu64
   Zope Buildbot / zopetoolkit_win-py2.5 slave-win
   Zope Buildbot / zopetoolkit_win-py2.6 slave-win
   winbot / ZODB_dev py_254_win32
   winbot / ZODB_dev py_265_win32
   winbot / ZODB_dev py_265_win64
   winbot / ZODB_dev py_270_win32
   winbot / ZODB_dev py_270_win64
[2]winbot / z3c.coverage_py_265_32
[3]winbot / z3c.rml_py_265_32
[4]winbot / zc_buildout_dev py_254_win32
[5]winbot / zc_buildout_dev py_265_win32
[6]winbot / zc_buildout_dev py_265_win64
[7]winbot / zc_buildout_dev py_270_win32
[8]winbot / zc_buildout_dev py_270_win64
   winbot / ztk_10 py_254_win32
   winbot / ztk_10 py_265_win32
   winbot / ztk_10 py_265_win64
   winbot / ztk_11 py_254_win32
   winbot / ztk_11 py_265_win32
   winbot / ztk_11 py_265_win64
   winbot / ztk_dev py_254_win32
   winbot / ztk_dev py_265_win32
   winbot / ztk_dev py_265_win64
   winbot / ztk_dev py_270_win32
   winbot / ztk_dev py_270_win64

Non-OK results
--

[1]FAILED  Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu32
   https://mail.zope.org/pipermail/zope-tests/2011-April/039122.html


[2]FAILED  winbot / z3c.coverage_py_265_32
   https://mail.zope.org/pipermail/zope-tests/2011-April/039137.html


[3]FAILED  winbot / z3c.rml_py_265_32
   https://mail.zope.org/pipermail/zope-tests/2011-April/039135.html


[4]FAILED  winbot / zc_buildout_dev py_254_win32
   https://mail.zope.org/pipermail/zope-tests/2011-April/039151.html


[5]FAILED  winbot / zc_buildout_dev py_265_win32
   https://mail.zope.org/pipermail/zope-tests/2011-April/039152.html


[6]FAILED  winbot / zc_buildout_dev py_265_win64
   https://mail.zope.org/pipermail/zope-tests/2011-April/039153.html


[7]FAILED  winbot / zc_buildout_dev py_270_win32
   https://mail.zope.org/pipermail/zope-tests/2011-April/039154.html


[8]FAILED  winbot / zc_buildout_dev py_270_win64
   https://mail.zope.org/pipermail/zope-tests/2011-April/039155.html


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