Skip to content

Tags: microsoft/mssql-python

Tags

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
-->

v1.1.0

Toggle v1.1.0's commit message

Verified

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

### 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#41191](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/41191)

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

-------------------------------------------------------------------
### Summary   
This pull request updates the `mssql-python` package to version 1.1.0,
introducing several critical bug fixes, enhancements, and improvements
to platform-specific packaging and metadata. The update also removes
unused global connection cleanup logic from the package initialization.
Below are the most important changes:

## Major Enhancements and Bug Fixes

- **Critical Stability and Security Fixes:**  
- Introduced thread-safe encoding/decoding with mutex-based protection
and strict validation for SQL_WCHAR types.
- Fixed a critical double-free issue on Linux, improved UTF-16 string
decoding, ensured connection pooling isolation resets, corrected
connection string escaping, improved NULL parameter array handling,
ensured consistent query timeout, fixed IntegrityError detection, and
improved sensitive parameter filtering.
- **Documentation Update:**  
- Updated the `PyPI_Description.md` to reflect new features,
enhancements, and bug fixes for version 1.1.0.

## Package Initialization and Versioning

- **Version Bump:**  
- Updated the package version from `1.0.0` to `1.1.0` in both
`mssql_python/__init__.py` and `setup.py`.
- **Removed Connection Cleanup Logic:**  
- Eliminated global weakref-based connection tracking and atexit cleanup
logic from `mssql_python/__init__.py`, as it is no longer needed.

## Packaging and Distribution Improvements

- **Platform-Specific Packaging:**  
- Refactored `setup.py` to use consistent double quotes, improved
architecture and platform tag detection, and expanded logic for adding
platform-specific package data for Windows, macOS, and Linux.
- **Metadata Consistency:**  
- Updated all metadata fields (e.g., author, description, classifiers)
and ensured consistent formatting and requirements in `setup.py`.

These changes collectively improve package stability, security, and
cross-platform compatibility, while also ensuring accurate documentation
and streamlined packaging.

v1.0.0

Toggle v1.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge branch 'main' into release/1.0.0

v0.14.0-preview

Toggle v0.14.0-preview's commit message

v0.13.1-preview

Toggle v0.13.1-preview's commit message
RELEASE: 0.13.1

v0.13.0-preview

Toggle v0.13.0-preview's commit message
RELEASE: 0.13.0

v0.12.0-preview

Toggle v0.12.0-preview's commit message
RELEASE: 0.12.0