Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uid cycle deserialization #442

Merged
merged 5 commits into from
Mar 14, 2024
Merged

Fix uid cycle deserialization #442

merged 5 commits into from
Mar 14, 2024

Conversation

InnocentBug
Copy link
Collaborator

Description

Some JSON with cycles broken by UID couldn't be deserialized because the order of UID was not good for the JSON module.

Changes

Store a temporary UIDProxy element if a UID can't be resolved.
After reading in with load_nodes_from_json the proxies are replaced by the nodes if possible.

The type declaration was fixed to nodes before, now UIDProxy objects are permissible.

Known Issues

For the implementation of the Node type hint that is equivalent to Union[Node, UIDProxy] internal implementations of the typing module are used.

Notes

Checklist

  • My name is on the list of contributors (CONTRIBUTORS.md) in the pull request source branch.
  • I have updated the documentation to reflect my changes.
  • My code changes have been verified by automated tests and pass all relevant test scenarios.

@InnocentBug InnocentBug self-assigned this Mar 13, 2024
Copy link

trunk-io bot commented Mar 13, 2024

Merging to develop in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@InnocentBug InnocentBug marked this pull request as ready for review March 13, 2024 22:05
@InnocentBug InnocentBug requested a review from duboyal March 13, 2024 22:05
@InnocentBug InnocentBug merged commit 2eab0cb into iterator Mar 14, 2024
7 checks passed
@InnocentBug InnocentBug deleted the fix-uid-cycles branch March 14, 2024 02:51
InnocentBug added a commit that referenced this pull request Mar 14, 2024
* add untested iterator functionality

* add alphabetical order

* strictly enforce that UUID is a str

* right order of decorators

* fix deepcopy problem

* Fix uid cycle deserialization (#442)
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