BinaryWrappers do not work
Bug #737945 reported by
Jasiel Spelman
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oursql |
New
|
Undecided
|
Unassigned |
Bug Description
BinaryWhateverM
>>> oursql.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "statement.pyx", line 14, in oursql.
TypeError: super(type, obj): obj must be an instance or subtype of type
As a work around, I've found I can use just buffer() items before they get into the iterable:
>>> oursql.IterWrapper( [buffer('\x00')] ).next()
<read-only buffer for 0x7f16efc27210, size -1, offset 0 at 0x1555130>
This occurs on 0.9.2
description: | updated |
To post a comment you must log in.
The error manifested itself a little differently on my platform:
… _BinaryWhatever Mixin._ _next__ (oursqlx/ oursql. c:7195) _BinaryWhatever Mixin._ _next__ (oursqlx/ oursql. c:7195)
File "statement.pyx", line 14, in oursql.
File "statement.pyx", line 14, in oursql.
RuntimeError: maximum recursion depth exceeded while calling a Python object
The problem is that the code calls "super" for the wrong class name. This typo has been present since the first revision where those helpers were introduced, (http:// bazaar. launchpad. net/~jerub/ oursql/ master/ revision/ 16).
The patch is a simple name change. I've attached the fix.