ReleaseMicrosoftMicrosoftpublished Nov 15, 2025seen Jun 26

microsoft/mssql-python v0.14.0-preview

microsoft/mssql-python

Open original ↗

Captured source

source ↗
published Nov 15, 2025seen Jun 26captured 6dhttp 200method plain

v0.14.0-preview

Repository: microsoft/mssql-python

Tag: v0.14.0-preview

Published: 2025-11-15T06:19:58Z

Prerelease: yes

Release notes:

Release Notes - Version 0.14.0

Features

  • Major Fetch Performance Optimizations (#320, #304)

_What changed:_ Implemented direct UTF-16 decoding for NVARCHAR on Linux/macOS, direct Python C API usage for numeric types, batch row allocation, function pointer dispatch table (major reduction in type dispatch overhead), and cached output converters/column maps _Who benefits:_ All applications fetching result sets, analytics workloads processing large datasets, and performance-sensitive applications _Impact:_ Faster for large result sets (100K+ rows), Significant improvement for very large result sets (~1.2M rows).

  • Connection String Parser and Validation (#307)

_What changed:_ Implemented comprehensive ODBC connection string parser per MS-ODBCSTR specification with parameter allowlist validation, synonym normalization (e.g., hostServer, userUID), and clear error messages for malformed strings _Who benefits:_ All users connecting to SQL Server, developers troubleshooting connection string issues, and applications migrating from other database systems _Impact:_ Catches connection string errors early with actionable messages and prevents silent failures. Breaking change: Unknown parameters now raise ConnectionStringParseError instead of being silently ignored >Fixes #306

  • Enhanced DECIMAL Precision (#287)

_What changed:_ Increased precision support from 15 to 38 digits (SQL Server maximum) with proper binary representation for high-precision decimals via SQL_NUMERIC_STRUCT _Who benefits:_ Financial applications requiring maximum precision, scientific/engineering applications with high-precision calculations, and data migration scenarios _Impact:_ Eliminates precision loss for large decimal values and ensures full compliance with SQL Server's DECIMAL(38, scale) capabilities

  • Comprehensive Logging Framework (#312)

_What changed:_ Unified Python-C++ logging bridge with performance-optimized implementation, new setup_logging() API for DEBUG-level diagnostic logging, ~150 strategic LOG statements across C++ layer, and zero overhead when disabled via atomic level checks _Who benefits:_ Developers troubleshooting connection or query issues, support teams diagnosing production problems, and contributors debugging driver behavior _Impact:_ Enables detailed diagnostic logging for issue investigation with minimal performance impact when disabled (default state)

  • Connection Attribute Control (`set_attr`) (#177)

_What changed:_ Added Connection.set_attr() method for configuring ODBC connection attributes including transaction isolation levels, timeouts, access modes, and other connection options with pyodbc-compatible API _Who benefits:_ Applications requiring fine-grained connection control, developers migrating from pyodbc, and systems needing custom isolation levels or timeout configurations _Impact:_ Provides full control over connection behavior and enables advanced scenarios while improving pyodbc compatibility

  • XML Data Type Support (#293)

_What changed:_ Added comprehensive support for SQL Server XML data type with proper handling for insertion, retrieval, batching, and streaming of XML data _Who benefits:_ Applications processing structured or semi-structured XML data, systems integrating with XML-based APIs, and developers using SQL Server's native XML features _Impact:_ Enables native XML storage and retrieval with efficient streaming for large documents, supporting all CRUD operations

  • DECIMAL Scientific Notation Support (#313)

_What changed:_ Improved handling of decimal values in scientific notation when converting to SQL VARCHAR types, using fixed-point formatting to prevent SQL Server conversion errors _Who benefits:_ Applications working with very large or very small decimal values that may be represented in scientific notation _Impact:_ Prevents conversion errors and ensures consistent decimal formatting across all value ranges

Bug Fixes

  • Access Token Buffer Management (#323)

_What changed:_ Refactored access token handling from static vectors to instance-level buffers in Connection class, improving memory safety and encapsulation for Microsoft Entra ID authentication _Who benefits:_ Applications using Microsoft Entra ID (Azure AD) authentication, multi-threaded applications with concurrent connections, and users experiencing intermittent authentication failures _Impact:_ Fixes authentication token corruption in concurrent scenarios and enhances thread safety for connection attributes

  • Decimal Type Inference for executemany (#322)

_What changed:_ Improved _compute_column_type logic to better handle Decimal values with proper sample value selection for type inference, preferring longer/higher-precision values _Who benefits:_ Applications using batch inserts with Decimal values, financial systems using executemany for performance, and developers encountering type inference errors _Impact:_ Eliminates exceptions during batch Decimal inserts and improves reliability for executemany operations >Fixes #272

This release delivers significant performance improvements, new data type support, enhanced security, and a robust logging framework while maintaining backward compatibility (except for connection string validation). Much faster fetch performance gains and expanded SQL Server compatibility make this a compelling upgrade for production deployments.

Breaking Changes

⚠️ Connection String Validation (#307): Unknown or misspelled connection parameters now raise ConnectionStringParseError instead of being silently ignored. Reserved parameters (Driver, APP) cannot be set by users. Review connection strings for typos or unknown parameters before upgrading.

Migration Notes

  • Connection string errors will now be caught early with clear error messages
  • Remove any attempts to set Driver or APP parameters (managed by the driver)
  • Example: ConnectionStringParseError: Unknown keyword 'Servr' → Fix typo to Server