[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2013-01-10 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2013-01-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2a417ad8bfbf by R David Murray in branch '2.7': #15109: revert '%'->'format' changes in 4b105d328fe7 to fix regression. http://hg.python.org/cpython/rev/2a417ad8bfbf -- nosy: +python-dev ___ Python tracke

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-07-17 Thread Ilpo Nyyssönen
Changes by Ilpo Nyyssönen : -- nosy: +biny ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread R. David Murray
R. David Murray added the comment: Note that this is a regression in 2.7.3 relative to 2.7.2, which is why I'm marking it as high priority. -- nosy: +petri.lehtinen priority: normal -> high stage: -> needs patch ___ Python tracker

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread R. David Murray
R. David Murray added the comment: Or use 'from __future__ import unicode_literals'. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread R. David Murray
R. David Murray added the comment: >>> print('{}'.format(u'\u2107')) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u2107' in position 0: ordinal not in range(128) >>> print('%s' % u'\u2107') ℇ (You get the exception withou

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Ev Kontsevoy
Ev Kontsevoy added the comment: I am attaching death.py file which dies on string.format() The stack trace above is at the full depth. Python doesn't print anything from inside of format(). -- Added file: http://bugs.python.org/file26057/death.py __

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Could you reproduce this in a short script that doesn't use sqlite? I'm looking for something like: str = 'some-string' "{0}".format(str) Also: is that the entire traceback? I don't see how format could be invoking a codec. Maybe the error occurs when writing

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Ev Kontsevoy
Ev Kontsevoy added the comment: If the behavior of string.format() can be fixed to act identically to u"%s" % "" that would be simply wonderful! Currently at work we have a rule in place: to never use string.format() since it cannot be used for anything but constants due to encoding exception

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread R. David Murray
R. David Murray added the comment: It's not clear to me why the behavior differs. Hopefully Eric will explain. For 2.7 we should probably just revert the change to the yield statement to restore the previous behavior, unless format can be fixed. -- nosy: +eric.smith, r.david.murray

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Ev Kontsevoy
Ev Kontsevoy added the comment: Proposed fix: maybe yield(u"%s;" % row[0]) or simply row[0] + ";"? -- ___ Python tracker ___ ___

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Ev Kontsevoy
Changes by Ev Kontsevoy : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15109] sqlite3.Connection.iterdump() dies with encoding exception

2012-06-19 Thread Ev Kontsevoy
New submission from Ev Kontsevoy : When calling connection.iterdump() on a database with non-ASCII string values, the following exception is raised: File "/python-2.7.3/lib/python2.7/sqlite3/dump.py", line 56, in _iterdump yield("{0};".fo