Skip to content

Conversation

@walanguzzi
Copy link

@walanguzzi walanguzzi commented Jan 8, 2026

Background

Issue #5645 - support the official mssql-python driver from Microsoft.

The new driver implements PEP 249 interfaces and should work as a pluggable drop-in: https://pypi.org/project/mssql-python/

Motivation

The driver bundles a lightweight and high-performance binary layer replacing the platform's Driver Manager hence eliminating the need for system-level ODBC installations.

As per the mssql-python overview, additional benefits include:

  • Consistency across platforms
  • Lower function call overhead
  • Zero external dependencies on Windows (the mssql-python is all that's needed)
  • Full control over connections, memory, and statement handling

Code Changes

  • Implemented connect_mssql_python and moved the prior pyodbc logic to connect_pyodbc.
  • Added driver configuration support for "mssql-python" to relevant *ConnectionConfig classes:
    • MSSQLConnectionConfig
    • AzureSQLConnectionConfig
    • FabricConnectionConfig
  • Updated documentation.
  • Automated refactors around import order (done by ruff and pylance).

Test Plan

All CI runs are successful.

The fast-test, slow-test and doc-test targets are also passing (locally).

However, there is one issue with the test_state_sync:test_version_schema test case being "out of sync" and prompting for a migration when run locally - I have yet to resolve this.

@CLAassistant
Copy link

CLAassistant commented Jan 8, 2026

CLA assistant check
All committers have signed the CLA.

@walanguzzi walanguzzi marked this pull request as ready for review January 8, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants