NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #635 most downloaded on PyPI
DB API module for ODBC
Last release 11 months ago
17 Oct 2025
Release timing varies
gaps range from 6 weeks to 1.4 years
Some releases are documented
notes for 31 of 58 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
64 releases · first in 2015
Version 5.3.0 has been released with wheels for versions 3.9 - 3.14
Version 5.3.0 has been released with wheels for versions 3.9 - 3.14
HOMEBREW_PREFIX to locate Homebrew by @RA80533 in https://github.com/mkleehammer/pyodbc/pull/1212Full Changelog: https://github.com/mkleehammer/pyodbc/compare/5.2.0...5.3.0
Version 5.3.0 has been released with wheels for versions 3.9 - 3.14
HOMEBREW_PREFIX to locate Homebrew by @RA80533 in #1212Full Changelog: 5.2.0...5.3.0
One column per quarter.
5.3.0 with wheels for Python 3.14 Latest
Latest
Compare
Thanks to @keitherskine there are now wheels for 5.13. There are aiso a few bug fixes that were ready to go.
Thanks to @keitherskine there are now wheels for 5.13. There are aiso a few bug fixes that were ready to go.
Release 5.2.0 with wheels for Python 3.13
Compare
Mac M1 & M2 binaries are available going forward.
Mac M1 & M2 binaries are available going forward.
GitHub added new Mac ARM action runners which is what we use to build each release.
Thanks to @keitherskine who made all this happen. Not only did he write the original release code for all of the other versions, he jumped on the new Mac runner as soon as it was available.
I'd also like to thank the many people working through the Mac binary confusion, testing and providing work arounds until this runner was available: @Carreau @ndmlny-qs @jordantshaw @gabalafou @v-chojas and many others on the Issue.
If you are a Mac user, please let us know how this works for you.
This is a bug fix for 5.0.0 that restores the ability to pass bytes objects in the attrs_before parameter when connecting. This is often used for Azur
This is a bug fix for 5.0.0 that restores the ability to pass bytes objects in the attrs_before parameter when connecting. This is often used for Azure with a token. Issue #1289
This is the first 3.x only pyodbc release, supporting Python 3.8-3.12.
This is the first 3.x only pyodbc release, supporting Python 3.8-3.12.
The API is backwards compatible, so previous Python 3 products using pyodbc should not need any changes.
Please note that macOS ARM / Apple Silicon binary builds have been problematic due inconsistencies in the way unixODBC libraries can be installed. Please see the issues and discussions.
We're retrying macOS Apple Silicon wheels, for those with M1, M2, etc. chips. If you have one of these, please give this release a try so we know before the final 5.0.0 release in a few days.
This means you would not use Rosetta. Just install normally using pip install pyodbc==5.0.0b2. Don't use --no-binary.
For those wondering, the inability to supply these wheels has not been due to any pyodbc code issues. We use Github Actions to build all the different versions and it still doesn't have complete support for macOS Apple Silicon CI runners. At this time, only Intel is supported. However, we can cross-compile and generate ARM wheels on Intel, but we can't test them. That's why we need your help!
This is a beta release for the upcoming 5.0 that drops Python 2 and adds Python 3.12
Source and wheels for 5.0.0b1 is available on PyPI.
This beta restores fast_executemany, so it should be feature complete. If there are no serious issues reported, it will be released as 5.0.0 this week (before Python 3.12 is officially released).
This is a test release for the upcoming 5.0 that drops Python 2 and supports Python 3.12
Source and wheels for 5.0.0a2 is available on PyPI
Note that fastexecmany is not available in this release, but will be ported to the next.
Please give it a try and join the discussion here.
Prepare 5.0.0b3 release
Prepare 5.0.0b3 release
We're retrying macOS Apple Silicon wheels, for those with M1, M2, etc. chips. If you have one of these, please give this release a try so we know befo
We're retrying macOS Apple Silicon wheels, for those with M1, M2, etc. chips. If you have one of these, please give this release a try so we know before the final 5.0.0 release in a few days.
This means you would not use Rosetta. Just install normally using pip install pyodbc==5.0.0b2. Don't use --no-binary.
For those wondering, the inability to supply these wheels has not been due to any pyodbc code issues. We use Github Actions to build all the different versions and it still doesn't have complete support for macOS Apple Silicon CI runners. At this time, only Intel is supported. However, we can cross-compile and generate ARM wheels on Intel, but we can't test them. That's why we need your help!
This is a beta release for the upcoming 5.0 that drops Python 2 and adds Python 3.12
This is a beta release for the upcoming 5.0 that drops Python 2 and adds Python 3.12
Source and wheels for 5.0.0b1 is available on PyPI.
This beta restores fast_executemany, so it should be feature complete. If there are no serious issues reported, it will be released as 5.0.0 this week (before Python 3.12 is officially released).
This is a test release for the upcoming 5.0 that drops Python 2 and supports Python 3.12
This is a test release for the upcoming 5.0 that drops Python 2 and supports Python 3.12
Source and wheels for 5.0.0a2 is available on PyPI
Note that fastexecmany is not available in this release, but will be ported to the next.
Please give it a try and join the discussion here.
Version 4.0.38 had a serious bug in Row.__repr__ which could cause crashes (#1196 ). That version has been yanked from PyPI and replaced with this one
Version 4.0.38 had a serious bug in Row.repr which could cause crashes (#1196 ). That version has been yanked from PyPI and replaced with this one.
Version 5.0 is on its way and will drop support for Python 2. This release is a (hopefully final) bug fix release for the 4.x line.
Version 5.0 is on its way and will drop support for Python 2. This release is a (hopefully final) bug fix release for the 4.x line.
A big thanks to everyone involved:
Note that the 4.0.36 does not build with some versions of GCC. The 4.0.37 version is a fix for
this. Version 4.0.37 did not have the setup.py VERSION variable updated, so 4.0.38 is a fix for that!
This release provides Python 3.11 wheels, plus some other wheel fixes. A special thanks to @keitherskine for the wheel and automated build support tha
This release provides Python 3.11 wheels, plus some other wheel fixes. A special thanks to @keitherskine for the wheel and automated build support that makes this possible.
There is also an import memory fix when using fast_execute_many. Thanks to @gordthompson for that.
First, I want to say thank you very, very much to the people that setup and maintained the automated building of wheels: @keitherskine, @hugovk, and @
First, I want to say thank you very, very much to the people that setup and maintained the automated building of wheels: @keitherskine, @hugovk, and @abitrolly. This is the first release with wheels for Mac, completely thanks to them. It also saves me a huge amount of time since I no longer have to generate each wheel by hand on different systems.
Release highlights:
Nothing published for this version
Nothing published for this version
A backwards compatibility bug on Windows was causing "missing DLL" errors and not allowing pyodbc to be loaded (#663). This affected Python versions 3
A backwards compatibility bug on Windows was causing "missing DLL" errors and not allowing pyodbc to be loaded (#663). This affected Python versions 3.5+. This was due to building with a compiler that was newer than those used by the official Python builds. The newer Visual Studio 2019 introduced a dependency a new DLL which doesn't ship with Python, so pyodbc would fail to load unless something else had already installed the DLL.
Keith Erskine added a fix to check for overflow of integer and floating point parameters so that a proper Python exception is raised (#671).
Kieth and Gord Thompson also provided a bunch of improvements for unit tests.
Anatoli Babenia updated the readme with a badge for PyPI which provides a quick link to it. Very nice. PyPI should now also include the contents of the readme instead of just a single sentence thanks to a commit by Keith.
Nothing published for this version
Fix incorrect size calcation for Unicode characters
Fixes in this release:
Many thanks to everyone who provided these fixes. Merry Christmas.
Use int instead of bigint when possible (based on size of data) to work with drivers that don't support bigint at all. Thanks @gordthompson and @v-mak
This is mostly a bug fix release.
This is mostly a bug fix release.
Additionally, thanks @gordthompson for both adding get_output_converter (#496) and for updating the SQL Server tests to properly bypass issues not supported with the FreeTDS driver.
Due to #506, I recommend upgrading from 4.0.25 where the issue was introduced.
Many thanks to the community for this release:
Many thanks to the community for this release:
test_tvp in the SQL Server unit tests.I cleaned up SQLite unit tests which were out of date and upgraded deprecated unittest methods from all tests. v-chojas made a fix to SQL Server test_…
This is a bug fix release with fixes from lots of contributors:
Some changes in 4.0.22 to integrate the old parameter binding and the new executemany array binding have not handled Unicode in all cases. The integra
Some changes in 4.0.22 to integrate the old parameter binding and the new executemany array binding have not handled Unicode in all cases. The integration has been reverted to ensure pyodbc is as stable as possible.
If you had issues with 4.0.22, please try 4.0.23.
Nothing published for this version
This is a minor release that adds:
This is a minor release that adds:
Nothing published for this version
Sorry everyone - I left a debug printf statement in the 4.0.18 code. Please use this instead. I'm reproducing the 4.0.18 tag release notes here:
Sorry everyone - I left a debug printf statement in the 4.0.18 code. Please use this instead. I'm reproducing the 4.0.18 tag release notes here:
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.
None passed in for optional keyword parameters such as Cursor.columns('t1', schema=None).This is a primarily a fix patch, thought it does contain one new feature that is turned off by default:
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.
None passed in for optional keyword parameters such as Cursor.columns('t1', schema=None).Nothing published for this version
This release adds support for subinterpreters, which fixes crashes in systems like mod_wsgi that run multiple Python interpreters in the same process.
This release adds support for subinterpreters, which fixes crashes in systems like mod_wsgi that run multiple Python interpreters in the same process.
Upgrade ASAP. Previous 4.x versions could cause any parameters passed to SQL statements to live forever by incrementing their reference count.
Upgrade ASAP. Previous 4.x versions could cause any parameters passed to SQL statements to live forever by incrementing their reference count.
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 fe
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.
Same as 4.0.12, but fix building for Python 2.7
Same as 4.0.12, but fix building for Python 2.7
The new pyodbc.drivers() implementation buffer was too small, so names would get truncated.
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.
Added support for reading IBM DB/2 columns as Unicode text.
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
Nothing published for this version
Accept UUID objects as parameters. If pyodbc.native_uuid is True, return SQL_GUID columns as UUID objects. If False, the default for backwards compati
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.
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 al
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.
Recently a change was made to use SQLDescribeColW so that Unicode column names could be retrieved properly. Unfortunately this uncovered some weirdnes
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
Nothing published for this version
Fix decoding of Cursor.description column names. Fixes #190 - The issue was a column alias with an i with acute which caused an error. pyodbc now (1)
Fix decoding of Cursor.description column names. Fixes #190 - The issue was a column alias with an i with acute which caused an error. pyodbc now (1) uses the Unicode version of SQLDescribeColumn and (2) uses the configured SQL_C_WCHAR encoding. I've added SQL Server test decode_meta for this.
When a connection is used in a with clause (as a context manager), the connection has always been committed if successful. However, when an exception is raised it now issues a specific rollback. In the past neither was performed if an exception was raised.
Nothing published for this version
Important fixes for reading decimal/numeric columns, gettypeinfo, an error when reading an empty string.
Important fixes for reading decimal/numeric columns, gettypeinfo, an error when reading an empty string.
This is a doc-only update to replace 4.0.0 which I removed from PyPI (pip). This should be 100% compatible with 4.0.0.
This is a doc-only update to replace 4.0.0 which I removed from PyPI (pip). This should be 100% compatible with 4.0.0.
I was attempting to replace the source tarball for 4.0.0 but that is apparently not allowed. It would have been nice to know that before it let me delete it ;)
You should upgrade to 4.0.2, however, for some important bug fixes.
Unicode handling has been rewritten for correctness. Make _sure_ you read the Unicode documentation if you have any issues.
Unicode handling has been rewritten for correctness. Make sure you read the Unicode documentation if you have any issues.
MySQL and PostgreSQL users: You will probably need to add a couple of lines of configuration. See the Unicode documentation!
WARNING: The source code for this version is not available on PyPI. Please upgrade to 4.0.2.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →