Releases: microsoft/mssql-python
v0.13.1-preview
Release Notes - Version 0.13.1
Bug Fixes
-
Access Token Issue (EntraID Auth) (#285)
What changed: Fixed authentication token handling to resolve connection failures with Microsoft Entra ID
Who benefits: Applications using Microsoft Entra ID (formerly Azure Active Directory) authentication
Impact: Restored reliable authentication for EntraID-based connectionsFixes #286
-
Timezone Preservation in DATETIMEOFFSET (#281)
What changed: Removed forced UTC conversion when reading
datetimeoffsetvalues, preserving original timezone information in Pythondatetimeobjects
Who benefits: Applications working with timezone-aware data across multiple time zones
Impact: Accurate timezone representation without data loss from UTC conversionFixes #213
-
Connection Pooling Resource Cleanup (#268)
What changed: Added shutdown tracking to prevent multiple pool cleanup operations and resource leaks, ensuring cleanup executes only once
Who benefits: Applications using connection pooling, especially long-running services
Impact: Improved pool shutdown reliability and prevention of resource leaksFixes #267
-
UUID String Mapping Removal (#274)
What changed: Removed automatic string-to-UUID conversion logic in parameter binding, treating UUID strings as regular strings
Who benefits: Applications passing UUID strings that should be handled as text rather than binary GUIDs
Impact: More predictable string parameter handling without automatic type coercionFixes #241
Infrastructure
-
Enhanced Pooling Test Coverage (#268)
What changed: Added comprehensive test suite for connection pooling with 421 new test lines and testing utilities for reliable test isolation
Who benefits: Contributors and maintainers
Impact: Improved quality assurance for connection pooling functionality
This hotfix release addresses critical authentication, timezone handling, and resource management issues discovered in v0.13.0, ensuring production stability for enterprise deployments.
v0.13.0-preview
Release Notes - Version 0.13.0
Features
-
Enhanced executemany() Support for Complex Data Types (#245, #260)
What changed: Added full support for UNIQUEIDENTIFIER and DATETIMEOFFSET in batch operations with proper type inference and NULL handling
Who benefits: Applications performing bulk inserts with UUIDs and timezone-aware datetime values
Impact: Seamless batch operations with complex data types, improving performance for bulk data processing -
Streaming Support in executemany() (#251)
What changed: Implemented robust handling of large values (NVARCHAR/VARCHAR/VARBINARY(MAX)) with automatic Data-At-Execution (DAE) detection and fallback
Who benefits: Applications working with large text or binary data in batch operations
Impact: Efficient streaming inserts and fetches for massive datasets without memory constraints
Improvements
-
Enhanced Cursor Reliability (#263)
What changed: Improved consistency and correctness of
cursor.rowcountattribute across fetchone(), fetchmany(), and fetchall() operations, including empty result sets
Who benefits: Applications relying on accurate row count information for business logic
Impact: More reliable rowcount reporting for all cursor operations and fetch scenarios
Bug Fixes
-
Type Inference Bug Fix (#252)
What changed: Resolved type inference issues in executemany() by refactoring sample value selection logic
Who benefits: Applications using executemany() with diverse data types
Impact: More accurate automatic type detection in batch operations -
Memory Leak and Security Fix (#264)
What changed: Replaced static token buffer with stack-allocated buffer to prevent memory leaks and ensure sensitive data is securely erased after use
Who benefits: Security-conscious applications and long-running services
Impact: Improved memory management and enhanced security for sensitive connection data -
Resource Cleanup on Python Shutdown (#255)
What changed: Added proper cleanup mechanisms to prevent segmentation faults during Python interpreter shutdown
Who benefits: All applications, especially those with complex shutdown sequences
Impact: Enhanced stability and elimination of shutdown-related crashes
Infrastructure
-
Testing Enhancements (#245, #260, #251, #263)
What changed: Added comprehensive test coverage for UUID/GUID, DATETIMEOFFSET, streaming operations, and cursor.rowcount behavior
Who benefits: Contributors and maintainers
Impact: Improved code quality assurance and regression prevention
This release focuses on enhancing batch operation capabilities with complex data types and streaming support, while addressing critical stability and security issues to ensure robust production deployments.
v0.12.0-preview
Release Notes - Version 0.12.0
Features
-
Complex Data Type Support (#243, #236, #241, #213)
What changed: Added native support for DATETIMEOFFSET and UNIQUEIDENTIFIER data types with full round-trip handling
Who benefits: Applications working with timezone-aware dates and UUID-based identifiers
Impact: Seamless integration with Python'sdatetime(timezone-aware) anduuid.UUIDobjects -
Enhanced Financial Data Operations (#246)
What changed: Extended MONEY and SMALLMONEY support to
executemanyoperations with proper NULL handling and decimal conversion
Who benefits: Financial applications using batch operations for monetary data
Impact: Improved performance and reliability for bulk financial data processing -
Comprehensive Code Coverage Integration (#238)
What changed: Implemented unified Python and C++ code coverage reporting with automated build instrumentation and pipeline integration
Who benefits: Development teams and maintainers ensuring code quality
Impact: Enhanced testing visibility and quality assurance across the entire codebase
Improvements
-
Enhanced Database Metadata API (#249)
What changed: Refactored
getinfo()API with improved ODBC metadata retrieval, consistent type handling, and expanded constant exposure
Who benefits: Applications requiring detailed database and driver metadata
Impact: More reliable and comprehensive access to database information with better error handling
Bug Fixes
-
DateTime Parsing Optimization (#235)
What changed: Removed aggressive datetime parsing to prevent incorrect type conversions and improve data integrity
Who benefits: Applications handling diverse datetime formats and string data
Impact: More accurate data type handling and reduced unexpected parsing behaviorThanks to @arvis108 for this contribution!
Infrastructure
-
Development Workflow Enhancements (#259, #238)
What changed: Added CodeQL analysis integration and optimized PR automation with improved labeling and coverage reporting
Who benefits: Contributors and maintainers
Impact: Enhanced security analysis and streamlined development processes
This release focuses on expanding complex data type support, improving financial data operations, and strengthening development infrastructure while maintaining backward compatibility.
v0.11.0-preview
Release Notes - Version 0.11.0
Features
-
Database Metadata & Catalog APIs (#201, #192)
What changed: Added comprehensive
getInfo()method for database information retrieval and extensive metadata APIs includinggetTypeInfo(),procedures(),foreignKeys(),primaryKeys(),columns(),statistics(),rowIdColumns()and,rowVerColumns().
Who benefits: Developers building database introspection tools and applications requiring schema discovery
Impact: Complete database metadata access and improved schema management capabilities -
Advanced Parameter Management (#192)
What changed: Implemented
setinputsizes()method with SQL type constants export and enhanced parameter validation through theSQLTypesclass
Who benefits: Applications requiring precise parameter type control and validation
Impact: Better performance and type safety in parameterized queries -
Connection-Level Execute & BatchExecute (#189)
What changed: Added
execute()&batchexecute()method directly to Connection class for simplified & faster query execution
Who benefits: Developers seeking streamlined database operations without explicit cursor management
Impact: More convenient & fast API for simple query operations -
Output Data Conversion System (#190)
What changed: Introduced flexible output converter system with
add_output_converter(),get_output_converter(),remove_output_converter(), andclear_output_converters()methods
Who benefits: Applications requiring custom data type transformations during result fetching
Impact: Customizable data processing pipeline for specialized use cases -
Global Configuration APIs (#188, #187)
What changed: Added
getDecimalSeperator(),setDecimalSeperator()global functions and lowercase support for global variables
Who benefits: Applications requiring locale-specific decimal formatting and configuration management
Impact: Enhanced internationalization and global configuration control -
Connection Timeout Control & Searchescape (#191)
What changed: Added timeout & searchescape attribute for connection-level timeout & escape management
Who benefits: Applications requiring fine-grained connection timeout & escaping control
Impact: Better connection reliability and timeout handling
Improvements
-
Large Binary Data Streaming (#232, #231)
What changed: Enhanced VARBINARY(MAX) streaming support in all fetch operations with improved chunked retrieval and LOB handling
Who benefits: Applications processing large binary objects like images, documents, and media files
Impact: Efficient memory usage and reliable handling of large binary data -
Money Data Type Support (#230)
What changed: Added comprehensive support for SQL Server MONEY and SMALLMONEY types with proper boundary value handling and decimal conversion
Who benefits: Financial applications requiring precise monetary calculations
Impact: Native support for SQL Server financial data types with accurate precision -
VARCHAR(MAX) Fetch Streaming (#219)
What changed: Implemented streaming support for large text columns in
fetchone()operations
Who benefits: Applications handling large text content exceeding standard buffer limits
Impact: Improved memory efficiency for large text data retrieval
Bug Fixes
-
Parameter Type Inference (#215)
What changed: Improved parameter type inference for batch operations with accurate integer range-based type selection
Who benefits: Applications usingexecutemanywith varied data ranges
Impact: More accurate SQL type mapping and better performance in batch operations
This release significantly enhances database introspection capabilities, streaming performance for large data, and provides comprehensive metadata access while maintaining backward compatibility.
v0.10.0-preview
Release Notes - Version 0.10.0
Features
-
Linux SUSE Support (#210)
What changed: Added support for SUSE and openSUSE Linux distributions with automatic driver detection
Who benefits: Developers using SUSE-based systems and containers
Impact: Broader enterprise Linux deployment compatibility -
Context Manager Support (#160)
What changed: Added
withstatement support for Connection and Cursor classes with automatic transaction handling
Who benefits: Developers wanting cleaner resource management
Impact: Automatic commit/rollback behavior and improved code reliability -
Large Text Streaming (#176, #206)
What changed: Implemented Data At Execution (DAE) for streaming large text.
Who benefits: Applications handling large data exceeding parameter limits
Impact: Eliminates memory constraints for bulk data operations -
Connection Encoding API (#172)
What changed: Added
setencoding()andgetencoding()methods with configurable text encoding
Who benefits: Applications requiring specific character encoding control
Impact: Enhanced internationalization and encoding flexibility -
Cursor Navigation APIs (#178 , #180, #181, #162)
What changed: Introduced navigation methods including
next(),__iter__(),scroll(),skip(), andfetchval()
Who benefits: Developers needing fine-grained cursor traversal
Impact: More intuitive row access and flexible result set navigation -
Cursor Attributes (#184, #163)
What changed: Added attributes
rownumberandmessagesto cursor objects
Who benefits: Applications requiring better debugging and row tracking
Impact: Simplifies state inspection and enhances transparency during query execution -
Additional Cursor and Table Methods (#179 , #190, #185)
What changed: Added
cursor.commit(),cursor.rollback()andtable()helper method for simplified workflows
Who benefits: Developers seeking more convenience methods for cursor and schema interaction
Impact: Streamlined database operations and table discovery
Improvements
-
Enhanced Unicode Support (#166)
What changed: Improved emoji and special character handling using UTF-16 code unit length calculation
Who benefits: Applications processing international content and social media data
Impact: Reliable Unicode content handling without corruption -
Parameter Type Detection (#208)
What changed: Added
SQLDescribeParamAPI integration for automatic type inference of None parameters
Who benefits: Developers working with dynamic queries and NULL values
Impact: More accurate parameter binding with automatic type detection -
DB-API 2.0 Compliance (#164)
What changed: Added standard exception classes as Connection attributes (e.g.,
connection.Error)
Who benefits: Developers migrating from other Python database drivers
Impact: Improved standards compliance and intuitive exception handling -
Execute Return Value (#161)
What changed: Fixed
execute()to return cursor object correctly
Who benefits: All applications using execute method
Impact: Proper method chaining and consistent API behavior
Bug Fixes
-
Binary Data Handling Improvements (#218) → Fixes Issue #226
What changed: Enhanced binary data (bytes/bytearray) handling by standardizing on VARBINARY type mapping, improved empty binary value processing, and fixed mixed type handling in columns
Who benefits: Applications working with binary data, BLOBs, or mixed binary content types
Impact: More reliable binary data storage and retrieval, proper handling of empty binaries vs NULL values, and better support for variable-length binary data -
Executemany String Corruption (#217) → Fixes Issue #227
What changed: Fixed string data corruption in batch operations on Unix systems with proper UTF conversion
Who benefits: Applications usingexecutemanyon Linux/macOS
Impact: Eliminates data corruption in batch string operations -
Empty Data Handling (#212) → Fixes Issue #205
What changed: Proper handling of empty strings/binary values to distinguish from NULL
Who benefits: Applications dealing with empty data columns
Impact: Prevents crashes and ensures correct empty value representation -
Cursor Lifecycle (#183) → Fixes Issue #182
What changed: Improved cursor cleanup during garbage collection
Who benefits: All cursor usage patterns
Impact: Enhanced stability during cursor destruction
This release significantly improves platform compatibility, Unicode handling, and overall robustness while maintaining backward compatibility.
v0.9.0-preview
Release Notes
Features
-
Alpine Linux Support (#169)
What changed:
Added support for Alpine Linux distribution, expanding the Linux compatibility beyond the existing manylinux2014 support
Who benefits:
Developers using Alpine based docker containers and Alpine Linux systems
Impact:
Broader platform compatibility for containerized deployments and Alpine based development environments
Improvements
-
Enhanced Connection Pooling Tests (#159)
What changed:
Added performance testing to measure pooled vs. non-pooled connection speed (ensuring 20% performance improvement)
Introduced connection reuse validation using SQL Server Process ID (SPID) tracking
Improved test isolation with explicit pooling enable/disable
Who benefits:
Developers relying on connection pooling performance and QA teams validating pooling behavior
Impact:
More reliable connection pooling validation and performance assurance -
Type System Compatibility (#157)
What changed:
Refactored type objects (STRING, BINARY, NUMBER, DATETIME, ROWID) to inherit from Python built-in types
Updated constructors to use new methods for direct instantiation
Enhanced Binary function to handle both str and bytes inputs
Modified timestamp handling for better compatibility
Who benefits:
Developers migrating from pyodbc to mssql-python or working with type-sensitive applications
Impact:
Improved pyodbc compatibility and more intuitive type behavior
Bug Fixes
-
Autocommit Behavior Fix (#158)
What changed:
Set autocommit to False by default and added rollback on connection close
Who benefits:
Developers expecting standard database transaction behavior
Impact:
Improved transaction handling and database consistency
v0.8.1-preview
Release Notes
Bug Fix:
-
Improves Windows support for interactive Azure AD authentication. #142
What changed:
- The PR makes a small change to the process_auth_parameters function in mssql_python/auth.py.
- It adjusts how the auth_type is handled for interactive authentication on Windows.
- Ensures compatibility with native handling of AADInteractive authentication.
Who benefits:
- Users who run interactive authentication workflows on Windows, especially those leveraging Azure Active Directory authentication (AADInteractive).
- Developers maintaining cross-platform authentication logic in the mssql-python library.
Impact:
- Improved reliability and compatibility for interactive authentication on Windows.
- Smoother user experience when using AADInteractive.
- Low risk: only 2 files changed with 7 additions and 7 deletions.
v0.8.0-preview
Release Notes
Features
- Authentication Module Added: (#135)
What changed:
A new authentication module was introduced, supporting Azure Active Directory authentication types: ActiveDirectoryInteractive for Mac and Linux, ActiveDirectoryDeviceCode, and ActiveDirectoryDefault.
Who benefits:
Developers integrating MSSQL with Azure services. Users requiring secure and flexible authentication options.
Impact:
Enables secure and varied authentication workflows for cloud-based environments.Simplifies integration with Azure AD, reducing custom code and setup.
Improvements
-
Batch Execution Refactor: (#138)
What changed:
Refactored Python executemany and C++ bindings to use column-wise parameter binding for batched SQL execution. Added helper functions for buffer allocation and exposed a new SQLExecuteMany method.
Who benefits:
Data engineers and developers running bulk operations.
Impact:
Faster, more efficient execution of bulk SQL operations. -
Logging System Overhaul: (#137)
What changed:
Replaced the global logging flag with a singleton LoggingManager, added dynamic logger configuration, sanitized sensitive information in logs, and improved Python exception handling in C++ logging.
Who benefits:
Teams monitoring and debugging connections and application behavior.
Impact:
Improved security and traceability in logs, reducing risk of exposing sensitive information and making error diagnosis easier. -
Row Object String Representation: (#136)
What changed:
Improved the Row class by adding a str method and updating repr for more user-friendly output and better debugging.
Who benefits:
Developers and testers interacting with row data.
Impact:
Easier debugging and more readable outputs, streamlining development and troubleshooting.
v0.7.0-preview
Release Notes
Features
-
Linux Support (manylinux2014 for Ubuntu, Debian, RHEL):
What changed:
The driver now supports Linux systems by adding manylinux2014-compatible wheel builds, Linux-specific driver logic, and architecture-aware ODBC path resolution.
Who benefits:
Python developers on Linux, including CI/CD and containerized environments.
Impact:
Enables cross-platform development and deployment with SQL Server. Devs can now use the driver on popular Linux distros without workarounds. Broader adoption expected in data science and server-side workloads.Support for other Linux based distros will come in subsequent releases.
-
Connection Pooling Support for MacOS and Linux:
What changed:
Unified connection pooling code across platforms and implemented it for macOS and Linux, with added test coverage.
Who benefits:
Developers on macOS and Linux working with high-performance, scalable or long-running applications.
Impact:
Brings parity with Windows support. Reduces connection overhead and improves performance for apps with frequent DB connections. -
Expanded Pipeline/Test Matrix:
What changed:
Extended CI pipelines to include Python versions < 3.13. Integrated test support for LocalDB and Docker-based SQL Server instances.
Who benefits:
Core contributors and testers ensuring reliability across Python versions and DB environments.
Impact:
Improves compatibility assurance, release confidence, and reduces risk of regressions across environments.
Improvements
-
Cross-Platform Code Unification:
What changed:
Removed OS-specific driver-loading logic and consolidated platform handling into shared code.
Who benefits:
Maintainers and contributors.
Impact:
Simplifies the codebase, improves maintainability, and reduces OS-specific bugs. -
Improved Logging and Diagnostics:
What changed:
Improved logging around driver loading, parameter binding, and platform-dependent behavior.
Who benefits:
Developers and support engineers debugging complex issues.
Impact:
Speeds up issue resolution, especially on unfamiliar platforms like Linux/macOS. -
PR Template and Automation:
What changed:
Introduced a new pull request template and added GitHub Actions to enforce formatting rules.
Who benefits:
Contributors and reviewers.
Impact:
Ensures consistent and high-quality contributions, reducing review time and human error.
Bug Fixes
- Dynamic Linking Fix for macOS (#98):
What changed:
Standardized dynamic linking using -undefined dynamic_lookup for Python extensions. Removed hardcoded lib paths.
Who benefits:
macOS developers, especially those using virtual environments.
Impact:
Improves compatibility and stability of the driver on macOS, especially during installs and builds.
v0.6.0-preview
Release Notes
Features
- MacOS universal2 Support: MacOS (version >=15.0 Sequoia) is now also supported for Intel based machines. Python wheels are now built and validated for macOS (M-Series and Intel), enhancing cross-platform support and allowing seamless development and testing on Apple machines.
Improvements
- Named Tuple Row Results: The fetch methods now returns named tuples for easier attribute-based access to query results. #65
- Test Refactor: Transitioned integration tests to use temporary tables, improving test isolation and preventing side effects.
- Type Safety & Error Handling: Enhanced C++ bindings with explicit type casting, improved string conversions, and robust error handling.
Bug Fixes
- Validation: Added range checks for numeric and date types to prevent out-of-range errors and ensure SQL Server compliance.
- Python Version Compatibility: Support for Python 3.13.5 is now available.