← Back to team overview

agesys-dev team mailing list archive

[Bug 737945] Re: BinaryWrappers do not work

 

The error manifested itself a little differently on my platform:

  …
  File "statement.pyx", line 14, in oursql._BinaryWhateverMixin.__next__ (oursqlx/oursql.c:7195)
  File "statement.pyx", line 14, in oursql._BinaryWhateverMixin.__next__ (oursqlx/oursql.c:7195)
  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.

** Patch added: "BinaryWhateverMixin.patch"
   https://bugs.launchpad.net/oursql/+bug/737945/+attachment/4307020/+files/BinaryWhateverMixin.patch

-- 
You received this bug notification because you are a member of Agesys
Team, which is subscribed to oursql.
https://bugs.launchpad.net/bugs/737945

Title:
  BinaryWrappers do not work

Status in oursql:
  New

Bug description:
  BinaryWhateverMixins do not work:

  >>> oursql.BinaryIterWrapper( ['\x00'] ).next()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "statement.pyx", line 14, in oursql._BinaryWhateverMixin.__next__ (oursqlx/oursql.c:6562)
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/oursql/+bug/737945/+subscriptions


References