Skip to content

Fix getrandom 0.4.1 compatibility in random module#7180

Closed
Copilot wants to merge 3 commits intodependabot/cargo/getrandom-0.4.1from
copilot/sub-pr-6993
Closed

Fix getrandom 0.4.1 compatibility in random module#7180
Copilot wants to merge 3 commits intodependabot/cargo/getrandom-0.4.1from
copilot/sub-pr-6993

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

The getrandom 0.4.1 upgrade broke the build due to incompatible error type conversions in the random module. The mt19937 crate returns getrandom 0.3.x errors, but the code attempted to convert them using From<getrandom::Error> which is not compatible across versions.

Changes

  • crates/stdlib/src/random.rs:64: Replace std::io::Error::from(e) with std::io::Error::other(e.to_string())
 None => MT19937::try_from_os_rng()
-    .map_err(|e| std::io::Error::from(e).to_pyexception(vm))?,
+    .map_err(|e| std::io::Error::other(e.to_string()).to_pyexception(vm))?,

The std::io::Error::other() method accepts any Display type, making it version-agnostic for error conversions.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Feb 17, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.rs
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr view 6993 --json statusCheckRollup (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update getrandom from 0.3.4 to 0.4.1 Fix getrandom 0.4.1 compatibility in random module Feb 17, 2026
Copilot AI requested a review from youknowone February 17, 2026 05:23
@youknowone youknowone closed this Feb 17, 2026
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

Comments