[PEAK] PEAK CVS vs. ZODB CVS :: [pP]ersistence :: Round 1, Fight!

Bob Ippolito bob at redivi.com
Sun Feb 22 03:20:51 EST 2004


On Feb 22, 2004, at 2:52 AM, Bob Ippolito wrote:

> On Feb 20, 2004, at 12:16 PM, Phillip J. Eby wrote:
>
>> At 12:11 PM 2/20/04 -0500, Bob Ippolito wrote:
>>
>>> On Feb 20, 2004, at 11:59 AM, Phillip J. Eby wrote:
>>>> However, my plan for alpha 4 was to drop the use of ZODB altogether  
>>>> and go with a PEAK-specific persistence mechanism.  But I haven't  
>>>> designed that mechanism yet, so it's not a quick fix.
>>>
>>> I'm pretty sure that the latest ZODB 3.3 doesn't use ExtensionClass,  
>>> it uses a new style class (written in C).
>>
>> I may investigate that if I have the time, but I'm concerned that if  
>> the semantics of the 3.3 version are different from ZODB4, I may  
>> waste a lot of time hacking how PEAK wraps it that would be better  
>> spent replacing it altogether.
>
> On further inspection.. the ZODB  3.3 that I'm using (ZODB in the CVS  
> repo) has a module called "persistent" which seems equivalent to the  
> "persistence" module that PEAK uses, with a few small changes (i.e. it  
> doesn't seem to have the stupid 2.2 hack, so I made the metaclass  
> type).  I did have to make a small patch to the persistent module such  
> that it gets Interface and Attribute from protocols if ZODB isn't  
> available (otherwise it uses garbage old style classes in place).
--patch snipped--
> I also changed the setup.py to check for ZEO instead of  
> zope.component, because ZODB installs ZConfig too -- but that's more  
> of a hack.
>
> All of the tests pass, except one related to ZConfig.. something about  
> u'/Library/Python/2.3_PEAK/ZConfig/doc/schema.dtd' not being a valid  
> URL type.. on further inspection, it seems that it's not normalizing  
> the relative path against the document's base.. it's trying to use  
> '../../ZConfig/doc/schema.dtd' directly, instead of os.path.join(base,  
> '../../blah') and ends up trying to load it as a url when that fails.   
> It actually gets ends up with the correct path when it *does* do the  
> normalization, but it doesn't stick "file://" in front of it.  I'm  
> going to file a bug against PyXML and maybe Python on this one.
>
> >  
> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/site-packages/_xmlplus/sax/ 
> saxutils.py(515)prepare_input_source()
> -> f = urllib2.urlopen(source.getSystemId())
> (Pdb) source.getSystemId()
> u'/Library/Python/2.3_PEAK/ZConfig/doc/schema.dtd'

This was indeed a bug in the standard library (and PyXML) that is not  
yet fixed in CVS HEAD.. bug is filed: http://python.org/sf/902037

-bob




More information about the PEAK mailing list