New submission from mike bayer <[email protected]>:
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 <[email protected]>
<https://bugs.pypy.org/issue1573>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-issue