Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/scripts/install-mssql-py-core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Get-PlatformInfo {
# aarch64 -> arm64 so a Windows arm64 target resolves win_arm64, not win_aarch64.
$script:WheelPlatform = "win_$($archTag -replace 'x86_64','amd64' -replace 'aarch64','arm64')"

$script:WheelPattern = "mssql_python_rs-$script:DistributionVersion-$script:PyVersion-$script:PyVersion-$script:WheelPlatform.whl"
$script:WheelPattern = "mssql_python_rs-$script:DistributionVersion-cp310-abi3-$script:WheelPlatform.whl"
Write-Host "Wheel pattern: $script:WheelPattern"
}

Expand Down
2 changes: 1 addition & 1 deletion eng/scripts/install-mssql-py-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ print(f'cp{v.major}{v.minor} {platform.system().lower()} {platform.machine().low
;;
esac

WHEEL_PATTERN="mssql_python_rs-${DISTRIBUTION_VERSION}-${PY_VERSION}-${PY_VERSION}-${WHEEL_PLATFORM}.whl"
WHEEL_PATTERN="mssql_python_rs-${DISTRIBUTION_VERSION}-cp310-abi3-${WHEEL_PLATFORM}.whl"
echo "Wheel pattern: $WHEEL_PATTERN"
}

Expand Down
2 changes: 1 addition & 1 deletion eng/versions/mssql-python-rs-nuget.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.0-dev.20260921.176911
22 changes: 17 additions & 5 deletions tests/test_037_rs_wheel_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_downloads_only_matching_wheels_and_clears_stale_output(tmp_path, monkey
(output / "stale.whl").write_bytes(b"stale")
content = _package(
[
"wheels/mssql_python_rs-0.1.0-cp313-cp313-win_amd64.whl",
"wheels/mssql_python_rs-0.1.0-cp310-abi3-win_amd64.whl",
"symbols/debug.pdb",
],
"0.1.0-dev.20260914.174990",
Expand All @@ -70,7 +70,7 @@ def test_downloads_only_matching_wheels_and_clears_stale_output(tmp_path, monkey
"https://example.test/index.json", version_file, transport_file, output
)

assert [wheel.name for wheel in wheels] == ["mssql_python_rs-0.1.0-cp313-cp313-win_amd64.whl"]
assert [wheel.name for wheel in wheels] == ["mssql_python_rs-0.1.0-cp310-abi3-win_amd64.whl"]
assert sorted(path.name for path in output.iterdir()) == [wheels[0].name, "transport.json"]
receipt = json.loads((output / "transport.json").read_text())
assert receipt == {
Expand All @@ -97,7 +97,7 @@ def test_rejects_wheel_with_unexpected_version(tmp_path, monkeypatch):
version_file.write_text("0.1.0", encoding="ascii")
transport_file = tmp_path / "transport-version"
transport_file.write_text("0.1.0-dev.1", encoding="ascii")
content = _package(["wheels/mssql_python_rs-0.1.1-cp313-cp313-win_amd64.whl"])
content = _package(["wheels/mssql_python_rs-0.1.1-cp310-abi3-win_amd64.whl"])
_mock_download(monkeypatch, module, content)

with pytest.raises(ValueError, match="Unexpected wheel name"):
Expand All @@ -115,7 +115,7 @@ def test_rejects_duplicate_wheel_filename(tmp_path, monkeypatch):
version_file.write_text("0.1.0", encoding="ascii")
transport_file = tmp_path / "transport-version"
transport_file.write_text("0.1.0-dev.1", encoding="ascii")
wheel = "wheels/mssql_python_rs-0.1.0-cp313-cp313-win_amd64.whl"
wheel = "wheels/mssql_python_rs-0.1.0-cp310-abi3-win_amd64.whl"
with pytest.warns(UserWarning, match="Duplicate name"):
content = _package([wheel, wheel])
_mock_download(monkeypatch, module, content)
Expand Down Expand Up @@ -185,7 +185,7 @@ def test_rejects_symlink_output_without_deleting_target(tmp_path, monkeypatch):
else:
output.symlink_to(target, target_is_directory=True)

content = _package(["wheels/mssql_python_rs-0.1.0-cp313-cp313-win_amd64.whl"])
content = _package(["wheels/mssql_python_rs-0.1.0-cp310-abi3-win_amd64.whl"])
_mock_download(monkeypatch, module, content)

with pytest.raises(ValueError, match="symbolic link|junction"):
Expand All @@ -204,3 +204,15 @@ def test_stress_jobs_resolve_dependency_from_pinned_transport():
assert pipeline.count("download_mssql_python_rs_wheels.py --output-dir") == 2
assert pipeline.count("--find-links=$(Pipeline.Workspace)\\mssql-python-rs-wheels") == 1
assert pipeline.count("--find-links=$(Pipeline.Workspace)/mssql-python-rs-wheels") == 1


@pytest.mark.parametrize(
"script_name",
["install-mssql-py-core.ps1", "install-mssql-py-core.sh"],
)
def test_local_installers_select_stable_abi_wheel(script_name):
script = (SCRIPTS_DIR / script_name).read_text(encoding="utf-8")

assert "cp310-abi3" in script
assert "PyVersion-$script:PyVersion" not in script
assert "PY_VERSION}-${PY_VERSION" not in script
Loading