ReleaseMicrosoftMicrosoftpublished Jun 22, 2026seen 4d

microsoft/mssql-django 1.7.3

microsoft/mssql-django

Open original ↗

Captured source

source ↗
published Jun 22, 2026seen 4dcaptured 4dhttp 200method plain

1.7.3

Repository: microsoft/mssql-django

Tag: 1.7.3

Published: 2026-06-22T06:23:33Z

Prerelease: no

Release notes:

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 DatabaseWrapper raised KeyError: 'sql_server_version' on the first connection. _fetch_server_properties() introspected the cache via type(self).__dict__[...], but for a subclass instance type(self) is the subclass, which doesn't carry the inherited cached_property in its own __dict__. The cache now uses explicit class-level dicts (_known_versions, _known_azures) accessed via self., which resolves correctly through the MRO. This is a regression from #518.
  • Who benefits: Anyone subclassing DatabaseWrapper to 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_params set an explicit Authentication= mode (e.g. ActiveDirectoryIntegrated), the backend could still inject Trusted_Connection=yes, which the ODBC driver rejects with FA001. The previous code only special-cased ActiveDirectoryMsi and ActiveDirectoryInteractive. Connection-string building now parses the auth mode with a boundary-aware, case-insensitive regex and skips Trusted_Connection/SSPI for any explicit Authentication=, skipping PWD only 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, and ActiveDirectoryServicePrincipal continue to send PWD as 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, runs diff-cover for 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.

---

Full Changelog

PRs included: #532, #533, #538

Notability

notability 2.0/10

Routine release of a database connector.