Skip to content

Remove legacy semantics at linopy 1.0 (Stage 3) #846

Description

@FBumann

Note

The following was generated by AI.

Tracks the final Stage 3 of the v1 arithmetic-convention rollout (opt-in → default → 1.0): remove legacy semantics entirely, leaving only v1.

Prerequisite

  • v1 is the defaultMake v1 the default arithmetic convention (Stage 2) #845. Legacy stays reachable via options["semantics"] = "legacy" from the default flip (a pre-1.0 minor) through to 1.0 — however many minors that spans; this issue removes it at 1.0. Removing a documented opt-out is a breaking change, so it rides the 1.0 major.

The strip (at 1.0)

A dependency-ordered, mostly-mechanical checklist already exists in
arithmetics-design/legacy-removal.md. grep "LEGACY: remove at 1.0" finds
every inline marker. In summary:

  • Drop the semantics option, is_v1(), LinopySemanticsWarning, and every legacy warn/branch (config, semantics, expressions, variables, constraints).
  • Collapse the *_v1 / *_legacy method pairs into single implementations.
  • Remove the MultiIndex machinery kept alive only for legacy — the alignment.py level-projection subsystem, netcdf MI (de)serialize, assign_multiindex_safe, and the scattered isinstance(..., pd.MultiIndex) guards.
  • Drop the legacy side of the test matrix (the pytest.mark.legacy cases and the dual-semantics parametrization).

Docs

  • Re-frame arithmetics-design/convention.md / goals.md — drop the "v1"/legacy framing once there is only one convention.

Full checklist: arithmetics-design/legacy-removal.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions