Skip to content

Fix deprecation warnings#68

Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude:fix-deprecation-warnings
Feb 8, 2026
Merged

Fix deprecation warnings#68
ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude:fix-deprecation-warnings

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Replace Random.GLOBAL_RNG with Random.default_rng() in all 3 call sites (count_rand, ad_rand, pois_rand)
  • Random.GLOBAL_RNG is not exported from Random and is not part of the public API. Random.default_rng() is the supported public interface
  • Both return TaskLocalRNG on Julia 1.10+, so this is a no-op behavior change but future-proofs against GLOBAL_RNG being deprecated

Test plan

  • All tests pass with JULIA_DEPWARN=error on Julia 1.12.4
  • Aqua, JET, ExplicitImports, AllocCheck, and statistical tests all pass
  • Runic formatting check passes

Upstream deps needing fixes

  • None identified — all upstream dependencies (LogExpFunctions, PrecompileTools, Distributions, etc.) pass cleanly with JULIA_DEPWARN=error

🤖 Generated with Claude Code

Random.GLOBAL_RNG is not exported from Random and is not part of the
public API. Replace with Random.default_rng() which is the supported
public interface. Both return TaskLocalRNG on modern Julia versions,
so this is a no-op behavior change but future-proofs against
GLOBAL_RNG being deprecated.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 931f50a into SciML:master Feb 8, 2026
8 of 13 checks passed
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.

3 participants