Skip to content

Fixed Delta serialization when None type is present. #225

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

Merged
merged 3 commits into from
Jan 15, 2021
Merged

Fixed Delta serialization when None type is present. #225

merged 3 commits into from
Jan 15, 2021

Conversation

seperman
Copy link
Owner

Fixed Delta serialization when None type is present.
Fixes #224

@codecov-io
Copy link

Codecov Report

Merging #225 (c96ce4e) into master (b971eac) will decrease coverage by 0.03%.
The diff coverage is 96.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
- Coverage   99.63%   99.60%   -0.04%     
==========================================
  Files          13       13              
  Lines        2733     2753      +20     
==========================================
+ Hits         2723     2742      +19     
- Misses         10       11       +1     
Impacted Files Coverage Δ
deepdiff/delta.py 99.69% <75.00%> (-0.31%) ⬇️
deepdiff/commands.py 100.00% <100.00%> (ø)
deepdiff/serialization.py 97.83% <100.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b971eac...c96ce4e. Read the comment docs.

@@ -254,10 +256,40 @@ def find_class(self, module, name):
# Forbid everything else.
raise ForbiddenModule(FORBIDDEN_MODULE_MSG.format(module_dot_class)) from None

def persistent_load(self, persistent_id):
if persistent_id == "<<NoneType>>":
Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm not super happy with this solution but I didn't find a better solution to the problem.

@seperman seperman merged commit c6fa94f into master Jan 15, 2021
@seperman seperman deleted the dev branch January 15, 2021 03:16
@seperman seperman restored the dev branch January 15, 2021 03: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.

Any None value make Delta non safely serializable
2 participants