Skip to content

Upgrade rand ecosystem: rand 0.10, rand_core 0.10, getrandom 0.4, mt19937 3.3#7179

Draft
Copilot wants to merge 5 commits intodependabot/cargo/rand-0.10.0from
copilot/sub-pr-7064
Draft

Upgrade rand ecosystem: rand 0.10, rand_core 0.10, getrandom 0.4, mt19937 3.3#7179
Copilot wants to merge 5 commits intodependabot/cargo/rand-0.10.0from
copilot/sub-pr-7064

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

  • Update mt19937 from 3.1 to 3.3.0 in crates/stdlib/Cargo.toml
  • Update rand_core from 0.9 to 0.10.0 in workspace dependencies
  • Update getrandom from 0.3 to 0.4 with sys_rng feature
  • Update random.rs to use new rand_core 0.10 API
  • Fix rand 0.10 API usage in literal crate (RngExt trait)
  • Fix WASM build by enabling wasm_js feature for all getrandom versions
  • Test the build to ensure it passes
  • Run cargo clippy to check for any linting issues
  • Run tests to verify functionality
  • Request code review - no issues found
  • Fix CI failures

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

dependabot bot and others added 2 commits February 17, 2026 00:51
Bumps [rand](https://github.com/rust-random/rand) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@rand_core-0.9.2...0.10.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
- Update getrandom from 0.3 to 0.4 with sys_rng feature
- Update rand_core from 0.9 to 0.10.0 (removed os_rng feature)
- Update mt19937 from 3.1 to 3.3.0
- Update random.rs to use new rand_core 0.10 API (Rng trait, try_from_rng)
- Use getrandom::SysRng instead of deprecated os_rng feature

Co-authored-by: youknowone <[email protected]>
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/repos/arihant2math/tkinter/commits/v0.2.0
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo update 64-REDACTED-linux-gnu/lib/libstd_detect-27563b08da68095e.rlib 64-REDACTED-linux-gnu/lib/libhashbrown-77a21fecb79c0678.rlib 64-u�� 64-REDACTED-linux-gnu/lib/libminiz_oxide-7aaf0cb5e2293c31.rlib 64-REDACTED-linux-gnu/lib/libadler2-1f550d986488a3fd.rlib k/_temp/ghcca-node/node/bin/grep (http block)
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo update (http block)
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo update /tmp/test_rand_core/target/debug/deps/test_rand_core-876d24af10c61061.5eovyvit7d4uwj111vmtt1hym.1kaazm6.rcgu.o /tmp/test_rand_core/target/debug/deps/test_rand_core-876d24af10c61061.5medws9ihgkx9524rr33px5t5.1kaazm6.rcgu.o /tmp/test_rand_core/target/debug/deps/test_rand_core-876d24af10c61061.697vyxxcv9bsb6xdh8mie77hr.1kaazm6.rcgu.o /tmp/test_rand_core/target/debug/deps/test_rand_core-876d24af10c61061.73lcuks0s5y3pq2g640jyclju.1kaazm6.rcgu.o m1xvle749nxl2ql.0juozw4.rcgu.o f6cywxg3m0fqxpg.0juozw4.rcgu.o asi3zvcy9560iv2.0juozw4.rcgu.o yjldx2fj70joglm.0juozw4.rcgu.o uoa5tno73wsp1gh.0juozw4.rcgu.o zz7hkz7etzp5w0x.0juozw4.rcgu.o qgn6x3h67q0y0tb.0juozw4.rcgu.o lsictldv9rb7vp7.0juozw4.rcgu.o 4uwj111vmtt1hym.0juozw4.rcgu.o kx9524rr33px5t5.0juozw4.rcgu.o bsb6xdh8mie77hr.0juozw4.rcgu.o y3pq2g640jyclju.0juozw4.rcgu.o e79hhql8u89ct08.0juozw4.rcgu.o wgaioq4ss1n7xxu.0juozw4.rcgu.o (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 rand dependency from 0.9.2 to 0.10.0 Upgrade rand ecosystem: rand 0.10, rand_core 0.10, getrandom 0.4, mt19937 3.3 Feb 17, 2026
Copilot AI requested a review from youknowone February 17, 2026 03:35
@youknowone
Copy link
Member

@copilot check the CI failures

Change from rand::Rng to rand::RngExt to match rand 0.10 API where the
random() method is provided by RngExt trait instead of Rng trait.

Co-authored-by: youknowone <[email protected]>
Copy link
Contributor Author

Copilot AI commented Feb 17, 2026

@copilot check the CI failures

Fixed CI failure in crates/literal/src/float.rs test. The issue was using rand::Rng instead of rand::RngExt - the random() method moved to the RngExt trait in rand 0.10. (214eeb4)

@youknowone
Copy link
Member

@copilot

also fix wasm build:

error: The "wasm_js" backend requires the `wasm_js` feature for `getrandom`. For more information see: https://docs.rs/getrandom/0.3.4/#webassembly-support
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/src/backends.rs:40:17
   |
40 | /                 compile_error!(concat!(
41 | |                     "The \"wasm_js\" backend requires the `wasm_js` feature \
42 | |                     for `getrandom`. For more information see: \
43 | |                     https://docs.rs/getrandom/", env!("CARGO_PKG_VERSION"), "/#webassembly-support"
44 | |                 ));
   | |__________________^

error[E0425]: cannot find function `fill_inner` in module `backends`
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/src/lib.rs:99:19
   |
99 |         backends::fill_inner(dest)?;
   |                   ^^^^^^^^^^ not found in `backends`

error[E0425]: cannot find function `inner_u32` in module `backends`
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/src/lib.rs:123:15
    |
123 |     backends::inner_u32()
    |               ^^^^^^^^^ not found in `backends`
    |
help: consider importing this function
    |
 33 + use crate::util::inner_u32;
    |
help: if you import `inner_u32`, refer to it directly
    |
123 -     backends::inner_u32()
123 +     inner_u32()
    |

error[E0425]: cannot find function `inner_u64` in module `backends`
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.4/src/lib.rs:137:15
    |
137 |     backends::inner_u64()
    |               ^^^^^^^^^ not found in `backends`
    |
help: consider importing this function
    |
 33 + use crate::util::inner_u64;
    |
help: if you import `inner_u64`, refer to it directly
    |
137 -     backends::inner_u64()
137 +     inner_u64()
    |

Add getrandom 0.3 as explicit dependency in rustpython-common to ensure
wasm_js feature is enabled for all getrandom 0.3 users (e.g., ahash).
Also enable wasm_js feature in workspace getrandom 0.4 dependency.

Co-authored-by: youknowone <[email protected]>
Copy link
Contributor Author

Copilot AI commented Feb 17, 2026

@copilot

also fix wasm build:
...

Fixed WASM build. The issue was that ahash depends on getrandom 0.3, which needs the wasm_js feature enabled for WASM targets. Added explicit getrandom 0.3 dependency to rustpython-common with wasm_js feature enabled when building for WASM. (a295c83)

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:

  • https://api.github.com/repos/arihant2math/tkinter/commits/v0.2.0
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo update c_macro2-b35e300--noprofile code_ident-e31bfopt-level=3 lib/�� lib/rustlib/x86_embed-bitcode=no lib/rustlib/x86_-C ebug/build/unicodebuginfo=2 py_derive-5f267dbash py_derive-5f267d--norc py_derive-5f267d--noprofile py_derive-5f267d8cd3a42d1b.zerocopy_derive.5fea49fc34867fd0-cgu.03.rcgu.o py_d�� py_derive-5f267d8cd3a42d1b.zerocopy_derive.5fea49fc34867fd0-cgu.05.rcgu.o py_derive-5f267d8cd3a42d1b.zerocopy_derive.5fea49fc34867fd0-cgu.06.rcgu.o bin/cargo py_derive-5f267dbash py_derive-5f267d--norc py_derive-5f267d--noprofile bin/cargo (http block)

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

@dependabot dependabot bot force-pushed the dependabot/cargo/rand-0.10.0 branch from 9814429 to 70d2bd3 Compare February 17, 2026 11:04
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