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

Do not store cached hash value when pickling #287

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

matthiasdiener
Copy link
Contributor

@matthiasdiener matthiasdiener commented Dec 6, 2023

Fixes #284.

@matthiasdiener
Copy link
Contributor Author

This is ready for a first look @corenting. If you like, I could add a test for this (similar to https://github.com/matthiasdiener/orderedsets/blob/main/test/test_pickle.py)

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c9504d0) 100.00% compared to head (f3ca52d) 98.63%.

Files Patch % Lines
immutabledict/__init__.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master     #287      +/-   ##
===========================================
- Coverage   100.00%   98.63%   -1.37%     
===========================================
  Files            1        1              
  Lines           71       73       +2     
===========================================
+ Hits            71       72       +1     
- Misses           0        1       +1     
Flag Coverage Δ
3.10 98.63% <50.00%> (-1.37%) ⬇️
3.11 98.63% <50.00%> (-1.37%) ⬇️
3.12 98.63% <50.00%> (-1.37%) ⬇️
3.8 98.63% <50.00%> (-1.37%) ⬇️
3.9 98.63% <50.00%> (-1.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@corenting
Copy link
Owner

Thanks for the MR and for spotting the issue.
I will take a look asap.

@matthiasdiener
Copy link
Contributor Author

Thanks @corenting ! Here is a test that could be added to this PR if you like: 2c4ac85. It fails with master, but passes with this PR.

@corenting corenting marked this pull request as ready for review December 9, 2023 08:58
@corenting corenting self-requested a review as a code owner December 9, 2023 08:58
@corenting corenting merged commit 1d9225d into corenting:master Dec 16, 2023
9 of 11 checks passed
@matthiasdiener matthiasdiener deleted the pickle-reduce branch January 4, 2024 12:48
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.

Pickling / Unpickling leads to inconsistent hash value
2 participants