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

Python: rework OutputId so it works in deserialization #2048

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

Thoralf-M
Copy link
Member

Description of change

Python: rework OutputId so it works in deserialization

Links to any relevant issues

Fixes #2020

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested

Running tests

@Thoralf-M Thoralf-M marked this pull request as ready for review February 22, 2024 14:03
@Thoralf-M Thoralf-M linked an issue Feb 22, 2024 that may be closed by this pull request
DaughterOfMars
DaughterOfMars previously approved these changes Feb 22, 2024
Copy link

@DaughterOfMars DaughterOfMars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine I guess. What was the reason it wouldn't work as a class with two fields?

@Thoralf-M
Copy link
Member Author

This is fine I guess. What was the reason it wouldn't work as a class with two fields?

Because it needs to be a dict for multiple fields and then it fails to deserialize because the field in the data is just a string AttributeError: 'str' object has no attribute 'keys'
This could probably also solved in some other way with a custom deserialization method, but didn't found how this can be done and to me this now also seems to be cleaner overall

Alex6323
Alex6323 previously approved these changes Feb 23, 2024
@thibault-martinez thibault-martinez merged commit b4daa53 into iotaledger:2.0 Feb 23, 2024
9 checks passed
@Thoralf-M Thoralf-M deleted the python-rework-OutputId branch February 23, 2024 10:07
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.

Fix Python OutputId deserialization
4 participants