mssql-django 2.0 Release Notes (September 2026)
mssql-django 2.0 adds per-connection mssql-python support, modernizes the supported runtime matrix, and includes compatibility and reliability fixes across SQL Server and Microsoft Fabric. mssql-python is installed as a required dependency, while pyodbc remains the default database driver.
Highlights
- mssql-python support is here: mssql-django 2.0 adds Microsoft's new Python driver alongside pyodbc, which remains the default.
- Per-connection driver opt-in: Run one database on mssql-python while the rest keep using pyodbc, in the same app. Set
"python_driver": "mssql_python"in that database'sOPTIONS, and leave it out anywhere you want to stay on pyodbc. - Simpler deployment on supported platforms: The mssql-python path installs its ODBC Driver 18 companion package automatically.
- A modern support baseline: Django 5.2, 6.0, and 6.1 are supported across CPython 3.10 through 3.14. (#587)
- Production reliability improvements: This release fixes Fabric Warehouse MARS configuration, timezone-offset stability, pattern lookups, schema introspection, and local mssql-python connections.
Features
Microsoft's new mssql-python driver is now supported (#596, #597, #599)
- What changed: mssql-django can now run on Microsoft's new mssql-python driver, chosen per database through
OPTIONS["python_driver"]. Leave it unset and the database keeps using pyodbc. The driver covers the everyday work: connecting, connection pooling, automatic retries, transactions and savepoints,datetimeoffsetvalues, reading database structure, and Microsoft Entra sign-in. - Who benefits: Teams that want to try mssql-python on one database first, instead of switching a whole project over at once.
- Impact: Nothing changes unless you opt in. pyodbc stays the default, mssql-python ships with the package, and you switch it on one database at a time.
Runs on current Python, Django, and SQL Server versions (#598, #605)
- What changed: 2.0 supports today's releases: Python 3.10 through 3.14, Django 5.2 through 6.1, and SQL Server 2017 through 2025.
- Who benefits: Anyone on a currently supported Python and Django version.
- Impact: End-of-life versions are no longer listed or tested. The older-version compatibility code is still there, so nothing breaks unexpectedly.
Improvements
Replace pytz with zoneinfo and tzdata (#535)
- What changed: Timezone handling now uses the standard-library
zoneinfomodule, withtzdatafor environments that lack a system IANA timezone database. - Who benefits: Applications using named timezones, including zones with negative daylight-saving offsets.
- Impact: Timezone offsets stay correct across the year and no longer depend on pytz.
Accept future SQL Server versions (#609)
- What changed: A newer SQL Server major version now uses the latest capability set the backend knows about, instead of failing version validation.
- Who benefits: Applications evaluating a new SQL Server release before a matching mssql-django update ships.
- Impact: New server versions can connect without being wrongly rejected. This does not declare untested features as supported.
Bug Fixes
FIX: Default empty mssql-python HOST to localhost (#613)
- What changed: An empty
HOST, including the value Django fills in when the setting is omitted, now useslocalhoston the mssql-python path. - Who benefits: Applications switching a local or default-instance connection from pyodbc to mssql-python without adding a
HOST. - Impact: The same Django settings no longer fail mssql-python validation with an empty
SERVER=.
FIX: Honor explicit MARS settings for Fabric Warehouse (#600, closes #415)
- What changed: Explicit
MARS_Connectionvalues are now preserved instead of being overridden. ORM iteration buffers results when MARS is disabled. - Who benefits: Applications that need MARS disabled, including Microsoft Fabric Warehouse connections.
- Impact: Connections no longer fail because of a conflicting MARS setting, and nested queries can reuse the connection safely. This does not add full Microsoft Fabric Warehouse backend support.
FIX: Escape bracket wildcards in expression lookups (#575, closes #573)
- What changed: Pattern lookups using
F()expressions now escape SQL Server[wildcards correctly. - Who benefits: Applications comparing fields with
contains,startswith, and related pattern lookups. - Impact: Bracket characters are treated as data instead of as SQL Server wildcard syntax.
FIX: Escape quotes in inspectdb schema names (#583)
- What changed: Single quotes in
inspectdb --schemametadata queries are now escaped correctly. - Who benefits: Applications introspecting schemas whose names contain a single quote.
- Impact: Schema inspection no longer produces malformed SQL for those names.
Version Compatibility
| Component | Supported Versions |
|---|---|
| Django | 5.2, 6.0, 6.1 |
| Python | CPython 3.10-3.14; Django 6.0 and 6.1 require Python 3.12+ |
| Platforms | Windows x64; Windows ARM64 with Python 3.11+; macOS 15+ on Intel or Apple silicon; Linux x64/ARM64 with glibc 2.28+ or musl 1.2+ |
| SQL Server | 2017, 2019, 2022, 2025 |
| Azure SQL | Database, Managed Instance, SQL Database in Microsoft Fabric |
| Database drivers | pyodbc (default), mssql-python |
Breaking Changes
- Python 3.8 and 3.9, and Django 3.2 through 5.1, are no longer supported.
- mssql-python 1.15.0 or newer is now a required dependency even when pyodbc is selected. Installation is limited to platforms with compatible mssql-python distributions. Other environments must remain on mssql-django 1.8.0.
- Declared SQL Server support now starts with SQL Server 2017. Declared native connectivity support is limited to Microsoft ODBC Driver 17 or 18.
Contributors
- KHAN (@Khan3K) fixed bracket wildcard escaping for expression-based pattern lookups (#575).
- frederiksoftware reported the Microsoft Fabric Warehouse MARS failure (#415).
Full Changelog
Product PRs included: #535, #575, #583, #596, #597, #598, #599, #600, #605, #609, and #613.
Full comparison: 1.8.0...2.0.0