Repository navigation
Find versioned interpreter names like pypy3.11 on Windows - #3325
Merged
messense merged 2 commits intoOct 15, 2026
Merged
Conversation
This was referenced Oct 12, 2026
On Windows, Rust's `Command` appends `.exe` only when the program name has no extension, and `pypy3.11` or `python3.14t` count as having one (`.11`, `.14t`). So `-i pypy3.11` was never found on PATH, and maturin fell back to the bundled sysconfig, which tags PyPy wheels `pp73` (PyPy 8 can't install them), after printing "Failed to determine python platform" twice. Add `python_command`, which on Windows looks up `<name>.exe` on PATH for such names, and use it for the metadata query in `check_executable` and the two platform probes in `target/mod.rs`.
monosans
force-pushed
the
windows-versioned-interpreter-names
branch
from
October 14, 2026 23:24
bb17912 to
80befad
Compare
New RustSec advisories make `cargo deny check` fail, and with it the Lint job of every pull request: - `rustls` 0.23.45 is affected by RUSTSEC-2026-0346, -0347, -0348 and -0349. Update it to 0.23.46, which fixes all four. - `ruzstd` 0.8.2 is affected by RUSTSEC-2026-0344, fixed only in 0.9.1. It comes in through `object` 0.38, which `arwen` pins, so it cannot be updated until `arwen` updates `object`. Ignore the advisory with that reason: maturin only uses `arwen` to rewrite the Mach-O load commands of libraries it repairs, not to decompress untrusted zstd data.
Contributor
Author
messense
approved these changes
Oct 15, 2026
messense
pushed a commit
that referenced
this pull request
Oct 15, 2026
New RustSec advisories make `cargo deny check` fail, and with it the Lint job of every pull request (e.g. #3325). - `rustls` 0.23.45 is affected by RUSTSEC-2026-0346, -0347, -0348 and -0349. This updates it to 0.23.46, which fixes all four. - `ruzstd` 0.8.2 is affected by RUSTSEC-2026-0344, fixed only in 0.9.1. It comes in through `object` 0.38, which `arwen` 0.0.5 pins, so it cannot be updated until `arwen` updates `object`. This ignores the advisory with that reason in `deny.toml`: maturin only uses `arwen` to rewrite the Mach-O load commands of libraries it repairs, not to decompress untrusted zstd data. `cargo deny --all-features check` now reports `advisories ok, bans ok, licenses ok, sources ok`.
This was referenced Oct 22, 2026
monosans
added a commit
to monosans/pyromark
that referenced
this pull request
Oct 30, 2026
* Revert PyPy .exe workaround on Windows Since PyO3/maturin#3325, maturin finds `pypy3.X` on PATH on Windows instead of falling back to its bundled sysconfig (pp73). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revert workaround: no PyPy 3.12 in the manylinux 2_17 images Since PyO3/maturin#3343, maturin tags PyPy 3.12 built from its bundled sysconfig pp80, so the manylinux2014 images can build PyPy 3.12 again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: bump maturin to 1.16.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: test the manylinux 2_17 PyPy 3.12 wheel on PyPy maturin builds this wheel from its bundled sysconfig, since the manylinux2014 images have no PyPy 3.12, so no interpreter checks it at build time. Run pytest on it with PyPy 3.12 and skip the tests that rely on CPython's garbage collector and introspection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
monosans
added a commit
to monosans/mkdocs-minify-html-plugin
that referenced
this pull request
Oct 30, 2026
* Revert PyPy .exe workaround on Windows Since PyO3/maturin#3325, maturin finds `pypy3.X` on PATH on Windows instead of falling back to its bundled sysconfig (pp73). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revert workaround: no PyPy 3.12 in the manylinux 2_17 images Since PyO3/maturin#3343, maturin tags PyPy 3.12 built from its bundled sysconfig pp80, so the manylinux2014 images can build PyPy 3.12 again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: bump maturin to 1.16.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: smoke-test the manylinux 2_17 PyPy 3.12 wheel on PyPy maturin builds this wheel from its bundled sysconfig, since the manylinux2014 images have no PyPy 3.12, so no interpreter checks it at build time. Install it on PyPy 3.12 and minify a page with the default options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: add a pytest suite Build a small site with and without the plugin and check that pages and HTML templates are minified, that sitemap.xml is left alone, that options set in mkdocs.yml reach minify-html, and that the README lists every option with its default. Run it in CI on the manylinux 2_28 x86_64 wheel, as in pyromark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run pytest on the manylinux 2_17 PyPy 3.12 wheel instead of a smoke test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3324.
On Windows, Rust's
Commandappends.exeonly when the program name has no extension. A versioned interpreter name likepypy3.11orpython3.14tcounts as having one (.11,.14t), so-i pypy3.11was never found on PATH. maturin fell back to the bundled sysconfig, which tags PyPy wheelspp73(PyPy 8 can't install them), and printed "Failed to determine python platform" twice.This adds
python_command, a drop-in forCommand::newthat, on Windows, looks up<name>.exeon PATH when the name has no directory part and an extension other than.exe. It replacesCommand::newin the metadata query incheck_executableand in the two platform probes intarget/mod.rs, which had the same problem. If<name>.exeisn't on PATH, the command is created as before, so thepylauncher fallback still runs.Tested on Windows with PyPy from
uv python install --no-registry pypy3.11, buildingtest-crates/pyo3-purewith-i pypy3.11:pp311-pypy311_pp73-win_amd64...\pypy-3.11.16-windows-x86_64-none\pypy3.11.exe,pp311-pypy311_pp80-win_amd64-i pypy3.11.exebehaves the same as before, and with the interpreter not on PATH the result is the same as before the change.cargo fmtis clean,cargo test --lib python_interpreterandcargo test --lib target::pass, and the change adds no clippy warnings.