Skip to content

Add relaxed serializer input mode - #121

Merged
pavel-kirienko merged 3 commits into
masterfrom
dev
Jul 15, 2026
Merged

pavel-kirienko merged 3 commits into
masterfrom
dev

Conversation

@pavel-kirienko

Copy link
Copy Markdown
Member

Summary

  • add an opt-in relaxed mode to serialize() for positional structure values
  • allow direct values for single-field structures with recursive normalization
  • preserve explicit dictionary selection for tagged unions
  • reject excess positional values instead of silently dropping input
  • keep strict dictionary behavior unchanged by default

Validation

  • pytest -q: 405 passed
  • pytest pydsdl/_test_serdes.py -q: 316 passed
  • nox -s lint-3.14: MyPy, Pylint, and Black passed

Removed the common usage error checks and associated function.
Remove the obsolete unit test that exercised the deleted common-usage diagnostic helper, along with its now-unused Callable import. This keeps the co-located test suite and static analysis aligned with the intentional behavior change.\n\nBump the package version from 1.25.0.rc0 to 1.25.0.rc1 so the updated release candidate can be built and tagged without colliding with the prior version.
Introduce an opt-in schema-aware normalization pass for serialize() so CLI-oriented callers can provide positional structure values and direct values for single-field structures. The conversion is recursive across nested composites, arrays, and delimited types while tagged unions retain explicit variant selection.\n\nKeep the existing strict dictionary behavior as the default, reject excess positional input to avoid silently dropping user data, and cover the recursive precedence rules and compatibility behavior with focused tests.
@pavel-kirienko
pavel-kirienko marked this pull request as ready for review July 15, 2026 16:13
@pavel-kirienko
pavel-kirienko merged commit 0ae14b9 into master Jul 15, 2026
15 checks passed
@pavel-kirienko
pavel-kirienko deleted the dev branch July 15, 2026 16:17
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