[Python-Dev] Strange bug only happens with Python 2.2
Gerhard Häring
haering_python@gmx.de
Fri, 27 Sep 2002 18:23:13 +0200
* Michael Hudson <mwh@python.net> [2002-09-27 16:39 +0100]:
> On Fri, 27 Sep 2002, Gerhard Häring wrote:
>
> > This is somewhat off-topic, but I'm hoping maybe someone can give a hint
> > why this only happens on Python 2.2.1.
>
> Guessing, but the (Jeremy's?) changes I recently backported to
> classobject.c on the release22-maint branch might relate to this.
>
> Can you try with a 222 build?
Yep. The problem goes away with release22-maint :-)
> > Ok, here's the story:
> > [bogus traceback, caused by:]
> > if isinstance(value, PgBytea) or type(value) is PgLargeObjectType:
>
> So something's setting an exception and not letting the interpreter know.
> > Oh, the problem isn't tied to isinstance(value, PgBytea). Any isinstance
> > check causes it later on.
>
> Huh?
To clarify, any isinstance(value, x), where x is a Python class, causes
the problem.
> > [Any tips?]
> Try a release22-maint build?
That fixes the problem, so I'm now pretty confident it is a Python 2.2.1
problem (haven't tried with 2.2.0 yet, would that be of any use?).
-- Gerhard