Package: python2.4 Version: 2.4.2-1 Severity: normal Hi,
I've been tracking down the regression failure in python-pgsql under python2.4, and here's what it comes down to. Python-pgsql includes a short int type named PgInt2, which allows itself to be coerced into all of the usual numeric types. The regression that fails is when a PgInt2 is compared with a float. In this case python determines that the comparison is not implemented. The problem is this: - Under python2.4, the float type includes tp_richcompare but not tp_compare. - When calling try_rich_to_3way_compare(), python does not try any kind of numeric coercion, and so the comparison fails. - When calling try_3way_compare(), python successfully coerces the PgInt2 into a float, but then the comparison fails because the float type has no tp_compare routine. Presumably what would fix things would be one of the following: - Bring back the trivial float_compare() routine, which was removed with python2.4 when they brought in the new float_richcompare() instead; - In try_3way_compare(), if the coercion succeeds and neither object has a tp_compare routine, try tp_richcompare before failing completely. Does either of these solutions seem feasible? Thanks - Ben. -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.12-1-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages python2.4 depends on: ii libc6 2.3.5-6 GNU C Library: Shared libraries an ii libdb4.3 4.3.28-3 Berkeley v4.3 Database Libraries [ ii libncurses5 5.4-9 Shared libraries for terminal hand ii libreadline5 5.0-11 GNU readline and history libraries ii libssl0.9.7 0.9.7g-2 SSL shared libraries ii python2.4-minimal 2.4.2-1 A minimal subset of the Python lan python2.4 recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]