]> 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:15:57 +0000 (11:15 -0500)
committerR David Murray <rdmurray@bitdance.com>
Thu, 10 Jan 2013 16:15:57 +0000 (11:15 -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 926a15b0e3366829cf6ad38596ccf5a22ad8e7eb,f0b569c19533b156643fbfdc5bed50c0f6f77996..7a2f8f2232941bb22b26f2cf05b477837aee9ff9
+++ b/Misc/NEWS
@@@ -212,13 -142,12 +212,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 #16876: Optimize epoll.poll() by keeping a per-instance epoll events
 +  buffer instead of allocating a new one at each poll().
 +
  - Issue #16491: IDLE now prints chained exception tracebacks.
  
 +- fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
 +
  - Issue #15972: Fix error messages when os functions expecting a file name or
    file descriptor receive the incorrect type.