← Back to team overview

agesys-dev team mailing list archive

[Bug 737945] [NEW] BinaryWrappers do not work

 

Public bug reported:

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

** Affects: oursql
     Importance: Undecided
         Status: New

** Description changed:

  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)
+   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

-- 
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



Follow ups

References