microsoft/mssql-python v1.2.0
microsoft/mssql-python
Captured source
source ↗v1.2.0
Repository: microsoft/mssql-python
Tag: v1.2.0
Published: 2026-01-16T13:58:25Z
Prerelease: no
Release notes:
Release Notes - Version 1.2.0
Enhancements
- Connection.closed Property (#398)
_What changed_: Added a new closed property to the Connection class that returns True if close() was called, and False otherwise. This property provides a clear and explicit way to check if a connection has been closed. Comprehensive tests ensure correct behavior including idempotency when calling close() multiple times and proper state tracking with context managers. _Who benefits_: Applications needing to check connection state, developers implementing connection lifecycle management, applications using context managers for database connections _Impact_: Enables explicit connection state checking, improves API clarity for connection management, ensures consistent behavior with context manager usage > Fixes #394
- Parameter as Dictionary - Pyformat Support (#385)
_What changed_: Introduced support for both qmark (?) and pyformat (%(name)s) parameter styles in SQL queries. Changed the default paramstyle from "qmark" to "pyformat". Added new parameter_helper.py module with helper functions to parse, detect, and convert parameter styles. Updated execute and executemany methods to auto-detect and convert parameter styles as needed. _Who benefits_: Developers preferring named parameters, applications migrating from other database libraries, users wanting more readable SQL queries with named placeholders _Impact_: Improves query readability with named parameters, provides seamless compatibility with both parameter styles, reduces migration effort from other Python database drivers > Fixes #20
- Copilot Prompts for AI-Assisted Development (#393)
_What changed_: Added VS Code Copilot on-demand prompts in prompts to streamline developer workflows. Includes 4 prompts: setup-dev-env.prompt.md for environment setup, build-ddbc.prompt.md for rebuilding C++ extensions, run-tests.prompt.md for running pytest, and create-pr.prompt.md for creating well-structured PRs. Features agent mode, cross-referenced prompts, team-specific branch naming, and platform-specific guidance. _Who benefits_: New contributors setting up the development environment, maintainers building and testing changes, developers creating pull requests _Impact_: Reduces onboarding friction for new contributors, provides consistent guidance for common development tasks, improves PR quality with standardized templates
Bug Fixes
- FetchMany Ignores Batch Size with LOB Columns (#346)
_What changed_: Fixed fetchmany(n) to respect the specified batch size when the result set contains LOB (Large Object) columns. Previously, the batch size parameter was ignored when LOB columns were present. _Who benefits_: Applications fetching large result sets with LOB columns in batches, memory-constrained applications processing large text or binary data _Impact_: Enables proper batch processing of LOB data, improves memory efficiency when handling large objects, ensures consistent behavior of fetchmany() across all column types > Fixes #345
- Non-ASCII Path Resolution on Windows (#376)
_What changed_: Fixed path resolution for files with non-ASCII characters (e.g., Unicode, international characters) in Windows environments. Ensures proper handling of paths containing special characters in directory names or filenames. _Who benefits_: Users with non-English usernames or directory paths, applications deployed in internationalized environments, developers working with files containing Unicode characters in paths _Impact_: Enables driver usage in paths with international characters, resolves import and loading failures on localized Windows systems, improves cross-locale compatibility
CI/Infrastructure
- SQL Server 2025 Test Support (#389)
_What changed_: Added support for testing against SQL Server 2025 across Windows, macOS, and Linux CI pipelines. Introduced new matrix configurations for SQL Server 2025 with Python 3.14 on Windows, added installation and setup scripts for SQL Server 2025 Express, and updated Docker commands to use matrix-provided SQL Server images on macOS and Linux. Enhanced test result publishing to include SQL Server version in run titles for better traceability. _Who benefits_: Maintainers validating compatibility with upcoming SQL Server releases, contributors ensuring cross-version compatibility, users planning to upgrade to SQL Server 2025 _Impact_: Ensures driver is validated against SQL Server 2025 before GA, improves release confidence for new SQL Server versions, provides early detection of compatibility issues
- Forked PR Coverage Comment Workflow (#375)
_What changed_ Implemented workflow_run solution for posting code coverage comments on pull requests from forked repositories. This enables coverage reporting for external contributors whose PRs originate from forks. _Who benefits_: External contributors submitting PRs from forked repositories, maintainers reviewing community contributions, open source collaboration workflows _Impact_: Provides visibility into code coverage for forked PRs, improves review process for external contributions, enhances community contribution experience