You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preserve compatibility with exported LVS model classes
src/ndn/app_support/light_versec/binary.py:70
This replaces the existing exported LVS model classes in place and removes inherited public methods such as encode, parse, and asdict from every class except LvsModel. That is a breaking API change now, despite the PR description saying replacement is deferred; keep binary.py compatible and introduce the dataclass models side-by-side (or provide compatibility methods for all exported classes).
Resolve local forward references when building dataclass schemas
src/ndn/encoding/tlv_model_v2.py:275
Locally declared self-referential dataclasses cannot build a schema: get_type_hints(cls) resolves the forward reference only from module globals, so a field such as child: 'Node | None' raises NameError on the first encode/parse. Supply the class itself as a local namespace (and add a regression test combining local classes with forward references).
Reject digest components when ApplicationParameters are absent
src/ndn/encoding/tlv_model_v2.py:332
This now accepts a ParametersSha256DigestComponent when ##need_digest is false. The v1 encoder rejects that component unless ApplicationParameters are present, because otherwise the Interest carries an unnecessary parameters digest; restore that validation to retain packet-format behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: #97
New wire format is longer but with advantage:
dataclasssupport, such as=,reprandasdict. Also, models can be easily encoded into JSON and other formats for human/subagents to read.Not so good points:
bytesfield could actually holdmemoryview. Need further effort to improve.I plan to replace old model with the new encoding model in a future breaking change. This diff adds new method as extra files for people to review.