cursor.description column names reported as bytes in python 3
Bug #933512 reported by
Mike Bayer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Connector/Python |
Triaged
|
Low
|
Geert JM Vanderkelen |
Bug Description
Python 3.2, MySQL connector/python 0.3.2-devel
from mysql import connector
conn = connector.
cursor = conn.cursor()
cursor.
colnames = [desc[0] for desc in cursor.description]
assert colnames == ['a', 'b', 'c'], colnames
output:
Traceback (most recent call last):
File "test.py", line 10, in <module>
assert colnames == ['a', 'b', 'c'], colnames
AssertionError: [bytearray(b'a'), bytearray(b'b'), bytearray(b'c')]
To post a comment you must log in.
We should make sure they it is returned as unicode yes, decoded from whatever character set was used.