Repository navigation
Tags
Tags
RELEASE:1.19.0 (#922) ### 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#50319](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/50319) <!-- External contributors: GitHub Issue --> ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> Prepare mssql-python 1.19.0. Bump the package version in `mssql_python/__init__.py` and `setup.py`, and replace the previous release highlights in `PyPI_Description.md`. #### Enhancements - Optional connection retry policy for transient failures during connection initialization (#751). - Table-valued parameter definitions and synchronous execution through the default ODBC provider (#789). - Optional SQLSTATE and native error number attributes on DB-API exceptions (#909, #913). - Best-effort synchronous cursor cancellation with operation-scoped requests and checked recovery (#911, #915). - POSIX native binary hardening (#810). #### Bug Fixes - Lossless `executemany` inference for Unicode, Decimal, mixed-type batches, and embedded/trailing NULs (#907). - Numeric binding for auto-detected money-range Decimal batches (#752). - Restore Korean VARCHAR conversion fidelity in manylinux packages (#910). #### Release status and gates - ADO-GitHub synchronization completed into ADO `main` via [ADO PR !9120](https://sqlclientdrivers.visualstudio.com/mssql-python/_git/mssql-python/pullrequest/9120). - Ready for reviewer approval. The equivalent ADO release PR follows approval of this GitHub PR. - Do not merge this release PR until the required PyPI and Conda publication and verification gates are complete. - Release builds, publication, and release qualification remain outstanding; marking this PR ready for review does not authorize publication or merging. #### Validation - `.\.venv\Scripts\python.exe -m pre_commit run black-check --all-files --hook-stage pre-push` - passed. - `git diff --check` - passed. - Source-only checks verified matching `1.19.0` version declarations, one current "What's new" section, and the agreed description scope. - Native build and runtime pytest were not run for this version/description-only change; release qualification remains required. <!-- ### 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 performance improvements PERF: (short-description) > For AI tooling, agents, skills, prompts, or AI-assisted development workflows AI: (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 --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CHORE: Bump PyJWT to 2.15.0 in release dependency locks (#831) ### 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#47861](https://dev.azure.com/SqlClientDrivers/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/47861) <!-- External contributors: GitHub Issue --> > GitHub Issue: N/A ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> Upgrade PyJWT from 2.13.0 to 2.15.0 in the release build/test dependency locks rather than removing the package. Resolve conflicts against current main and regenerate complete, hash-locked universal dependency closures, retaining required build tools, test dependencies, and supported Python/platform markers. <!-- ### 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 performance improvements PERF: (short-description) > For AI tooling, agents, skills, prompts, or AI-assisted development workflows AI: (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 --> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jahnvi Thakkar <jathakkar@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Subrata <141804867+subrata-ms@users.noreply.github.com>
FIX: Make SQL Server CI setup retry-safe (#780) ### Work Item / Issue Reference <!-- mssql-python maintainers: ADO Work Item --> > [AB#47797](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/47797) ------------------------------------------------------------------- ### Summary Replace duplicated Unix SQL-container setup with one shared, ownership-aware helper and one bounded SQL-only retry, including macOS SQL2025, Linux matrices, and coverage. Capture redacted failure evidence before removing the failed container, recreate only job-owned containers, bound readiness/commands/cleanup, and propagate cancellation and permanent failure. Keep dependency installation, native builds, and pytest outside the retry boundary. Preserve macOS build/setup overlap, optional AzureSQL behavior, existing ARM build retry settings, amd64 SQL containers, and current database/image selections. Isolate final SQL cleanup from test-container cleanup and retain safe image/state/log evidence without publishing dumps or credentials. The PR changes only the pipeline YAML and shared SQL setup helper. No test files are added or modified. Verification uses temporary development checks kept outside this PR, normal PR validation, and separate hosted Linux/macOS SQL2025 recovery and permanent-failure experiments. The local Windows x64/Python 3.13 native build and Black gate passed. Hosted results and review feedback are being assessed; the PR remains a draft. This is recovery mitigation for observed SQL setup failures, not a fix for the underlying SQL-engine crash or a guarantee that hosted failures cannot recur. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
FIX: Fixing Build-Release-Package-Pipeline failure (#732) ### 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#47683](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/47683) <!-- External contributors: GitHub Issue --> ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> **Symptom** Build-Release-Package-Pipeline failed on all four Linux variants during Step 8 (pytest) with a collection-time error, before any test ran: tests/test_fork_coverage_security.py:10: in <module> SPEC.loader.exec_module(coverage_comment) E FileNotFoundError: [Errno 2] No such file or directory: '/test_isolated_cp310/.github/scripts/prepare_fork_coverage_comment.py' !!! Interrupted: 1 error during collection !!! Combined with --maxfail=1, this aborted cp310–cp314 on: - Linux manylinux_2_28 x86_64 - Linux manylinux_2_28 aarch64 - Linux musllinux x86_64 - Linux musllinux aarch64 **Root cause** Two independent design assumptions collided: - Test-side assumption. [test_fork_coverage_security.py:7] resolves helpers at module top level (collection time) via [Path(__file__).parents[1] / ".github" / "scripts" / "prepare_fork_coverage_comment.py"], and also reads [forked-pr-coverage.yml] and [pr-code-coverage.yml]. It assumes [parents[1]] is a full repo checkout. Pipeline-side assumption. The Linux release lane in [build-linux-single-stage.yml] intentionally runs pytest from an empty isolated directory to prove the installed wheel is self-contained: TEST_DIR="/test_isolated_${PYBIN}" rm -rf $TEST_DIR; mkdir -p $TEST_DIR $PY -m pip install -q "$WHEEL" cp -r /workspace/tests $TEST_DIR/ cp /workspace/pytest.ini $TEST_DIR/ cp /workspace/requirements.txt $TEST_DIR/ Only [tests], [pytest.ini], [requirements.txt] are copied. [.github] is not — until now no test needed anything outside [tests]. [test_fork_coverage_security.py] (added by the fork-coverage hardening series culminating in PR #714) is the first test that reaches outside [tests] at import time. In the isolated layout [parents[1]]= /test_isolated_cp310/, so the .github/… lookup fell off the map. Only the Linux lane runs the empty-isolated-dir model; Windows and macOS run from $(Build.SourcesDirectory) (a real checkout), so they were unaffected — and repo-root GitHub CI was unaffected too. **Fix:** Make the pipeline meet the test's assumption, and drop an earlier stop-gap. Change added to Linux release pipeline Copy [.github] into $TEST_DIR alongside [tests], in both the manylinux branch (covers x86_64 + aarch64) and the musllinux branch (covers x86_64 + aarch64): [build-linux-single-stage.yml:322] — manylinux bash -lc block: [build-linux-single-stage.yml:392] — musllinux sh -lc block: same two lines. cp -r /workspace/tests $TEST_DIR/ || echo "WARNING: No tests directory"; Some tests read repo-side helper scripts/workflows (e.g. .github/scripts/prepare_fork_coverage_comment.py). cp -r /workspace/.github $TEST_DIR/ || echo "WARNING: No .github directory"; These are the only two code sites reached by the four failing Linux stages. <!-- ### 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 performance improvements PERF: (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 -->
RELEASE:1.13.0 (#707) ### Work Item / Issue Reference > [AB#47087](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/47087) ------------------------------------------------------------------- ### Summary Release mssql-python v1.13.0. Version bump to 1.13.0. Updates `mssql_python/__init__.py`, `setup.py`, `PyPI_Description.md`, and the README "Important Note" section. Bundled `mssql_py_core` bumped from 0.1.7 to 0.1.8 (no source/API changes — dev-nightly to stable pin). #### Enhancements - **ODBC driver ships exclusively via `mssql-python-odbc` (Phase 2)** — The `libs/` fallback introduced in v1.12.0 has been removed. `mssql-python` now hard-depends on `mssql-python-odbc==18.6.2.1`; `pip install mssql-python` still pulls the driver package transparently. Smaller wheels; driver binaries managed independently (#693). - **Apache Arrow bulk copy** — New `Cursor.bulkcopy_arrow(table_name, source)` method for high-performance bulk loading from `pyarrow.Table` / `RecordBatch` / Arrow C Data Interface sources; classic `bulkcopy()` now raises `TypeError` for Arrow inputs and steers users to the new method (#665). - **`token_provider=` parameter for Azure Identity credentials** — `connect()` accepts any credential with a `.get_token(scope)` method (`DefaultAzureCredential`, `AzureCliCredential`, `ManagedIdentityCredential`, …). Mutually exclusive with `Authentication=` in the connection string (#603, issue #577). - **Identity-aware connection pooling with token-expiry refresh** — Pool now keys on security context, preventing cross-identity connection leaks; token acquisition deferred to pool-misses; connections with near-expiry tokens refreshed automatically (#660, issues #651, #659). #### Bug Fixes - **Silent zero-row `executemany` batches on late NULLs** — Fixed numeric array parameter binding paths (`TINYINT`/`SMALLINT`/`INT`/`FLOAT`) that left indicator slots uninitialized when a NULL appeared partway through the batch (#702, issue #670). - **`SQL_WVARCHAR` output converter applied as catch-all to non-string columns** — Fallback now gated on `str`/`bytes` mapped types (#692, issue #691). - **Integer-keyed output converters silently never fired** — `add_output_converter(SQL_DECIMAL, ...)` and other integer SQL type code keys now dispatch correctly (pyodbc parity) (#690, issue #684). - **`RecordBatchReader.Close()` for Arrow result sets** — `Cursor.arrow_reader()` now returns a wrapper whose `.close()` releases server-side resources and leaves the parent cursor usable (#644, issue #643). - **`AttributeError` in `Cursor.__del__` on partially-initialized cursor** — `__init__` sets `closed`/`hstmt` before any raise; `__del__` uses correct `sys.is_finalizing()` guard (#646, issue #642). #### Version Bump - `mssql_python/__init__.py`: `__version__ = "1.13.0"` - `setup.py`: `version="1.13.0"` - `PyPI_Description.md`: `## What's new in v1.13.0` section refreshed - `README.md`: "Important Note" updated for Phase 2 (no more `libs/` fallback, `mssql-python-odbc==18.6.2.1`)
CHORE: Bump mssql-py-core to 0.1.7 (#688) ### Work Item / Issue Reference > AB#<WORK_ITEM_ID> #667 ------------------------------------------------------------------- ### Summary Bump the bundled `mssql-py-core` version from `0.1.6` to `0.1.7`. Updates `eng/versions/mssql-py-core.version`, which pins the Rust `mssql_py_core` wheel that PR validation and release pipelines download from NuGet.
CHORE: Bump mssql-py-core to 0.1.6 (#666) ### Work Item / Issue Reference > GitHub Issue: #662 ------------------------------------------------------------------- ### Summary Bumps the bundled `mssql-py-core` pin from `0.1.5` to `0.1.6`, which includes the Rust-side GIL-deadlock fix for Service Principal bulk copy (mssql-rs #78). Fixes the freeze reported in #662 (related: #623). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
PreviousNext