Repository navigation
Accept buffer exporters for binary registry values - #9607
Merged
youknowone merged 2 commits intoNov 4, 2026
Merged
Conversation
Keep exact bytes on the direct path, acquire a simple buffer for other exporters, and snapshot the key before buffer callbacks run. Assisted-by: dot:frontier-intelligence
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
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. CodeRabbit Verify
|
Keep the early HKEY snapshot and binary buffer conversion while adopting the upstream SetValueEx type parameter name. Assisted-by: dot:frontier-intelligence
youknowone
approved these changes
Nov 3, 2026
youknowone
marked this pull request as ready for review
November 3, 2026 19:05
youknowone
enabled auto-merge (squash)
November 3, 2026 19:05
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. |
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.
Summary
Allow buffer exporters, such as bytearray and memoryview, for REG_BINARY and unknown registry value types as CPython does. Exact bytes keep the existing direct single-copy path; other objects are checked for the buffer protocol, acquired with SIMPLE flags, copied, and released before the registry call. Exporter errors are propagated instead of being mistaken for lack of buffer support.
The key handle is snapshotted before newly supported buffer acquisition/release callbacks can run, so those callbacks cannot change the handle subsequently passed to Windows.
This does not claim complete
SetValueExparity: earlier type-argument conversion ordering, integer-key support, the absentwinreg.SetValueaudit event, and allocation-failure behavior remain separate issues. #9604 edits the preceding REG_MULTI_SZ branch and #9573 changes nearby SetValueEx parameter names; these should be checked together.Validation
PC/winreg.cand RustPython's SIMPLE buffer acquisition/release path.prekhooks andgit diff --checkpassed.