]> granicus.if.org Git - python/commitdiff
merge #15545: fix sqlite3.iterdump regression on unsortable row_factory objects.
authorR David Murray <rdmurray@bitdance.com>
Thu, 10 Jan 2013 16:13:34 +0000 (11:13 -0500)
committerR David Murray <rdmurray@bitdance.com>
Thu, 10 Jan 2013 16:13:34 +0000 (11:13 -0500)
The fix for issue 9750 introduced a regression by sorting the row objects
returned by fetchall.  But if a row_factory such as sqlite3.Row is used, the
rows may not be sortable (in Python3), which leads to an exception.  The
sorting is still a nice idea, so the patch moves the sort into the sql.

Fix and test by Peter Otten.

1  2 
Misc/NEWS

diff --cc Misc/NEWS
index 4aabffea81a5dc2b047712860f34dfd81e3286bf,f4fb8219cce44df9d1a1ddf978ff957cec7dc45a..f0b569c19533b156643fbfdc5bed50c0f6f77996
+++ b/Misc/NEWS
@@@ -142,13 -199,14 +142,17 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #15545: Fix regression in sqlite3's iterdump method where it was
+   failing if the connection used a row factory (such as sqlite3.Row) that
+   produced unsortable objects. (Regression was introduced by fix for 9750).
  - Issue #16491: IDLE now prints chained exception tracebacks.
  
 -- Issue #16828: Fix error incorrectly raised by bz2.compress(''). Patch by
 -  Martin Packman.
 +- Issue #15972: Fix error messages when os functions expecting a file name or
 +  file descriptor receive the incorrect type.
 +
 +- Issue #16828: Fix error incorrectly raised by bz2.compress(b'') and
 +  bz2.BZ2Compressor.compress(b''). Initial patch by Martin Packman.
  
  - Issue #16541: tk_setPalette() now works with keyword arguments.