CHORE: validate Python 3.15 RC2 in PR CI - #817
Gaurav Sharma (bewithgaurav) wants to merge 15 commits into
Conversation
Add Python 3.15 RC2 preview legs on Windows, macOS, and Linux x64/ARM64 so the existing PR validation flow can expose product and packaging blockers before GA. Skip Arrow-only tests on 3.15 until PyArrow publishes compatible wheels. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AB#48377 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Give each concurrent connect call its own configured native connection mock so MagicMock child creation cannot race during close. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AB#48377 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the pinned PyArrow nightly wheel set and skip every non-3.15 pipeline leg so the validation result measures only 3.15 readiness.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Select compatible abi3 Rust wheels for newer CPython versions and include Python.h before libc-consuming standard headers.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Force Python.h ahead of libc headers in every native translation unit, align the GC stress assertion with Python 3.15 finalization ordering, and preserve focused-pipeline contracts.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Suppress Decimal conversion causes that can retain rejected input and make the cyclic-finalizer stress test explicitly release its synthetic self-cycle.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep Python 3.15 preview coverage additive while preserving every existing validation leg.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> # Conflicts: # mssql_python/pybind/CMakeLists.txt # tests/test_040_native_binary_hardening.py
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The nightly dependency index affects existing jobs, and a hardening test can fail outside source checkouts.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Extends PR CI with Python 3.15 RC2 validation across supported platforms and updates compatibility, hardening, and dependency handling.
Changes:
- Adds Python 3.15 CI legs and PyArrow preview support.
- Updates ABI3 Rust wheel selection and package pins.
- Adds native hardening and Python 3.15 compatibility fixes.
| File | Description |
|---|---|
tests/test_040_native_binary_hardening.py |
Native hardening regression tests |
tests/test_038_mssql_odbc_daily_validation.py |
Pipeline and wheel-selection contract tests |
tests/test_009_pooling.py |
Python 3.15 GC finalization handling |
tests/test_008_auth.py |
Concurrent authentication test setup |
requirements.txt |
Python 3.15 PyArrow dependency |
mssql_python/pybind/ddbc_bindings.h |
Python header include ordering |
mssql_python/pybind/CMakeLists.txt |
POSIX build hardening flags |
mssql_python/cursor.py |
Decimal traceback privacy |
eng/versions/mssql-python-rs.version |
Rust package version pin |
eng/versions/mssql-python-rs-nuget.version |
NuGet transport version pin |
eng/scripts/select_mssql_python_rs_wheel.py |
Compatible wheel selection |
eng/scripts/install-mssql-py-core.sh |
Unix installer integration |
eng/scripts/install-mssql-py-core.ps1 |
Windows installer integration |
eng/pipelines/pr-validation-pipeline.yml |
Python 3.15 validation matrix |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| assert flag in cmake | ||
|
|
||
|
|
||
| def test_python_headers_precede_standard_library_headers(): |
| # Split str(val) from the decimal parse so we only chain a | ||
| # cause we know is value-free. decimal.DecimalException | ||
| # messages (e.g. ConversionSyntax) never echo the input, so | ||
| # they are safe to preserve for debugging. str(val) itself | ||
| # or any other error could carry the value in its message | ||
| # and surface through __cause__ / formatted tracebacks, so | ||
| # those are re-raised with the chain suppressed (from None). | ||
| # cause. Python 3.15's pure-Python decimal implementation | ||
| # can retain the rejected input in traceback state, so every | ||
| # conversion failure suppresses chaining. |
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.performance_counter.hpp: 0.7%
mssql_python.pybind.logger_bridge.cpp: 57.9%
mssql_python.pybind.ddbc_bindings.h: 62.6%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 79.3%
mssql_python.pybind.connection.connection_pool.cpp: 82.9%
mssql_python.pybind.connection.connection.cpp: 83.1%
mssql_python.logging.py: 86.2%
mssql_python.pooling.py: 90.1%
mssql_python.pybind.fetch_temporal.hpp: 92.1%🔗 Quick Links
|
PR Performance Report✅ No regression detectedNo consistent slowdowns detected across all 2 environments. 0 IMPROVEMENTS 0 SLOWDOWNS 2/2 ENVIRONMENTS Coverage: 2 of 2 environments completed. Advisory result; does not block merging. Performance diagnosticsPhase times are inclusive diagnostics and must not be added together. They identify where measured time changed, not why it changed. No affected phases or call-count changes were recorded. All database tasks and timingsUnix / SQL Server 2022
Unix / SQL Server 2025
Build and measurement detailsPR head:
A consistent change requires more than 20% median paired movement, at least 1 ms between the median runtimes, and at least 80% of pairs exceeding the relative threshold in the same direction. A slowdown without enough pair agreement is reported as inconsistent. The displayed change is the median of paired before-and-after ratios. It is not recalculated from the two displayed median runtimes. Both revisions use profiling-enabled builds on the same agent and database, with alternating order and discarded warmups. Results are diagnostic and do not represent production-wheel latency. Raw samples and logs are attached to the ADO run as |
| apt-get update && | ||
| apt-get install -y cmake curl wget gnupg build-essential | ||
| python3 --version |
….15-validation # Conflicts: # eng/scripts/install-mssql-py-core.ps1 # eng/scripts/install-mssql-py-core.sh # eng/versions/mssql-python-rs-nuget.version # eng/versions/mssql-python-rs.version # tests/test_038_mssql_odbc_daily_validation.py
Drop the stable-ABI wheel selection now provided by PR #804 and refresh the pinned Python 3.15 PyArrow nightly after the previous build was pruned.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| unittest-xml-reporting | ||
| psutil | ||
| pyarrow | ||
| --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple |


Summary
Adds Python 3.15 RC2 validation while keeping every existing PR-validation leg enabled.
26.0.0.dev323because stable PyArrow 25.0.1 does not publish Python 3.15 wheels.mssql-python-rs 0.3.0installer contract merged in CHORE: Accept stable ABI Rust wheels and mssql-python-rs 0.3.0 #804.Validation
26.0.0.dev323publishescp315wheels for the four target platform families.Follow-up
The native hardening changes overlap with #810. Pull
mainagain after #810 merges to reconcile that overlap.