Category: deprecated API (6 code sites) — linopy 0.8 deprecation, orthogonal to the semantics flag but blocks the build
Symptom
Under linopy 0.8, augmenting a constraint via the .lhs/.rhs setter emits:
DeprecationWarning: Constraint.lhs setter is deprecated and will be removed in
a future release; use Constraint.update(lhs=...) instead.
pyproject.toml escalates DeprecationWarning from the flixopt module to an error (error::DeprecationWarning:flixopt), so every model build aborts here before any semantics arithmetic even runs.
Location
flixopt/components.py TransmissionModel — con_transmission.lhs += ...
flixopt/features.py ShareAllocationModel — _eq_total.lhs -= ... (×3), share_constraints[name].lhs -= ...
flixopt/elements.py BusModel — eq_bus_balance.lhs += ...
Root cause
linopy 0.8 makes Constraint.update(...) the single mutation API and deprecates the .lhs/.rhs setters (the getters are fine).
Repro
Any effect/bus/transmission model build under linopy 0.8 with flixopt's strict pytest filterwarnings.
Proposed fix
con.lhs += expr → con.update(lhs=con.lhs + expr). Works on linopy 0.8; equivalent under both semantics.
Severity
Build-breaking under linopy 0.8 (via flixopt's warning-as-error config). Not a v1-semantics rule per se, but a prerequisite for running under the v1-capable linopy.
Fixed in #729.
Category: deprecated API (6 code sites) — linopy 0.8 deprecation, orthogonal to the semantics flag but blocks the build
Symptom
Under linopy 0.8, augmenting a constraint via the
.lhs/.rhssetter emits:pyproject.tomlescalatesDeprecationWarningfrom theflixoptmodule to an error (error::DeprecationWarning:flixopt), so every model build aborts here before any semantics arithmetic even runs.Location
flixopt/components.pyTransmissionModel—con_transmission.lhs += ...flixopt/features.pyShareAllocationModel—_eq_total.lhs -= ...(×3),share_constraints[name].lhs -= ...flixopt/elements.pyBusModel—eq_bus_balance.lhs += ...Root cause
linopy 0.8 makes
Constraint.update(...)the single mutation API and deprecates the.lhs/.rhssetters (the getters are fine).Repro
Any effect/bus/transmission model build under linopy 0.8 with flixopt's strict pytest
filterwarnings.Proposed fix
con.lhs += expr→con.update(lhs=con.lhs + expr). Works on linopy 0.8; equivalent under both semantics.Severity
Build-breaking under linopy 0.8 (via flixopt's warning-as-error config). Not a v1-semantics rule per se, but a prerequisite for running under the v1-capable linopy.
Fixed in #729.