Skip to content

Release Notes - Version 1.12.0

Latest

Choose a tag to compare

@subrata-ms subrata-ms released this 24 Jul 15:08
8d82966

Enhancements

• Standalone mssql-python-odbc Package for ODBC Driver Binaries (#663, #687)

What changed: The ODBC driver binaries that mssql-python needs at runtime are now also published as a separate, pure-data companion package called mssql-python-odbc (import name mssql_python_odbc, currently pinned to version 18.6.2). mssql-python declares mssql-python-odbc==18.6.2 in install_requires, so pip install mssql-python transparently pulls the driver package alongside it. The native loader prefers the external mssql_python_odbc package when it is present, and falls back to the ODBC driver binaries still bundled inside the mssql-python wheel when it is not — so existing installations keep working with no code changes. The fallback is GIL-safe and Alpine/musl-safe.

Who benefits: Users who want to keep driver binaries pinned or updated independently of the Python driver code, redistributors who want a slimmer mssql-python wheel over time, and anyone who was hitting duplicate-ownership issues from bundled ODBC files.

Impact: The Phase-2 split ships without a breaking change. In a future major release (v2.0.0) the bundled libs/ tree will be removed and mssql-python-odbc will become a hard dependency.

PR #663 | PR #687

Bug Fixes

• Bulk Copy Connection Timeout Not Honored (#650)

What changed: cursor.bulkcopy() opens a separate connection through mssql_py_core, which previously defaulted to a hardcoded 15-second connect timeout with no way to override it from Python. The cursor's query timeout (set via connect(timeout=X)) is now forwarded into mssql_py_core's connect_timeout when it is set. timeout=0 is preserved as "no override" and leaves mssql_py_core on its 15s default. The cursor's timeout snapshot at the time of the bulkcopy() call is what is used — later changes to the parent connection do not affect an in-flight bulk copy.

Who benefits: Applications that call bulkcopy() against slow, throttled, or high-latency SQL Server endpoints (for example over VPN or in cross-region scenarios) and need a longer connect timeout, or that need to fail fast with a shorter one.

Impact: bulkcopy() now honors the same connect timeout as the rest of the driver.

PR #650 | GitHub Issue #626

• Bulk Copy Fails on Custom CLR UDT Columns (via mssql_py_core) (#688)

What changed: cursor.bulkcopy() into a column whose type is a custom, assembly-registered CLR UDT (any UDT other than the built-in geography / geometry / hierarchyid) previously failed with Protocol Error: Unsupported TDS type for bulk copy: 0xF0, because the wire path in the native core had no handler for the UDT (0xF0) type token when writing COLMETADATA. The Rust core now maps UDT columns to varbinary(max) on the wire and streams the supplied bytes as the UDT's serialized form (its IBinarySerialize payload), matching how pyodbc and python-tds load UDT columns. SQL Server materializes the UDT on insert. Delivered via the mssql_py_core 0.1.6 → 0.1.7 bump.

Who benefits: Users who bulk-load rows into tables with custom CLR UDT columns.

Impact: Bulk copy into custom CLR UDT columns now succeeds when the supplied values are the UDT's serialized bytes.

PR #688 | GitHub Issue #667