I'm finally looking closely at Blobs and making a few changes. Some
of these are backward incompatible. Most are inconsequential. Since
Blobs are still considered experimental, I feel fairly free to do
this, but I don't want to create undue pain for people.
I will make sure that the Zope 3 tests pass after the changes.
Is anyone using Blobs in production? Does anyone have precious blob
pickles?
The changes that are likely to affect application code:
- Text-mode blobs are no-longer supported. (I doubt they ever truly
were.) Blob files will always be created and opened in binary mode.
Only the (previously) documented open modes: 'r', 'w', 'a', and 'r+',
will be accepted. It will be an error, for example, to use 'wb'.
- The blob consumeFile method will officially not work with open
files, which has never worked reliably on Windows. (We'll need yet
another chi-module tempory-file hack to allow FieldStorage files to
work with consumeFile.) Unfortunately, I know of no way to make it
fail with open files on Linux.
- I'd like to simplify the directory structure. I'd like to get rid
of the ZODB.Blob package and replace it with a ZODB.blob module.
This means that you'll import the Blob class like this:
import ZODB.blob
myblob = ZODB.blob.Blob
Of course, this will affect pickles. If necessary, I can probably
create a module alias, but I hope this isn't necessary.
I'll be making other changes that will make blob use less restrictive
than it is now.
Jim
--
Jim Fulton mailto:[EMAIL PROTECTED] Python
Powered!
CTO (540) 361-1714
http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev