[pypy-issue] [issue1573] sqlite3 encoding of cursor.description column seems to have changed

mike bayer tracker at bugs.pypy.org
Fri Aug 2 02:11:07 CEST 2013


New submission from mike bayer <mike_mp at zzzcomputing.com>:

the strings in cursor.description, for better or worse, are encoded as strings
in cPython and also in pypy1.9.  In pypy2.1 (I'm testing beta2 still) they now
seem to come back as full blown unicode objects, which is nice (and certainly
what Python 3 will do), but not compatible with what cPython2.x does:

#!coding: utf-8

import sqlite3

conn = sqlite3.connect(":memory:")

cursor = conn.cursor()
cursor.execute(u"select 'x' as méil")

assert cursor.description[0][0] == u"méil".encode('utf-8')


will pass in cPython and pypy1.9, but on pypy2.1beta2 it fails.

----------
messages: 6021
nosy: pypy-issue, zzzeek
priority: bug
release: 2.1
status: unread
title: sqlite3 encoding of cursor.description column seems to have changed

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1573>
________________________________________


More information about the pypy-issue mailing list