Skip to content

Commit 55d6ddb

Browse files
committed
Enable Python 3.15 / 3.15t for Windows wheel builds
Extend the opt-in preview Python versions (INCLUDE_PREVIEW_PYTHON_VERSIONS) to Windows so 3.15 / 3.15t are generated for Windows wheels, matching the Linux and macOS enablement. The interpreter setup (conda-forge python_dev/python_rc labels) is shared across OSes via .github/actions/setup-binary-builds. The Windows smoke test still runs for 3.15 / 3.15t, but installs the built wheel with --no-deps: numpy has no cp315 Windows wheel yet and cannot build from source in the env. torch is already installed, so the torch import smoke test still runs. Also update the matrix unit tests (Windows now opts in). Authored with assistance from Claude Code (AI assistant).
1 parent fd65731 commit 55d6ddb

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/workflows/build_wheels_windows.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,14 @@ jobs:
362362
source "${BUILD_ENV_FILE}"
363363
WHEEL_NAME=$(ls "${{ inputs.repository }}/dist/")
364364
echo "$WHEEL_NAME"
365-
${CONDA_RUN} pip install "${{ inputs.repository }}/dist/$WHEEL_NAME"
365+
# numpy has no cp315 Windows wheel yet and cannot build from source, so
366+
# install without deps for 3.15 to keep the smoke test running (torch is
367+
# already installed in the env).
368+
if [[ "${{ startsWith(matrix.python_version, '3.15') }}" == "true" ]]; then
369+
${CONDA_RUN} pip install --no-deps "${{ inputs.repository }}/dist/$WHEEL_NAME"
370+
else
371+
${CONDA_RUN} pip install "${{ inputs.repository }}/dist/$WHEEL_NAME"
372+
fi
366373
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
367374
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
368375
${CONDA_RUN} "${{ inputs.repository }}/${ENV_SCRIPT}" python -c "import ${PACKAGE_NAME}; print('package version is ', ${PACKAGE_NAME}.__version__)"

tools/scripts/generate_binary_build_matrix.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,14 @@ def generate_wheels_matrix(
454454
# Define default python version
455455
python_versions = list(PYTHON_ARCHES)
456456

457-
# Opt-in preview versions (e.g. 3.15/3.15t) are torch-only and validated
458-
# on Linux x86/aarch64 and macOS arm64. Append them to the default list
459-
# so the shared default (used by domain libraries and Windows) is
457+
# on Linux x86/aarch64, macOS arm64 and Windows. Append them to the
458+
# default list so the shared default (used by domain libraries) is
460459
# unaffected.
461460
if include_preview_python_versions and os in (
462461
LINUX,
463462
LINUX_AARCH64,
464463
MACOS_ARM64,
464+
WINDOWS,
465465
):
466466
python_versions += PREVIEW_PYTHON_ARCHES_DICT.get(channel, [])
467467

tools/tests/test_generate_binary_build_matrix.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,15 @@ def _test_channel_python_versions(
150150
return {entry["python_version"] for entry in out["include"]}
151151

152152
def test_preview_python_versions_opt_in(self):
153-
# 3.15 / 3.15t are validated on Linux x86/aarch64 and macOS arm64 for the
154-
# nightly and test channels when explicitly opted in.
153+
# 3.15 / 3.15t are validated on Linux x86/aarch64, macOS arm64 and Windows
154+
# for the nightly and test channels when explicitly opted in.
155155
for channel in ("nightly", "test"):
156-
for operating_system in ("linux", "linux-aarch64", "macos-arm64"):
156+
for operating_system in (
157+
"linux",
158+
"linux-aarch64",
159+
"macos-arm64",
160+
"windows",
161+
):
157162
versions = self._test_channel_python_versions(
158163
operating_system, include_preview="enable", channel=channel
159164
)
@@ -167,14 +172,6 @@ def test_preview_python_versions_off_by_default(self):
167172
self.assertNotIn("3.15", versions)
168173
self.assertNotIn("3.15t", versions)
169174

170-
def test_preview_python_versions_excluded_on_windows(self):
171-
# Windows must not pick up the preview versions even when opted in.
172-
versions = self._test_channel_python_versions(
173-
"windows", include_preview="enable"
174-
)
175-
self.assertNotIn("3.15", versions)
176-
self.assertNotIn("3.15t", versions)
177-
178175
def test_preview_python_versions_excluded_on_release_channel(self):
179176
# Preview versions are defined for the nightly and test channels only,
180177
# never for the release channel.

0 commit comments

Comments
 (0)