Fix deprecation warnings from ModelingToolkitBase#1395
Merged
ChrisRackauckas merged 3 commits intoSciML:masterfrom Feb 9, 2026
Merged
Fix deprecation warnings from ModelingToolkitBase#1395ChrisRackauckas merged 3 commits intoSciML:masterfrom
ChrisRackauckas merged 3 commits intoSciML:masterfrom
Conversation
Replace deprecated `NonlinearSystem(...)` constructor with `MT.System(...)`
in `ss_ode_model`, matching the pattern already used by `ode_model` and
`sde_model`. Update test code that called `ODEProblem`, `NonlinearProblem`,
and `SteadyStateProblem` on compiled MTK systems with separate `u0` and `p`
arguments to use the merged `merge(Dict(u0), Dict(p))` form.
Source changes:
- `ss_ode_model`: `NonlinearSystem(eqs, us, ps; ...)` → `MT.System(eqs, us, ps; ...)`
- `spatial_convert_err` call: `NonlinearSystem` → `MT.System`
- Updated docstrings and error messages referencing `NonlinearSystem`
Test changes:
- `component_based_model_creation.jl`: merge u0/p for direct MTK system calls
- `conservation_laws.jl`: merge u0/p for NonlinearProblem{true} and
SteadyStateProblem{true} calls on MTK systems
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
isaacsas
requested changes
Feb 8, 2026
Co-authored-by: Sam Isaacson <[email protected]>
Co-authored-by: Sam Isaacson <[email protected]>
isaacsas
approved these changes
Feb 9, 2026
Member
isaacsas
left a comment
There was a problem hiding this comment.
Assuming tests pass this looks good to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NonlinearSystem(...)constructor withMT.System(...)inss_ode_model, matching the pattern already used byode_modelandsde_modelODEProblem,NonlinearProblem, andSteadyStateProblemon compiled MTK systems with separateu0andparguments to use the mergedmerge(Dict(u0), Dict(p))formNonlinearSystemtypeDeprecation warnings fixed
These warnings were appearing in CI logs (visible with
--depwarn=yes):NonlinearSystem(args...; kwargs...)is deprecated, useSystem(args...; kwargs...)instead — fromsrc/reactionsystem_conversions.jl:850inss_ode_model. Fixed by replacingNonlinearSystem(eqs, us, ps; ...)withMT.System(eqs, us, ps; ...).SciMLBase.ODEProblem(sys, u0, tspan, p; kw...)is deprecated — from test code incomponent_based_model_creation.jlcallingODEProblemdirectly on compiled MTK systems with separate u0 and p. Fixed by merging u0 and p into a single dict.SciMLBase.NonlinearProblem{true}(sys, u0, p; kw...)is deprecated — from test code inconservation_laws.jl. Fixed by merging u0 and p.SciMLBase.SteadyStateProblem{true}(sys, u0, p; kw...)is deprecated — from test code inconservation_laws.jl. Fixed by merging u0 and p.Not addressed (upstream)
The
alg_eqskeyword deprecation warning in the Hybrid test group originates from insideModelingToolkitBase'scallbacks.jl(AffectSystemconstructor) and cannot be fixed on the Catalyst side.Test plan
ss_ode_modelreturnsSystemtype, problem constructors work🤖 Generated with Claude Code