My favorites | Sign in
Project Logo
             
Search
for
Updated May 24, 2009 by mkleehammer
Labels: Featured
ReleaseNotes  
Release notes for each version

2.1.6 - 2009-05-24

Important Fix: Connections with autocommit turned on would not actually be closed! (By default, connections are opened with autocommit turned off; you must set autocommit to True to see this bug.)

Applied the patch from john.chandler.lists (Issue 48) to add support for the SQL Server XML data type. (The patch included unit tests too. Very nice.)

2.1.5 - 2009-04-19

I'm trying to verify as many fixes as possible before releasing, but it should be soon. In particular, I need some Mac OS/X testing.

New timeout attribute

Applied the excellent patch from patrik.simons (Issue 47) which adds a timeout attribute to the connection. The timeout is applied to all subsequently created cursors.

Fixed Cursor.execute return value

WARNING: This is not backwards compatible!

The return value from Cursor.execute stated that the return value was always the cursor itself, but there were 2 cases where the rowcount would be returned instead. This has been corrected -- the Cursor is always returned now.

If you have code that expected the return value to be an integer row count, you'll need to update your code from:

# WRONG
if cursor.execute("delete from tbl where x=1"):
    # do something if deleted

to

# RIGHT
if cursor.execute("delete from tbl where x=1").rowcount:
    # do something if deleted

This is probably rare. The return for SELECT statements was always the cursor, so there is no change there.

Issue 36: Option to force string results to Unicode

Included a fantastic patch from patrik.simons that adds a unicode_results Boolean keyword to connect which causes all result strings to be Unicode:

cnxn = pyodbc.connect(cnxnstring, unicode_results=True)

Other Changes

  • Issue 35: A patch to enable building pyodbc with mingw32 (gcc on Windows).
  • Issue 39: Fixed cursor.skip (would only skip 1 in past)
  • Issue 40: Fixed the "finally pops bad exception" problem in Python 2.4 (finally)
  • Issue 22: Added README.rst to source distribution. (Lost when renamed from README.txt to README.rst for github.)
  • Added Excel unit tests
  • Fixed Access unit tests so they run under Python 2.4
  • Issue 45: Crash when passing sets to executemany.

2.1.4

Issue 19: New code did not build on 64-bit Linux due to incorrect parameter definitions (SQLINTEGER instead of SQLLEN, etc.)

Because this is a 64-bit only fix, the 2.1.3 Windows installers can still be used.

Thanks to axel.b.k...@web.de for the patch!

2.1.3

Issue 18: Added optional keyword support to pyodbc.connect to better match the DB API. See the documentation for connect on the Module page.

Issue 14: Reading decimals failed if the locale used anything other than a period as the decimal point.

Issue 11: GIL now released around all ODBC calls to free up other threads.

Issue 16: Added Cursor.skip method.

Issue 17: Implemented phase 1 of the performance enhancements.


Sign in to add a comment
Hosted by Google Code