Skip to content

Releases: mkleehammer/pyodbc

Fixes

20 Oct 19:57
Compare
Choose a tag to compare

This is a primarily a fix patch, thought it does contain one new feature that is turned off by default:

The feature is an optimized Cursor.executemany that binds parameters into an array to drastically reduce network round trips. This can be a major speedup, but this preliminary version is turned off by default because it can only be used with drivers that use UCS-2 exclusively and that properly deal with the ODBC numeric structure. Right now I would recommend only using this with SQL Server on Windows. This feature will be tweaked in the near future to support as many drivers as possible and to use the configured encodings.

Fixes

  • Add a workaround for building on macOS High Sierra.
  • Add support for building with homebrew unixODBC
  • Fix Unicode error messages that were sometimes garbled in the past.
  • Fix Cursor.columns, primaryKeys, and similar metadata methods that would not allow None passed in for optional keyword parameters such as Cursor.columns('t1', schema=None).

Support for subinterpreters and mod_wsgi

30 Mar 16:59
Compare
Choose a tag to compare

This release adds support for subinterpreters, which fixes crashes in systems like mod_wsgi that run multiple Python interpreters in the same process.

Fix Memory Leak

15 Mar 21:14
Compare
Choose a tag to compare

Upgrade ASAP. Previous 4.x versions could cause any parameters passed to SQL statements to live forever by incrementing their reference count.

Possible Python bug workaround

04 Mar 20:27
Compare
Choose a tag to compare

Fix for #206 where Cursor.fetchall() fails due to a possible bug in PyCodec_Encode. Encoding works correctly but it sets an invalid exception which fetchall() detects.

Fix 2.7 Build

25 Feb 22:43
Compare
Choose a tag to compare

Same as 4.0.12, but fix building for Python 2.7

More small fixes: drivers()

25 Feb 19:26
Compare
Choose a tag to compare

The new pyodbc.drivers() implementation buffer was too small, so names would get truncated.

Also fixed a potential double-decrement during import, but did not have a case where it crashed.

Ignore driver-reported max varchar if <=255. Some drivers like FileMaker return -1, etc., which caused a hang when writing.

Add DB/2 XML, homebrew, and pyodbc.drivers()

19 Feb 22:36
Compare
Choose a tag to compare

Added support for reading IBM DB/2 columns as Unicode text.

Merged in pull request that adds a localhost homebrew directory to the include paths on macOS. Thanks @sgivens0

Merged in a long-neglected pull request that adds pyodbc.drivers(). Thanks @sergiodlc

Add support for UUID

19 Feb 00:19
Compare
Choose a tag to compare

Accept UUID objects as parameters. If pyodbc.native_uuid is True, return SQL_GUID columns
as UUID objects. If False, the default for backwards compatibility, return them as Unicode
strings.

MS Access Python 3 support and optimized ints

17 Feb 23:38
Compare
Choose a tag to compare

Issue #84 Previously all Python 3 longs were sent via SQL_BIGINT but Access does not support this so now SQL_INTEGER is used when possible. This is also a nice optimization for other drivers.

Also fixed #195 - Python 3 text and Python 2 unicode was always passed as SQL_WVARCHAR even if the encoding was set to something like UTF-8 that should be SQL_VARCHAR.

Update for Teradata

16 Feb 22:03
Compare
Choose a tag to compare

Recently a change was made to use SQLDescribeColW so that Unicode column names could be retrieved properly. Unfortunately this uncovered some weirdness with some drivers, this time Teradata.

I'm not sure if the issue is iODBC (which Apple doesn't ship anymore) is using a 4-byte
SQLWCHAR or if Teradata is returning UCS4/UTF-32LE for column names in SQLDescribeColW. Either
way I've added a hack that assumes 4-byte chars if the decoding for SQL_WMETADATA (a pyodbc
specific constant) is set to any of the UTF-32 encodings. The encoding is then actually used.

cnxn.setdecoding(pyodbc.SQL_WMETADATA, encoding='utf-32le')

Fixes #194