Skip to content

Tags: microsoft/mssql-python

Tags

v1.10.0

Toggle v1.10.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.10.0 (#648)

[AB#45983](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/45983)

Release mssql-python v1.10.0.

This PR bumps the driver version from 1.9.0 to 1.10.0 across
`mssql_python/__init__.py`, `setup.py`, and updates
`PyPI_Description.md` with this release's customer-facing changes.

### Summary

**Enhancements**

- **Active Directory Service Principal support for Bulk Copy**
([#576](#576)) -
`bulkcopy` now supports
`Authentication=ActiveDirectoryServicePrincipal`, registering a
token-provider callback that resolves the tenant from the STS URL
mid-handshake and returns a service-principal JWT.

**Bug Fixes**

- **Non-ASCII VARCHAR data in the Arrow fetch path**
([#575](#575)) - The Arrow
fetch path now requests `SQL_CHAR` data as `SQL_C_WCHAR` (UTF-16LE),
ensuring correct decoding regardless of encoding settings, locale, or
OS. Thanks @ffelixg for the contribution!
- **Bulk load connection timeouts**
([#641](#641)) - Fixed
connection timeouts during bulk load operations. Fix lands in the Rust
core via bumping `mssql_py_core` from 0.1.4 to 0.1.5. *(via
`mssql_py_core`)*

**Version bump**

- `mssql_python/__init__.py`: `__version__ = "1.10.0"`
- `setup.py`: `version="1.10.0"`
- `PyPI_Description.md`: updated `## What's new in v1.10.0` section

v1.9.0

Toggle v1.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.9.0 (#633)

[AB#45750](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/45750)

Release mssql-python v1.9.0. Bumps `__version__`, `setup.py` version,
and updates `PyPI_Description.md` with this release's customer-facing
changes.

### Summary

#### Enhancements
- **Row Objects in Bulk Copy** - `bulkcopy` now accepts `Row` objects
(and lists) directly, converting each row to a tuple automatically
(#615).
- **Cached Parameter Type Resolution for NULLs** - `SQLDescribeParam`
results are cached per statement when binding `NULL` parameters,
removing redundant server round-trips and fixing incorrect type
fallbacks for all-NULL columns and VARBINARY types (#614).

#### Bug Fixes
- **macOS / Linux Import Failure** - simdutf is now always statically
linked via FetchContent, fixing import/symbol failures on machines
without simdutf at the CI build path (#608). Resolves #607, #628.
- **executemany Large Decimal Handling** - Fixed a `SQL_C_NUMERIC` type
mismatch when inserting `Decimal` values outside the SQL Server `MONEY`
range via `executemany` (#611). Resolves #609.
- **Exception Pickling** - DB-API exception subclasses and
`ConnectionStringParseError` now implement `__reduce__` for correct
pickle/unpickle round-trips (#616). Resolves #587.
- **PRINT Messages in nextset()** - Diagnostic messages from subsequent
result sets are captured on `SQL_SUCCESS_WITH_INFO` during `nextset()`
(#618). Resolves #612.
- **Row Objects in executemany DAE Path** - `executemany` converts `Row`
objects to tuples in the DAE fallback path, fixing `varchar(max)` writes
(#630). Resolves #629.
- **Static Type-Checking of Fetch Methods** -
`fetchone`/`fetchmany`/`fetchall` are no longer reassigned as instance
attributes, fixing type-checking under `ty` (#631). Resolves #620.

#### Version bump
- `mssql_python/__init__.py`: `__version__` 1.8.0 → 1.9.0
- `setup.py`: version 1.8.0 → 1.9.0
- `PyPI_Description.md`: updated "What's new" section to v1.9.0

Bundled `mssql_py_core` version unchanged (0.1.4).

v1.8.0

Toggle v1.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE: 1.8.0 (#605)

[AB#43993](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/43993)

### Summary

Release mssql-python v1.8.0.

### Enhancements
- **ActiveDirectoryMSI Support for Bulk Copy** (#573)
- **Row String-Key Indexing** (#589)
- **Bundled ODBC Driver Upgrade** from 18.5.1.1 to 18.6.2.1 (#569)

### Bug Fixes
- **Deferred Connect-Attribute Use-After-Free** (#596) - Fixes #594,
#597
- **Connection String Parsed Multiple Times in Auth Path** (#590) -
Fixes #580
- **executemany Type Annotation Regression** (#586) - Fixes #572

### Version Bump
- `__version__` → 1.8.0 in `__init__.py` and `setup.py`
- `PyPI_Description.md` updated with v1.8.0 release notes

v1.7.1

Toggle v1.7.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.7.1 (#593)

### Work Item / Issue Reference

>
[AB#45159](https://sqlclientdrivers.visualstudio.com/mssql-python/_sprints/taskboard/mssql-python%20Team/mssql-python/Rubidium/May%202026?workitem=45159)

-------------------------------------------------------------------
### Summary

**Enhancements**
- #548 — manylinux_2_28 build targets for RHEL 8 / glibc 2.28
- #542 — macOS universal2 wheel for Python 3.10
- #526 — UTF-16 string handling via simdutf
- #528 — Optimized execute() hot path
- #567 — Azure Linux installation docs

**Bug Fixes**
- #562 — Login failures now raise mssql_python exception instead of
RuntimeError
- #568 — GIL released during blocking SQLSetConnectAttr calls
- #541 — GIL released during blocking ODBC statement/fetch/transaction
calls
- #560 — executemany RuntimeError when decimals change signs
- #495 — Inconsistent CP1252 VARCHAR retrieval Windows vs Linux
- #559 — BulkCopy empty string in NVARCHAR(MAX)/VARCHAR(MAX) (via
mssql_py_core 0.1.4)

v1.7.0

Toggle v1.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.7.1 (#593)

### Work Item / Issue Reference

>
[AB#45159](https://sqlclientdrivers.visualstudio.com/mssql-python/_sprints/taskboard/mssql-python%20Team/mssql-python/Rubidium/May%202026?workitem=45159)

-------------------------------------------------------------------
### Summary

**Enhancements**
- #548 — manylinux_2_28 build targets for RHEL 8 / glibc 2.28
- #542 — macOS universal2 wheel for Python 3.10
- #526 — UTF-16 string handling via simdutf
- #528 — Optimized execute() hot path
- #567 — Azure Linux installation docs

**Bug Fixes**
- #562 — Login failures now raise mssql_python exception instead of
RuntimeError
- #568 — GIL released during blocking SQLSetConnectAttr calls
- #541 — GIL released during blocking ODBC statement/fetch/transaction
calls
- #560 — executemany RuntimeError when decimals change signs
- #495 — Inconsistent CP1252 VARCHAR retrieval Windows vs Linux
- #559 — BulkCopy empty string in NVARCHAR(MAX)/VARCHAR(MAX) (via
mssql_py_core 0.1.4)

v1.6.0

Toggle v1.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.6.0 (#537)

### Work Item / Issue Reference

>
[AB#44595](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/44595)

> GitHub Issue: #<ISSUE_NUMBER>

-------------------------------------------------------------------
### Summary

This pull request updates the library to version 1.6.0 and delivers a
focused set of reliability and concurrency improvements.

### Bug Fixes and Reliability Improvements

• GIL Release During ODBC Connect/Disconnect: The driver now releases
the GIL during blocking ODBC connect and disconnect calls, improving
concurrency for multi-threaded Python applications.
• setinputsizes() SQL_DECIMAL Crash Fix: Fixed a crash in
cursor.setinputsizes() when specifying SQL_DECIMAL type hints.
• ODBC Catalog fetchone() Fix: Fixed an issue where fetchone() on ODBC
catalog method results returned incorrect data.
• cursor.execute() Invalid Cursor State Fix: Fixed cursor.execute()
raising an Invalid cursor state error when called with
reset_cursor=False.
• executemany Type Annotation Fix: Corrected the type annotation for
executemany seq_of_parameters parameter to accept Mapping types.
• setup_logging Path Traversal Guard: Added path canonicalization and
traversal guard to setup_logging's log_file_path parameter.

### Version Updates

• Updated the version number to \1.6.0\ in \__init__.py\ and \setup.py\
to reflect the new release.
For a full list of changes and more details, refer to the updated
release notes in \PyPI_Description.md\.

v1.5.0

Toggle v1.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.5.0 (#508)

### Work Item / Issue Reference  
<!-- 
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below 
For external contributors: Insert Github Issue number below
Only one reference is required - either GitHub issue OR ADO Work Item.
-->

<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#43946](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/43946)

<!-- External contributors: GitHub Issue -->
> GitHub Issue: #<ISSUE_NUMBER>

-------------------------------------------------------------------
### Summary   
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request updates the library to version 1.5.0 and introduces
several major new features, enhancements, and bug fixes. The release
focuses on improving data integration performance, expanding SQL Server
type support, and increasing library usability and reliability.

### New Features and Enhancements

* **Apache Arrow Fetch Support**: Added high-performance Arrow-based
data fetching via `cursor.arrow()`, `cursor.arrow_batch()`, and
`cursor.arrow_reader()`, enabling zero-copy integration with pandas,
Polars, and other Arrow-native data frameworks.
* **sql_variant Type Support**: Added support for the `sql_variant`
complex SQL Server data type.
* **Native UUID Support**: Added native support for fetching and binding
UUID/GUID values without manual string conversion.
* **Row Class Export**: The `Row` class is now publicly exported from
the top-level `mssql_python` module for easier use in type annotations
and downstream code.

### Bug Fixes and Reliability Improvements

* **Qmark False Positive Fix**: Fixed false positive qmark (`?`)
detection for `?` appearing inside bracketed identifiers, string
literals, and SQL comments.
* **NULL VARBINARY Parameter Fix**: Fixed NULL parameter type mapping
for VARBINARY columns.
* **Bulkcopy Auth Fix**: Fixed stale auth fields being retained in
`pycore_context` after token acquisition during bulk copy operations.
* **Explicit Module Exports**: Added explicit `__all__` exports from the
main library module to prevent import resolution issues.
* **Credential Cache Fix**: Fixed credential instance cache to correctly
reuse and invalidate cached credential objects.
* **datetime.time Microseconds Fix**: Fixed stored `datetime.time`
values incorrectly having `microseconds` set to zero.
* **Arrow Time Fractional Seconds Fix**: Fixed time handling in Arrow
integration to correctly include fractional seconds.

### Version Updates

* Updated the version number to `1.5.0` in `__init__.py` and `setup.py`
to reflect the new release.
[[1]](diffhunk://#diff-d95f3a67986de29f30453416b1b4c34e6a43207e9a33e2b1b80ef0c378b0a538L17-R17)
[[2]](diffhunk://#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L176-R176)

For a full list of changes and more details, refer to the updated
release notes in `PyPI_Description.md`.
<!-- 
### PR Title Guide

> For feature requests
FEAT: (short-description)

> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description) 

> For Fix requests
FIX: (short-description)

> For doc update requests 
DOC: (short-description)

> For Formatting, indentation, or styling update
STYLE: (short-description)

> For Refactor, without any feature changes
REFACTOR: (short-description)

> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description) 

### Contribution Guidelines

External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary

mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above  
- Follow the PR title format and provide a meaningful summary
-->

v1.4.0

Toggle v1.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE:1.4.0 (#456)

### Work Item / Issue Reference  
<!-- 
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below 
For external contributors: Insert Github Issue number below
Only one reference is required - either GitHub issue OR ADO Work Item.
-->

<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#42855](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/42855)

<!-- External contributors: GitHub Issue -->
> GitHub Issue: #<ISSUE_NUMBER>

-------------------------------------------------------------------
### Summary   
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->

This pull request updates the package to version 1.4.0, introducing
several new features and bug fixes aimed at improving performance,
compatibility, and developer experience. The most important changes are
summarized below:

Version bump and release notes:

* Updated the package version to `1.4.0` in `setup.py`, `__init__.py`,
and the documentation, reflecting the new release.
[[1]](diffhunk://#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L176-R176)
[[2]](diffhunk://#diff-d95f3a67986de29f30453416b1b4c34e6a43207e9a33e2b1b80ef0c378b0a538L18-R18)
[[3]](diffhunk://#diff-5236254592b2fea0773f17424b16acf82e3aa351ad8bae33871de5c98eb76eedL38-R53)

New features:

* Added bulk copy support with a high-performance data loading API for
large-scale ETL workloads, including configurable batch sizes and column
mappings.
* Introduced spatial type support for geography, geometry, and
hierarchyid types.
* Upgraded to `mssql-py-core` version 0.1.0 with enhanced connection
string parameter support.
* Added `py.typed` marker for improved type checking, and included Azure
SQL Database in the PR validation pipeline matrix.

Bug fixes and improvements:

* Fixed issues with VARCHAR encoding for non-ASCII CP1252 characters,
segmentation faults during fetch operations, date/time type code
mappings, and updated pipeline configurations.
<!-- 
### PR Title Guide

> For feature requests
FEAT: (short-description)

> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description) 

> For Fix requests
FIX: (short-description)

> For doc update requests 
DOC: (short-description)

> For Formatting, indentation, or styling update
STYLE: (short-description)

> For Refactor, without any feature changes
REFACTOR: (short-description)

> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description) 

### Contribution Guidelines

External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary

mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above  
- Follow the PR title format and provide a meaningful summary
-->

v1.3.0

Toggle v1.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE: 1.3.0 (#419)

### Work Item / Issue Reference  
<!-- 
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below 
For external contributors: Insert Github Issue number below
Only one reference is required - either GitHub issue OR ADO Work Item.
-->

<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#41886](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/41886)

<!-- External contributors: GitHub Issue -->
> GitHub Issue: #<ISSUE_NUMBER>

-------------------------------------------------------------------
### Summary   
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->

This pull request updates the package to version 1.3.0 and revises the
release notes to reflect the latest changes. The most significant update
is a bug fix addressing a segmentation fault in the underlying driver.

Version bump and documentation:

* Updated the package version to `1.3.0` in both
`mssql_python/__init__.py` and `setup.py`, ensuring consistency across
the codebase and distribution metadata.
[[1]](diffhunk://#diff-d95f3a67986de29f30453416b1b4c34e6a43207e9a33e2b1b80ef0c378b0a538L18-R18)
[[2]](diffhunk://#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L99-R99)
* Revised the release notes in `PyPI_Description.md` to document the new
version, removing previous entries and highlighting the segmentation
fault fix in `libmsodbcsql-18.5` during `SQLFreeHandle()`.
<!-- 
### PR Title Guide

> For feature requests
FEAT: (short-description)

> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description) 

> For Fix requests
FIX: (short-description)

> For doc update requests 
DOC: (short-description)

> For Formatting, indentation, or styling update
STYLE: (short-description)

> For Refactor, without any feature changes
REFACTOR: (short-description)

> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description) 

### Contribution Guidelines

External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary

mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above  
- Follow the PR title format and provide a meaningful summary
-->

v1.2.0

Toggle v1.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
RELEASE: 1.2.0 (#404)

### Work Item / Issue Reference  
<!-- 
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below (e.g.
AB#37452)
For external contributors: Insert Github Issue number below (e.g. #149)
Only one reference is required - either GitHub issue OR ADO Work Item.
-->

<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#41674](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/41674)

<!-- External contributors: GitHub Issue -->
> GitHub Issue: #<ISSUE_NUMBER>

-------------------------------------------------------------------
### Summary   
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request updates the package to version 1.2.0 and introduces
several new features and bug fixes. The most notable changes include new
properties for connection management, enhanced parameter handling, and
important bug fixes for data retrieval and file handling.

Version bump:

* Updated the package version from 1.1.0 to 1.2.0 in `setup.py`,
`mssql_python/__init__.py`, and the documentation.
[[1]](diffhunk://#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7L99-R99)
[[2]](diffhunk://#diff-d95f3a67986de29f30453416b1b4c34e6a43207e9a33e2b1b80ef0c378b0a538L18-R18)
[[3]](diffhunk://#diff-5236254592b2fea0773f17424b16acf82e3aa351ad8bae33871de5c98eb76eedL38-R52)

Feature enhancements:

* Added the `Connection.closed` property for improved connection state
management.
* Enabled support for passing parameters as dictionaries, allowing more
flexible query parameterization.
* Introduced Copilot prompts for AI-assisted development.

Bug fixes:

* Fixed `fetchmany(n)` to correctly respect batch size when working with
LOB columns.
* Resolved path resolution issues for files with non-ASCII characters on
Windows.

<!-- 
### PR Title Guide

> For feature requests
FEAT: (short-description)

> For non-feature requests like test case updates, config updates ,
dependency updates etc
CHORE: (short-description) 

> For Fix requests
FIX: (short-description)

> For doc update requests 
DOC: (short-description)

> For Formatting, indentation, or styling update
STYLE: (short-description)

> For Refactor, without any feature changes
REFACTOR: (short-description)

> For release related changes, without any feature changes
RELEASE: #<RELEASE_VERSION> (short-description) 

### Contribution Guidelines

External contributors:
- Create a GitHub issue first:
https://github.com/microsoft/mssql-python/issues/new
- Link the GitHub issue in the "GitHub Issue" section above
- Follow the PR title format and provide a meaningful summary

mssql-python maintainers:
- Create an ADO Work Item following internal processes
- Link the ADO Work Item in the "ADO Work Item" section above  
- Follow the PR title format and provide a meaningful summary
-->