Skip to content

Align Windows API callable signatures - #9572

Merged
youknowone merged 3 commits into
RustPython:mainfrom
youknowdot:fix/windows-winapi-signatures-20261103
Nov 6, 2026
Merged

youknowone merged 3 commits into
RustPython:mainfrom
youknowdot:fix/windows-winapi-signatures-20261103

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Align 14 Windows _winapi callable signatures with CPython 3.15's generated Clinic definitions, covering the reported parameter names and defaults.

  • Preserve existing positional-only parameter kinds for the name changes and expose the native 0 defaults for DuplicateHandle and PeekNamedPipe.
  • Preserve ConnectNamedPipe's positional-or-keyword binding with its native False default.
  • Allow WaitForMultipleObjects to omit milliseconds, using the same native u32 INFINITE constant exported by _winapi.

These are the targeted entries from the Windows whats_left report. The default values are stored as Rust scalars and do not allocate or convert Python default objects. Existing broader integer/truth conversion behavior is unchanged; this does not claim full behavioral parity.

Validation

  • Independent source review checked all 14 signatures, positional/keyword kinds, inferred flags, arity, supplied-value conversions, None handling, native defaults, and renamed body references.
  • rustfmt --edition 2024 --check, git diff --check, and the normal commit hook passed.
  • RustPython compilation, workspace/C API tests, and Windows runtime tests were not run locally: the coordinated native execution guard and lock are absent and the offline dependency cache is incomplete. Hosted CI is pending; no runtime pass is claimed.

AI assistance

Implementation and source review were assisted by dot. The runtime does not expose its exact model version.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codspeed

codspeed Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 62 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing youknowdot:fix/windows-winapi-signatures-20261103 (dd3d572) with main (18fc82b)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Comment thread crates/vm/src/stdlib/_winapi.rs Outdated
#[derive(FromArgs)]
struct CreateProcessArgs {
#[pyarg(positional)]
#[pyarg(positional, name = "application_name")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the field names rather than overriding using name=""

Match CPython positional parameter names and preserve typed scalar defaults without boxing, including the omitted infinite wait timeout.

Assisted-by: dot:frontier-intelligence
Assisted-by: dot:frontier-intelligence
Assisted-by: OpenAI Codex:model version not exposed
@youknowdot
youknowdot force-pushed the fix/windows-winapi-signatures-20261103 branch from b968eb8 to 7d6f4dd Compare November 5, 2026 14:53
@youknowone
youknowone marked this pull request as ready for review November 6, 2026 03:06
@youknowone
youknowone merged commit 6b4f564 into RustPython:main Nov 6, 2026
27 of 28 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-06T03:06:41.367910Z
We couldn’t complete this review. Comment @codex review to try again.
7d6f4dd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants