Commit fc982f6
authored
Fix Python 3.15 smoke tests on Windows and Linux (#8357)
`numpy` publishes no cp315 wheels on PyPI, so installing a freshly built
wheel under 3.15 / 3.15t falls back to the numpy sdist and tries to
build it from source. On Windows that build fails outright in the conda
env:
```
..\meson.build:1:0: ERROR: Cython requires python3 dependency for link testing, but it could not be found
error: metadata-generation-failed
```
so `pip install <wheel>` aborts, the wheel is never installed, and the
smoke test reports `ModuleNotFoundError: No module named 'torchvision'`
— a symptom two steps removed from the cause.
cp315 wheels for **both numpy and pillow** are published on
`download.pytorch.org` across `cpu / cu126 / cu128 / cu129 / cu130 /
xpu`, so for 3.15 / 3.15t this resolves runtime deps from there with
`--pre` (numpy is currently `2.6.0.dev0`). All other Python versions
install from PyPI exactly as before.
### Changes
- **Windows** (`build_wheels_windows.yml`) — both the X64 and ARM64
smoke tests.
- **Linux** (`build_wheels_linux.yml`) — re-enables the 3.15 smoke test,
which was skipped for exactly this reason, **and** applies the same
dependency resolution. Re-enabling it without that would just relocate
the failure, since numpy still has no cp315 wheels on PyPI.
`--index-url` (rather than `--extra-index-url`) replaces PyPI for that
install, so every torchvision runtime dependency has to be present on
the pytorch index. Verified for `torch`, `numpy` and `pillow` with cp315
`win_amd64`, `win_arm64` and `manylinux` builds across all of the
indices listed above.
### Dropped from the earlier revision
The `generate_binary_build_matrix.py` and matrix-test changes are gone.
#8427 has since enabled 3.15 / 3.15t by default for every OS and removed
the opt-in `include_preview_python_versions` mechanism those hunks
extended, so they are obsolete. The `[DO NOT MERGE]` PR-build override
is also dropped.
### Follow-up
This fixes CI only. A user running `pip install torchvision` on Python
3.15 still cannot satisfy the numpy dependency from PyPI, so 3.15
remains effectively nightly-only until upstream numpy ships cp315
wheels.1 parent f12f993 commit fc982f6
2 files changed
Lines changed: 27 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 304 | + | |
310 | 305 | | |
311 | 306 | | |
312 | 307 | | |
| |||
317 | 312 | | |
318 | 313 | | |
319 | 314 | | |
320 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
366 | 374 | | |
367 | 375 | | |
368 | 376 | | |
| |||
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
383 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
384 | 399 | | |
385 | 400 | | |
386 | 401 | | |
| |||
0 commit comments