Releases: mkleehammer/pyodbc
Fixes + Mac binary wheels!
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:
- Mac wheels are finally here. Thanks to all that worked on the code for that. Please let us
know if there are any problems with the wheels on PyPI - Python 3.10 wheels are also available
- Fix for DSNs with non-ASCII characters.
- Memory leak fix with Decimal parameters.
- PostgreSQL dates of -Infinity/+Infinity changed to year 1 and 9999 instead of raising an error.
Windows "missing DLL" fix
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.
Fix Release
Fixes in this release:
- Fix incorrect size calcation for Unicode characters (#654)
- Fix binding of 32-bit ints on 64-bit Linux (#611)
- Fixes type mismatch for null/None with table value parameters. #596
- Fixes and cleanup of unit tests for MS Access (#606), MySQL (#630 #632) and new tests (#637 #645)
Many thanks to everyone who provided these fixes. Merry Christmas.
Bug Fixes: bigint, datetime2, big-endian, unit-tests
- 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-makouz
- Support SQL Server datetime2 precision. Previously more data was passed than the column precision causing an error. Thanks @PrinsEdje80, @v-makouz, and @v-chojas
- Make Informix unit tests work again. Thanks @richard-reece
- Correct encoding error on big-endian machines for connection errors. Default to native UTF16 instead of UTF16-LE. Thanks @kadler
- Fix MySQL unit tests. Thanks @gordthompson
Bug Fixes
This is mostly a bug fix release.
- Issue #506 uncovered a potentially serious error where Unicode strings may not get a NULL terminator when being converted.
- Issue #504 was a double decref in the error return path of executemany. Thanks to @v-chojas for this fix.
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.
SQL Server TVP; Various Fixes
Many thanks to the community for this release:
- Thanks to @v-makouz and @v-chojas , support for SQL Server Table-Valued Paramaters has arrived. See
test_tvp
in the SQL Server unit tests. - Support for IBM DB/2 DECFLOAT type (#472) by @C-DY
- Better SQL Server and FreeTDS tests with known driver issues (#469) by @gordthompson.
- Fix "function sequence error" with fast executemany (#450) by @v-makouz.
Official 3.7 Builds. Small Features. Unicode fixes.
This is a bug fix release with fixes from lots of contributors:
- Column size fixed when binding Unicode parameters - noticed when using characters more than 2-bytes wide in UTF-16. Thanks Maxim Kouznetsov.
- v-chojas fixed use of Unicode connection strings in Python 2.7. Also removed arbitrary limit of connection string lengths.
- New SQL_CONVERT_X constants added by Jordan Bolton.
- The setinputsizes method has been overloaded by skeetor and can now accept data types and sizes, not just sizes.
- v-chojas added support for non-integer-valued connection attributes
- 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_drivers test and ensured they run against Python 2.6. (Though, it might be time to officially drop support for older Python versions?)
Revert parameter handling for stability
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.
Minor requested enhancements
Remove debug print
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.
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 asCursor.columns('t1', schema=None)
.