Repository navigation
Update Windows registry behavior and canonical 3.15 tests - #9420
youknowone merged 2 commits into
Conversation
Add DeleteTree with nullable wide paths, audit emission, native errors, and thread release; compare HKEY handles as CPython does while retaining upstream identity hashing. Migrate canonical winreg and winapi tests from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Assisted-by: OpenAI Codex: model version unavailable
|
Caution Review failedThe pull request is closed. Finishing Touches
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. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_winreg.py dependencies: dependent tests: (80 tests)
[x] test: cpython/Lib/test/test_winapi.py dependencies: dependent tests: (no tests depend on winapi) Legend:
|
Keep sub_key required while accepting None, matching CPython and the canonical HKEY comparison test prerequisite. Forward a null path to RegOpenKeyExW, retain owned wide strings across thread release, and emit the input and result audit events without leaking the returned handle on an audit error. Assisted-by: OpenAI Codex: model version unavailable
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Integrate main 07b1cdb after the earlier unpublished main merge, carrying landed RustPython#9415 through RustPython#9420. Preserve queue accounting, fcntl/ioctl buffers, resource limits, complex memoryview and array formats, and Windows registry compatibility with their canonical tests. The automatic Cargo.lock merge adds the stdlib half dependency while preserving the existing Ruff parser vendor override. Other incoming and residual paths remain byte-for-byte with their respective parents. The updater suite passed 226 tests; affected-file hooks passed. No fresh local Rust build or interpreter runtime was run. Local cspell remains deferred to exact-head CI under the user's instruction. AI assistance covered source integration, review and validation. Assisted-by: dot: model version not exposed
Summary
winreg.DeleteTree(key, sub_key=None, /)through the existing Windows registry bindings, with nullable wide-string conversion, audit emission, native error mapping, and thread release during the blocking call.sub_keyinOpenKey/OpenKeyEx, forwardingNoneas a native NULL path. Preserve owned wide-string conversion, add the canonical audit events, and release threads during the native call.NotImplemented. Preserve CPython's existing identity hash, which upstream itself retains despite the new value comparison.Lib/test/test_winreg.pyandLib/test/test_winapi.pyviascripts/update_lib migratefrom CPythond220409a13b77de7a6c30abe16ea90db01528edc. Both files are byte-identical to canonical upstream: no added skips, rewritten assertions, duplicate snippets, or backports. Existing event-log APIs already support the newly imported_winapitests.Validation
cargo fmt --checkandgit diff --checkpassed.cargo check --locked --offline -j1 --target x86_64-pc-windows-msvc -p rustpython-host_env --libpassed against the official Rust 1.99 Windows standard library.-- -D warningspassed.psm 0.1.32native assembly before compiling VM Rust code: the available hostccrejects Windows PE directives (.def,.scl,.endef). No features were disabled and no SDK/compiler workaround was installed. The VM wrapper remains source-reviewed, not cross-compiled locally.Limitations
AI assistance
OpenAI Codex assisted with source comparison, implementation, canonical test migration, validation, and this description. Independent agent source review was performed; this is not a claim of human review or Windows runtime verification. Submitted as a draft for maintainer review.
Windows CI follow-up
The initial Windows run reached the canonical HKEY tests but failed at
OpenKey(HKEY_CURRENT_USER, None)before testing comparison behavior. The existing OpenKey converter incorrectly required a string. The follow-up fixes this nullable-path prerequisite without making the argument optional or changing/skipping canonical tests. Windows CI has now validated the updated head successfully; local Windows runtime execution remains unavailable.Hosted CI status
Verified on repaired head
70dce8cf067ddfa5e840818aa3e85855b06ec758: CI run 40633157939 completed successfully with all 24 jobs passing, and dependency check 40633154776 also succeeded. This includes the hosted Windows test job after the nullable-OpenKey fix; it does not change the local cross-compilation/runtime limitations or compatibility scope above. The PR remains a draft for maintainer review.