Skip to content

Replace serde with stdlib dataclasses (v2.0.0)#63

Merged
dannywillems merged 2 commits intomainfrom
feature/replace-serde-with-dataclasses
Mar 16, 2026
Merged

Replace serde with stdlib dataclasses (v2.0.0)#63
dannywillems merged 2 commits intomainfrom
feature/replace-serde-with-dataclasses

Conversation

@dannywillems
Copy link
Copy Markdown
Contributor

Summary

  • BREAKING: Replace unmaintained serde library with Python stdlib dataclasses. Custom Model base class provides the same from_dict()/to_dict() API with identical serialization behavior.
  • Remove serde dependency (zero runtime dependencies now).
  • Export ValidationError from l9format package directly.
  • Add Python 3.14 to CI test matrix.
  • Bump version to 2.0.0.

Test plan

  • All 66 existing tests pass (format, lint, typecheck, pytest, pip-audit)
  • Verify CI passes on all Python versions (3.11, 3.12, 3.13, 3.14)
  • Verify round-trip serialization matches previous behavior

The serde library is unmaintained. Replace it with Python stdlib
dataclasses and a custom Model base class that provides the same
from_dict()/to_dict() API with identical behavior:
- Optional fields omitted from to_dict() when None
- Extra/unknown fields silently ignored
- ValidationError on missing required fields

Also adds Python 3.14 to CI matrix and removes serde-specific
mypy overrides.
@dannywillems dannywillems force-pushed the feature/replace-serde-with-dataclasses branch from 9961a44 to 740ce1d Compare March 16, 2026 17:03
@dannywillems dannywillems merged commit d4bef53 into main Mar 16, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant