Skip to content

RELEASE: 2.0.0 - #612

Merged
Gaurav Sharma (bewithgaurav) merged 3 commits into
devfrom
release/2.0.0
Sep 18, 2026
Merged

Gaurav Sharma (bewithgaurav) merged 3 commits into
devfrom
release/2.0.0

Conversation

@bewithgaurav

@bewithgaurav Gaurav Sharma (bewithgaurav) commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Select mssql-python per database alias without changing ENGINE; omit python_driver to continue using pyodbc.
  • Install mssql-python 1.15.0 or newer and its mssql-python-odbc companion package automatically.
  • Support CPython 3.10 through 3.14 and Django 5.2, 6.0, and 6.1.
  • Validate both database drivers in CI, including the selected DB-API and native ODBC provider.

Features

FEAT: Add per-connection mssql-python selection (#596, #597, #599)

  • What changed: OPTIONS["python_driver"] = "mssql_python" selects mssql-python for one database alias. Other aliases can continue using pyodbc. Connection strings, pooling, retries, transactions, savepoints, datetimeoffset, introspection, and Microsoft Entra authentication are handled through the selected driver.
  • Who benefits: Applications that want to adopt Microsoft's mssql-python driver incrementally without changing Django's backend ENGINE.
  • Impact: pyodbc remains the default. mssql-python is installed with the package and can be enabled one alias at a time.

FEAT: Modernize the support matrix (#598, #605)

  • What changed: Declared support now covers CPython 3.10 through 3.14, Django 5.2 through 6.1, and SQL Server 2017 through 2025.
  • Who benefits: Applications on currently supported Python and Django releases.
  • Impact: Retired Python and Django versions are no longer declared or tested. Existing version-gated compatibility code remains in place.

Improvements

Replace pytz with zoneinfo and tzdata (#535)

  • What changed: Timezone offset handling now uses the standard-library zoneinfo module with tzdata for environments without a system IANA timezone database.
  • Who benefits: Applications using named timezones, including zones with negative daylight-saving offsets.
  • Impact: Timezone offsets remain stable across the year and no longer depend on pytz.

Accept future SQL Server versions (#609)

  • What changed: A newer SQL Server major version uses the latest capability set known to the backend instead of failing version validation.
  • Who benefits: Applications evaluating a new SQL Server release before a corresponding mssql-django update.
  • Impact: New server versions can connect without being falsely rejected; this does not declare untested features supported.

Bug Fixes

FIX: Default empty mssql-python HOST to localhost (#613)

  • What changed: An empty HOST, including Django's normalized value when the setting is omitted, now uses localhost on the mssql-python path.
  • Who benefits: Applications switching a local/default-instance connection from pyodbc to mssql-python without adding a HOST.
  • Impact: The same Django settings no longer fail mssql-python connection string validation with an empty SERVER=.

FIX: Honor explicit MARS settings for Fabric Warehouse (#600, closes #415)

  • What changed: Explicit MARS_Connection values are preserved instead of being overridden. ORM iteration buffers results when MARS is disabled.
  • Who benefits: Applications that need MARS disabled, including Microsoft Fabric Warehouse connection scenarios.
  • 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 SQL Server wildcard syntax.

FIX: Escape quotes in inspectdb schema names (#583)

  • What changed: Single quotes in inspectdb --schema metadata queries are 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


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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 18, 2026 05:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are limited to consistent release metadata updates (version + changelog) with no functional code impact identified.

Pull request overview

Prepares the mssql-django package for the 2.0.0 release by updating the distribution version metadata and publishing the 2.0.0 changelog entry and links.

Changes:

  • Bump package version to 2.0.0 and refine PyPI classifiers (platform + CPython implementation).
  • Add the 2.0.0 dated section to CHANGELOG.md, update compare links, and add the missing PR reference link.
File summaries
File Description
setup.py Bumps the package version to 2.0.0 and updates classifiers to reflect supported platforms/CPython.
CHANGELOG.md Adds the 2.0.0 release entry, updates the Unreleased compare link base, and adds the 2.0.0 compare link + PR reference.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Wait for SQL Server

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

Copilot AI review requested due to automatic review settings September 18, 2026 06:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Changes are limited to standard release metadata updates (version + changelog) and are internally consistent.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

86.68%


📈 Total Lines Covered: 2675 out of 3086
📁 Project: mssql-django


Diff Coverage

Diff: dev...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
- mssql/creation.py: 60.3%  (73 lines)
- mssql/operations.py: 79.2%  (399 lines)
- mssql/management/commands/inspectdb.py: 81.8%  (11 lines)
- mssql/compiler.py: 83.5%  (643 lines)
- mssql/functions.py: 87.1%  (427 lines)
- mssql/client.py: 87.5%  (40 lines)
- mssql/schema.py: 88.4%  (718 lines)
- mssql/introspection.py: 90.9%  (132 lines)
- mssql/base.py: 93.5%  (555 lines)
- mssql/__init__.py: 100.0%  (1 lines)

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

Copilot AI review requested due to automatic review settings September 18, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are limited to release metadata (version bump + changelog/link updates) and appear internally consistent.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@bewithgaurav
Gaurav Sharma (bewithgaurav) merged commit 94979b2 into dev Sep 18, 2026
31 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants