pypi pyodbc 5.4.0
5.4.0 with wheels for Python 3.15

3 hours ago

Version 5.4.0 has been released with wheels for Python 3.11 - 3.15

Python support

Behavior changes

  • DECIMAL and NUMERIC values are now fetched using SQL_NUMERIC_STRUCT by default, so they are
    no longer affected by the locale's decimal separator. Set Connection.fetch_decimal_as_string = True
    to restore the previous text-based behavior. By @bkline in #1470
    • A driver that writes text in place of a SQL_NUMERIC_STRUCT (such as IBM i Access) is detected
      and read as text, by @rad-pat in #1514

New features

  • Support returning rows as dictionaries (Cursor.rows_as_dicts) by @bkline in #1487
  • Add support for SQLTablePrivileges (Cursor.tablePrivileges()) by @bkline in #1463
  • Expose the native ODBC handles (pyodbc.henv, Connection.hdbc, Cursor.hstmt) by @bkline in #1493
  • Make driver_completion configurable (connect(driver_completion=...)) by @bkline in #1488
  • Allow setting of connection string attributes (Connection.set_attr()) by @bkline in #1465
  • Support filtering DSN by scope (dataSources(scope=...)) by @bkline in #1461
  • Make initial ReadVarColumn buffer size configurable (Connection.readvar_initsize) by @bkline in #1490
  • Add flag for buggy SQLGetDiagRecW driver behavior (Connection.compat_diagrec_byte_length) by @bkline in #1464
  • Allow fetch of DB2 BLOB by @bkline in #1462
  • Fetch messages when DAE kicks in by @bkline in #1468

Bug fixes

Build and tests

  • Enable assertions for test builds and run SQLite tests in CI by @shramov in #1448
  • Prevent tests from failing with FreeTDS by @bkline in #1473
  • Remove test dependency coupling for testing UUID retrieval by @bkline in #1475
  • Replace custom macros with Py_STRINGIFY() by @bkline in #1485
  • Use ODBC Driver 18.6.2.1 for Windows tests now that the TVP crash is fixed by @mkleehammer in #1498
  • CI, test, and typing improvements throughout, and SQL Server 2025 in CI, by @keitherskine

Thanks

  • @keitherskine for once again keeping the wheel builds and CI current, including Python 3.15.
  • @bkline for the large majority of this release's features and fixes.

New Contributors

Full Changelog: 5.3.0...5.4.0

Don't miss a new pyodbc release

NewReleases is sending notifications on new releases.