Repository navigation
FEAT: Add Python 3.15 Conda support - #839
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
….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>
Use RC3 on Windows and macOS while the official Linux Docker image remains on RC2.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use Python 3.15 GA on hosted agents and stable PyArrow 26.0.0, while retaining RC3 Linux images until Docker publishes GA.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve isolated-wheel skips, fail container setup immediately, align Decimal privacy documentation, and pin stable PyArrow 26.0.0.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin PyArrow 25.0.1 below Python 3.15 and PyArrow 26.0.0 on Python 3.15+, keeping the existing 3.10 release locks satisfiable.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the native-hardening and auth-test changes owned by PR #810, retaining only the Python 3.15 header-order compatibility flag and its focused contract.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the marker-scoped PyArrow 26.0.0 hashes while preserving PyArrow 25.0.1 for older Python versions.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the three added source-text tests, assert suppressed Decimal causes in the existing test, and propagate container setup failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
### Work Item / Issue Reference > #817 ------------------------------------------------------------------- ### Summary Extends the governed build and release pipeline to produce Python 3.15 wheels without changing Conda packaging. - Adds Python 3.15 x64 and ARM64 Windows stages. - Adds a Python 3.15 macOS universal2 stage. - Adds `cp315` to all manylinux and musllinux x64/ARM64 build loops. - Extends release-lock compatibility validation to Python 3.15, allowing source builds where upstream wheels are unavailable. - Raises the consolidated wheel completeness gate from 34 to 41 wheels. ### Validation - YAML and whitespace validation passed. - Hosted universal-lock generation completed successfully for Linux, macOS, Windows, and ODBC. - The full build-release pipeline is the validation for native wheel production, tests, signing, and artifact completeness. ### Scope This PR covers PyPI wheel production only. Conda Python 3.15 packaging is intentionally excluded. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Raise the metadata-only error after leaving the conversion handler, and assert absent context in the three existing privacy tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain existing supported variants while adding ordinary CPython 3.15 across the six Conda subdirs. Align Windows layout, scoped builder selection and ARM64 channels, with focused packaging regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep current-checkout source tests blocking while selecting an explicit Linux CPython 3.11 binding/ODBC baseline independent of unpublished source releases. Reuse strict PyPI metadata and dependency validation and additionally enforce reviewed wheel filenames and SHA256 pins. Production and release source pins are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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 |
Remove hardcoded smoke versions and SHA256 literals. Select the current published binding and its exact ODBC/RS requirements from PyPI while retaining runtime PyPI digest and wheel metadata validation. Keep production source-bound inputs unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-platform packaging, channel resolution, and native ARM64 behavior still require approved-agent validation.
0 open findings
What changed in this PR
Adds ordinary CPython 3.15 to the Conda packaging matrix while preserving existing versions and published-wheel smoke validation.
Changes:
- Expands Conda builds and release validation to 34 variants.
- Handles Python 3.15’s Windows site-packages layout and builder/channel requirements.
- Makes the Linux smoke test use the current published binding and exact dependencies.
| File | Description |
|---|---|
.github/workflows/conda-audit.yml |
Uses published CPython 3.11 smoke inputs. |
OneBranchPipelines/conda-build-pipeline.yml |
Adds 3.15 build variants. |
OneBranchPipelines/jobs/consolidate-conda-artifacts-job.yml |
Updates expected package counts. |
OneBranchPipelines/steps/conda-build-validate-step.yml |
Documents the expanded Windows matrix. |
OneBranchPipelines/steps/conda-publish-step.yml |
Publishes against the 3.15-inclusive matrix. |
OneBranchPipelines/steps/conda-release-step.yml |
Validates the expanded release matrix. |
conda/README.md |
Documents 3.15 packaging and smoke policy. |
conda/mssql-python/bld.bat |
Uses the target-provided site-packages path. |
conda/mssql-python/meta.yaml |
Updates the supported build range. |
eng/conda_tools/build.py |
Selects channels and builder by target version. |
eng/conda_tools/contracts.py |
Defines target-specific site-packages roots. |
eng/conda_tools/environment.py |
Pins conda-build 26.9.1 for Windows 3.15. |
eng/conda_tools/inputs.py |
Adds published-smoke dependency selection. |
eng/conda_tools/release.py |
Expands default release policy to 3.15. |
eng/conda_tools/verify.py |
Uses conda-forge for win-arm64 3.15. |
tests/test_027_conda_release_metadata.py |
Tests matrix defaults and package counts. |
tests/test_030_pe_machine_assert.py |
Tests the new Windows package layout. |
tests/test_034_conda_verify_cwd.py |
Tests ABI, channels, and builder selection. |
tests/test_036_conda_provenance.py |
Tests published smoke and 3.15 provenance. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 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.connection.connection_pool.cpp: 82.3%
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%
mssql_python.cursor.py: 92.5%🔗 Quick Links
|
Work Item / Issue Reference
Summary
Add ordinary CPython 3.15 to the existing combined binding/ODBC/RS Conda package without removing older supported versions.
lib/python/site-packageson 3.15, retainingLib/site-packageson older Python.<26constraint.microsoft, thenconda-forge, for the win-arm64 3.15 build and verification dependencies. Preserve the exact older-version channel policies and the 3.12 ARM64 ABI workaround.Source RS/ODBC versions, optional dependencies, OS floors and publisher tools are unchanged.
User-directed PR smoke follow-up: keep current-checkout source tests blocking, but obtain the real Linux CPython 3.11 smoke inputs directly from PyPI using
fetch-wheels --published-smoke. Select PyPI's current published binding and its exact ODBC/RS dependencies, rather than unpublished source versions or independently mixing latest components. No smoke versions, filenames or SHA256 values are hardcoded. Downloads still require PyPI-provided hashes and actual METADATA/WHEEL/RECORD/dependency checks. Missing or mismatched inputs fail; no skip, older-release fallback or release-policy relaxation. The workflow supports both embedded-core and separate-RS published bindings without substituting source RS pins. This published packaging control does not qualify current-source RS or CPython 3.15. Production/default source-bound selection and trigger scoping are unchanged. The hardcoded digest literals reported by DevSkim have been removed, not suppressed.Builds on merged #817 and now targets
main.Validation
Result: 1,388 passed on the initial Conda support commit. These are source-only packaging/tooling tests, not native driver or SQL integration tests.
Result: 1,073 passed on the PyPI-selection follow-up, covering explicit published/source selection, unavailable or invalid published dependencies, target restriction, embedded/separate RS and existing digest/dependency/provenance/trigger controls. Live
read_published_versions()selected the current PyPI binding and its exact ODBC requirement successfully. Earlier local wheel-download attempts hit TLS handshake errors on Windows and a bounded Linux container; no TLS bypass was used. The normal post-push hostedconda-auditrun validates actual wheel downloads and the build/audit for this revision.Result: all passed. Normal commit and push hooks also passed.
Earlier bounded local experiments solved the full ordinary-3.15 runtime dependency closure on all six subdirs. Synthetic packaging with actual Conda interpreters and conda-build 26.9.1 passed for win-64 3.10/3.15 and cross-built win-arm64 3.15, including ABI, PE and installed-component checks.
Not end-to-end qualification: this host's
NoDefaultCurrentDirectoryInExePathsetting blocks conda-build's normal bare batch-file launch, including the productionbuild_packagesinvocation. The synthetic packaging results used an explicit-path generated-batch launch followed byconda-build --post, without changing host policy or installed libraries. They do not establish normal pipeline success or native ARM64 execution. Approved-agent execution, real candidate wheels, native platform/SQL/TLS/authentication/bulk-copy and optional-feature qualification remain pending. No ADO pipeline was queued and nothing was published to Anaconda.