Remove legacy semantics at linopy 1.0 (Stage 3)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend, documentation, testing
Research direction
Start with arithmetics-design/legacy-removal.md and run grep "LEGACY: remove at 1.0" to map the dependency-ordered work. Check the v1 default prerequisite in #845, then review the listed config, semantics, expressions, variables, constraints, alignment.py, netcdf MultiIndex handling, and tests. Done means legacy semantics and framing are removed and the remaining test matrix passes.
Written by the indexing model from the issue text.
Description
[!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 default — #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
semanticsoption,is_v1(),LinopySemanticsWarning, and every legacy warn/branch (config, semantics, expressions, variables, constraints). - Collapse the
*_v1/*_legacymethod pairs into single implementations. - Remove the MultiIndex machinery kept alive only for legacy — the
alignment.pylevel-projection subsystem, netcdf MI (de)serialize,assign_multiindex_safe, and the scatteredisinstance(..., pd.MultiIndex)guards. - Drop the legacy side of the test matrix (the
pytest.mark.legacycases 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.
- Dominant language
- Python
- Stars
- 257
- Forks
- 87
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 32
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PyPSA/linopy
-
bug solver interface
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
performance sparse
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
documentation sparse
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
enhancement sparse
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Make the sparse path observable and controllable (.is_sparse, densify warning, per-call sparse=) Openenhancement sparse
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
area: harness bug status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Human-Agent-Society/reef#625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
learningequality/kolibri#15351 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Name consistency Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eellak/triplestore#65 · 1 comment ·