ReleaseMicrosoftMicrosoftpublished Apr 10, 2026seen 3d

microsoft/mssql-python v1.5.0

microsoft/mssql-python

Open original ↗

Captured source

source ↗
published Apr 10, 2026seen 3dcaptured 13hhttp 200method plain

v1.5.0

Repository: microsoft/mssql-python

Tag: v1.5.0

Published: 2026-04-10T10:56:42Z

Prerelease: no

Release notes:

Release Notes - Version 1.5.0

Enhancements

Apache Arrow Fetch Support (#354)

_What changed_: Added three new cursor methods — cursor.arrow(), cursor.arrow_batch(), and cursor.arrow_reader() — that convert SQL Server result sets into Apache Arrow data structures using the Arrow C Data Interface. The implementation bypasses Python object creation in the hot path for improved performance. _Who benefits_: Data engineers and analysts working with analytics stacks such as pandas, Polars, DuckDB, or any Arrow-native framework; developers building high-throughput ETL pipelines requiring efficient columnar data exchange. _Impact_: Enables zero-copy, native-speed data transfer from SQL Server to Arrow ecosystems; provides multiple consumption patterns to suit batch workloads. > PR #354 | GitHub Issue #130 - Thanks @ffelixg for the contribution!

sql_variant Type Support (#446)

_What changed_: Added native support for the SQL Server sql_variant type. The driver now detects sql_variant columns at fetch time, resolves their underlying base type, and returns correctly typed Python values. Updated constants, type validation, and C++ fetch routines to handle all valid sql_variant base types. _Who benefits_: Applications querying tables that use sql_variant columns for flexible schema designs; developers migrating from other SQL Server drivers that support this type. _Impact_: Eliminates unsupported type errors when querying sql_variant columns; ensures Python values match the actual stored base type. Note: sql_variant columns use a streaming fetch path, which may have a slight performance impact compared to fixed-type columns. > PR #446

Native UUID Support (#463)

_What changed_: Added a native_uuid setting (configurable at module and per-connection scope) that controls whether UNIQUEIDENTIFIER columns are returned as uuid.UUID objects (default) or as pyodbc-compatible uppercase strings. The connect() API accepts a native_uuid parameter for per-connection overrides. _Who benefits_: Developers who prefer working with Python's uuid.UUID type directly; teams migrating from pyodbc who need string UUID compatibility; applications requiring consistent UUID handling across connections. _Impact_: Eliminates manual UUID string-to-object conversions; provides a clean migration path from pyodbc-style string UUIDs; configurable at module level or per-connection for incremental adoption. > PR #463 | GitHub Issue #447

Row Class Public Export & Module API Improvements (#474)

_What changed_: The Row class is now exported at the top level of mssql_python. SQL type constants, GetInfo constants, and auth types are now dynamically exported from constants.py and importable directly from the package. Decimal separator logic was refactored into a dedicated decimal_config.py module. _Who benefits_: Developers using type annotations that reference the Row class; users importing SQL type constants directly from the package; libraries building on top of mssql-python. _Impact_: Enables from mssql_python import Row for type annotation use; reduces friction for users previously required to reach into internal modules; improves overall public API clarity. > PR #474 | GitHub Issue #270

---

Bug Fixes

False Positive qmark Detection in SQL Parameters (#465)

_What changed_: Fixed a bug where ? characters inside bracketed identifiers (e.g., [column?name]), single-quoted string literals, double-quoted identifiers, single-line comments, and multi-line comments were incorrectly treated as parameter placeholders, triggering spurious parameter mismatch errors. Added context-aware SQL scanning logic that correctly skips all quoted contexts. _Who benefits_: Developers writing queries with bracketed identifiers containing ?; applications using generated SQL that includes ? in comments or string literals. _Impact_: Eliminates false positive parameter mismatch errors; enables use of SQL Server identifiers containing ? without workarounds. > PR # #465 | GitHub Issue #464

NULL Parameter Type Mapping for VARBINARY Columns (#466)

_What changed_: Fixed a bug where inserting None (NULL) into a VARBINARY column raised an implicit conversion error from varchar to varbinary. NULL parameters were previously mapped to SQL_VARCHAR; changed to SQL_UNKNOWN_TYPE so the driver calls SQLDescribeParam to infer the correct target column type. _Who benefits_: Applications that insert NULL values into VARBINARY or other binary columns; developers working with nullable binary data. _Impact_: Eliminates implicit conversion errors for NULL VARBINARY parameters; ensures correct NULL binding for any column type without requiring explicit type hints. > PR #466 | GitHub Issue #458

Stale Auth Fields in Bulk Copy EntraID Authentication (#488)

_What changed_: Fixed a bug in cursor.bulkcopy() where stale connection-string credential fields (authentication, user_name, password) were left in the py-core context after an Azure AD access token was acquired. py-core's validator rejected access_token when combined with those fields. The fix strips them after token acquisition. Affects ActiveDirectoryDefault, ActiveDirectoryInteractive, and ActiveDirectoryDeviceCode. _Who benefits_: Applications using bulk copy with Azure AD authentication methods. _Impact_: Enables bulk copy to function correctly with all Azure AD authentication flows; eliminates validation rejections from py-core…

Excerpt shown — open the source for the full document.

Notability

notability 3.0/10

Routine library release, minor version update.