New submission from Barry Alan Scott <[EMAIL PROTECTED]>:
I am testing PySVN against python2.6b3.
I see a failure when PyNumber_Long is called with a Float.
It raises TypeError.
The same code works on 2.3, 2.4 and 2.5.
Looking with GDB I see:
(gdb) bt
#0 PyNumber_Long (o=0x1809384) at Objects/abstract.c:1735
#1 0x020f8e70 in Py::Long::Long (this=0xbfffefc8, [EMAIL PROTECTED]) at
pysvn_client_cmd_list.cpp:739
1681 m = o->ob_type->tp_as_number;
1682 if (m && m->nb_long) { /* This should include subclasses
of long */
1683 /* Classic classes always take this branch. */
1684 PyObject *res = m->nb_long(o);
1685 if (res && (!PyInt_Check(res) &&
!PyLong_Check(res))) {
res does not contain the value that nb_long(o) calculated.
and the if on 1685 is false so you get a type error.
I have compiled on Mac OS X 10.4 powerpc and fedora 8 x86.
Both fail in the exact same way.
If you need to reproduce you will need to build pysvn and
run a command that triggers the problem. I don't have a
smaller example.
----------
components: None
messages: 72519
nosy: barry-scott
severity: normal
status: open
title: PyNumber_Long fails from Float
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3777>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com