| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
📝 Walkthrough
WalkthroughRefactors winreg error handling: os_error_from_windows_code now takes only (vm, code); SetValueEx's value_name changed to Option<String>; call sites updated to use unified OS error mapping and removed per-call formatted error messages. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem🚥 Pre-merge checks | ✅ 2 | ❌ 2 ❌ Failed checks (1 warning, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick commentscrates/vm/src/stdlib/winreg.rs (2) 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. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
- SetValueEx: accept None for value_name (default registry value) - os_error_from_windows_code: use std::io::Error to properly set winerror attribute on OSError - EnumKey: use os_error_from_windows_code for proper error
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agentsIn `@crates/vm/src/stdlib/winreg.rs`:
- Around line 1058-1063: The RegSetValueExW call in the SetValueEx path
currently returns Err(vm.new_os_error(format!("error code: {res}"))) on nonzero
res; change this to use os_error_from_windows_code(vm, res as i32) so the
Windows error description is preserved (locate the Registry::RegSetValueExW
invocation and replace the vm.new_os_error path with
os_error_from_windows_code(vm, res as i32), matching the pattern used in
EnumKey, OpenKey, and SetValue).
crates/vm/src/stdlib/winreg.rs (1)297-297: Consider migrating remaining error sites to os_error_from_windows_code for consistency.
Several unchanged call sites (e.g., ConnectRegistry, CreateKey, CreateKeyEx, DeleteKey, FlushKey, LoadKey, CloseKey, etc.) still use vm.new_os_error(format!("error code: {res}")), which produces bare numeric error codes instead of human-readable Windows error messages. A follow-up pass to unify these would improve the user experience across all registry operations.
Sorry, something went wrong.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_launcher.py dependencies: dependent tests: (no tests depend on launcher) [x] lib: cpython/Lib/urllib dependencies:
dependent tests: (27 tests)
[x] test: cpython/Lib/test/test_winreg.py dependencies: dependent tests: (3 tests)
Legend:
|
Sorry, something went wrong.
* Fix winreg SetValueEx and OSError winerror attribute - SetValueEx: accept None for value_name (default registry value) - os_error_from_windows_code: use std::io::Error to properly set winerror attribute on OSError - EnumKey: use os_error_from_windows_code for proper error * Update test_launcher from v3.14.3 * Update test_winreg from v3.14.3 * Update crates/vm/src/stdlib/winreg.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: CPython Developers <> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Summary by CodeRabbit