[ZODB-Dev] ExtensionClass tp_compare fix
Brian Lloyd
brian at zope.com
Mon Jan 5 16:50:54 EST 2004
> Thanks, Tim - good to know that I haven't lost my senses completely over
> the year end -:)...
>
> Yes, that's the warning I'm seeing, and '$Id: ExtensionClass.c,v 1.58
> 2002/11/12 20:04:20 jeremy Exp $'
> is the version I got as well.
>
> Hope Brian can check on the installer, as I'm not experienced in
> building from sources.
>
> Cheers, Martin
Sorry, I'm way behind on mail. There is definitely a problem
with the new (for 2.7) installer that I need to work out. It
seems to have built beta 2 but labelled it b3 :(
Brian Lloyd brian at zope.com
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
>
> -----Original Message-----
> From: Tim Peters [mailto:tim at zope.com]
> Sent: Monday, 05 Jan 2004 19:31
> To: Gfeller Martin; Brian Lloyd
> Cc: zodb-dev at zope.org
> Subject: RE: [ZODB-Dev] ExtensionClass tp_compare fix
>
>
> [Martin Gfeller, trying Zope 2.7b3 on Windows]
> > Thanks, Tim.
> >
> > Now I'm a bit confused - I thought I had downloaded and installed B3,
> > but its Control Panel says it's B2 - although the Python build it
> > reports is 2.3.2 (#49, Oct 3 2003, 10:25:57), which is after the
> > release date of B2 (I didn't downloade Python separately, and am
> > using the binary build).
> >
> > ExtensionClass.pyd has the date of 03 Oct 2003, 10:21:41.
> >
> > Could it be that B3 doesn't know how advanced it is :-) ?
> > But that would mean that I still have the problem.
>
> Thanks for the followup, Martin. I don't know how the Zope 2.7 beta 3
> installer got built for Windows, but I agree it looks goofy in at least
> the
> ways you've reported. I downloaded it just now and installed it:
>
> Zope-2.7.0-b3-win32.exe
>
> Control Panel indeed says
>
> Zope Version (Zope 2.7.0-b2, python 2.3.2, win32)
>
> so maybe the 2.7b3 Windows installer in fact packaged 2.7b2 again (or
> even
> something older than that -- see below).
>
> >From the 2.7B3 *tarball* download, I verified that the fix for
> ExtensionClass comparisons that started this is in what Linux people
> think
> of as 2.7b3. But I don't think it's in the ExtenionClass binary
> installed
> by the 2.7b3 Windows installer:
>
> C:\Program Files\Zope-2.7.0-b3>set PYTHONPATH=lib/python
>
> C:\Program Files\Zope-2.7.0-b3>bin\python
> Python 2.3.2 (#49, Oct 3 2003, 10:25:57) [MSC v.1200 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import ExtensionClass
> >>> print ExtensionClass.__doc__
> ExtensionClass - Classes implemented in c
>
> Built-in C classes are like Built-in types except that
> they provide some of the behavior of Python classes:
>
> - They provide access to unbound methods,
> - They can be called to create instances.
>
> $Id: ExtensionClass.c,v 1.58 2002/11/12 20:04:20 jeremy Exp $
>
> >>>
>
> The last line of text there says the ExtensionClass version actually
> installed is CVS revison 1.58, more than a year old. That would explain
> why
> you're seeing problems that were fixed a long time ago (but not *that*
> long
> ago <wink>). Continuing the session above:
>
> >>> class A(ExtensionClass.ExtensionClass):
> ... def __init__(self):
> ... pass
> ...
> >>> a = A()
> >>> b = A()
> >>> cmp(a, b)
> __main__:1: RuntimeWarning: tp_compare didn't return -1, 0 or 1
> -1
> >>>
>
> That's the specific RuntimeWarning you're seeing, right?
>
>
> I'm copying Brian Lloyd in the hope that he can shed more light on this.
>
>
More information about the ZODB-Dev
mailing list