Use correct dirs crate; drop uname for rustix#7906
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughUpgrades workspace ChangesSystem dependency and uname migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/vm/src/stdlib/posix.rs`:
- Around line 1282-1283: The code maps errors from
rustpython_host_env::posix::uname_info() to vm.new_unicode_encode_error, but
this path is decoding OS bytes and should raise UnicodeDecodeError instead;
update the mapping to call vm.new_unicode_decode_error(err.to_string())
(mirroring the getlogin() handling) so Utf8Error is surfaced as a
UnicodeDecodeError, keeping the same error text and propagation semantics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: c292b93c-a588-4a4a-8bb7-9bbf959ea083
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
Cargo.tomlcrates/host_env/Cargo.tomlcrates/host_env/src/posix.rscrates/vm/src/stdlib/posix.rs
💤 Files with no reviewable changes (1)
- crates/host_env/Cargo.toml
RustPython used an ancient, unmaintained version of the `dirs` crate. This pulled in `winapi-rs` on Windows, which is an old crate that has been deprecated in favor of `windows-rs`. `windows-rs` is maintained by Microsoft. Bumping `dirs` to the latest version removes more `winapi-rs` from Cargo.lock. As for `uname`, `rustix` handles it safely so the additional crate isn't needed.
1085c9c to
d813ce5
Compare
RustPython used an ancient, unmaintained version of the
dirscrate. This pulled inwinapi-rson Windows, which is an old crate that has been deprecated in favor ofwindows-rs.windows-rsis maintained by Microsoft. Bumpingdirsto the latest version removes morewinapi-rsfrom Cargo.lock.As for
uname,rustixhandles it safely so the additional crate isn't needed.Summary by CodeRabbit
Chores
Refactor