Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 2e13011b3719 by Petri Lehtinen in branch '3.2':
sqlite3: Handle strings with embedded zeros correctly
http://hg.python.org/cpython/rev/2e13011b3719
New changeset 93ac4b12a750 by Petri Lehtinen in branch '2.7':
Petri Lehtinen pe...@digip.org added the comment:
Attached an updated patch. The custom text_factory case is now fixed, and
bytes, bytearray and custom factory are all tested.
I also added back the pysqlite_unicode_from_string() function, as this makes
the patch a bit smaller. It also seems
Changes by Petri Lehtinen pe...@digip.org:
Removed file: http://bugs.python.org/file24122/sqlite3_zero_byte_v3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13676
___
Petri Lehtinen pe...@digip.org added the comment:
(Whoops, I didn't mean to change the magic source coding comment. Updating the
patch once again.)
--
Added file: http://bugs.python.org/file24123/sqlite3_zero_byte_v3.patch
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
Attached an updated patch. The custom text_factory case is now fixed,
and bytes, bytearray and custom factory are all tested.
Thanks, looks good to me.
Antoine: Do you happen to know what's the status of the
OptimizeUnicode thingie? Has it
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13676
___
___
Python-bugs-list mailing list
Petri Lehtinen pe...@digip.org added the comment:
What? Don't you SEE that it works correctly? :)
Attached an updated patch with a test case.
FTR, I also tried to make it possible to have the SQL statement include a zero
byte, but it seems that sqlite3_prepare() (and also the newer
Antoine Pitrou pit...@free.fr added the comment:
It would be nice to also have tests for the bytes and bytearray cases.
It also seems the generic case hasn't been fixed
(PyObject_CallFunction(self-connection-text_factory, y, val_str)).
--
___
Python
New submission from Petri Lehtinen pe...@digip.org:
Inserting a string with embedded zero byte only inserts the string up to the
first zero byte:
import sqlite3
connection = sqlite3.connect(':memory:')
cursor = connection.cursor()
cursor.execute('CREATE TABLE test (value TEXT)')
Antoine Pitrou pit...@free.fr added the comment:
Where are the tests? :)
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13676
___
10 matches
Mail list logo