mssql-django 1.7.3 Release Notes (June 2026)
mssql-django 1.7.3 is a patch release that fixes a subclassing regression in the backend wrapper and corrects connection-string handling when an explicit Authentication= mode is used. It also adds automated PR code-coverage reporting.
Bug Fixes
FIX: Subclass KeyError in server property caches (#532, closes #531)
- What changed: Subclassing
DatabaseWrapperraisedKeyError: 'sql_server_version'on the first connection._fetch_server_properties()introspected the cache viatype(self).__dict__[...], but for a subclass instancetype(self)is the subclass, which doesn't carry the inheritedcached_propertyin its own__dict__. The cache now uses explicit class-level dicts (_known_versions,_known_azures) accessed viaself., which resolves correctly through the MRO. This is a regression from #518. - Who benefits: Anyone subclassing
DatabaseWrapperto extend or customize the backend. - Impact: Subclassed backends connect without crashing; no change for direct users of the base wrapper.
FIX: Skip Trusted_Connection/SSPI when Authentication= is explicit (#533, #529)
- What changed: When
extra_paramsset an explicitAuthentication=mode (e.g.ActiveDirectoryIntegrated), the backend could still injectTrusted_Connection=yes, which the ODBC driver rejects withFA001. The previous code only special-casedActiveDirectoryMsiandActiveDirectoryInteractive. Connection-string building now parses the auth mode with a boundary-aware, case-insensitive regex and skipsTrusted_Connection/SSPI for any explicitAuthentication=, skippingPWDonly for known passwordless modes. - Who benefits: Anyone using Azure AD / Microsoft Entra authentication (
ActiveDirectoryIntegrated,ActiveDirectoryDefault,ActiveDirectoryDeviceFlow, etc.). - Impact: Entra auth connection strings build correctly without driver rejection, while
SqlPassword,ActiveDirectoryPassword, andActiveDirectoryServicePrincipalcontinue to sendPWDas before.
Test Improvements
- Added 11 connection-string tests covering explicit
Authentication=modes, case-insensitive detection, multi-param strings, the FreeTDS path, and the helper method directly (#533) - Updated cache test helpers to use the new class-level dicts instead of introspecting
func.__defaults__(#532)
Infrastructure
- CI: PR code coverage comments (#538) — A GitHub Action now polls ADO pipeline 2195, parses the Cobertura
coverage.xml, runsdiff-coverfor patch coverage, and posts a sticky PR comment with diff coverage, overall coverage, a per-file breakdown, and build links. Handles both same-repo and forked PRs.
Version Compatibility
| Component | Supported Versions |
|---|---|
| Django | 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0 |
| Python | 3.8 – 3.14 |
| SQL Server | 2016, 2017, 2019, 2022, 2025; Azure SQL DB / Managed Instance / Microsoft Fabric |
| ODBC Driver | 17 or 18 for SQL Server (v18 is the default) |
Breaking Changes
None. This is a fully backward-compatible patch release.
Contributors
All changes in this release were made by the maintainers. No external contributors this release.