feat(connections): Support mssql-python driver.
#5647
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Issue #5645 - support the official
mssql-pythondriver 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-pythonoverview, additional benefits include:mssql-pythonis all that's needed)Code Changes
connect_mssql_pythonand moved the priorpyodbclogic toconnect_pyodbc.driverconfiguration support for"mssql-python"to relevant*ConnectionConfigclasses:MSSQLConnectionConfigAzureSQLConnectionConfigFabricConnectionConfigruffandpylance).Test Plan
All CI runs are successful.
The
fast-test,slow-testanddoc-testtargets are also passing (locally).However, there is one issue with the
test_state_sync:test_version_schematest case being "out of sync" and prompting for a migration when run locally - I have yet to resolve this.