fix #244: remove @dataclass from MigrationError #266
No reviewers
Labels
No labels
blocked:children
blocked:commit-ready-failed
blocked:depends-231
blocked:depends-236
blocked:depends-237
blocked:depends-238
blocked:depends-239
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:preflight
blocked:verify-failed
bug
enhancement
feature-request
high-priority
in-progress
lint-cleanup
needs-decompose
needs-triage
ops-retry
ops-task
phase-5
quickfix
security/medium
self-building
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/mesh-seed!266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/mesh-seed-244-dataclass-migrationerror"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Remove
@dataclassdecorator fromMigrationError(Exception)insubstrate/ledger/migrations.py:118.Problem
MigrationErrorbase class is decorated with@dataclass, which generates an__init__that accepts onlyself. Subclasses (MigrationDriftError,UnknownMigrationError,ChecksumMismatchError) callsuper().__init__(message), which fails with:This breaks drift detection —
db_migrate verifyraises TypeError instead of MigrationDriftError.Fix
Remove the
@dataclassdecorator. The subclasses set instance attributes manually already.Verification
Closes #244