lucianopaz / compress_pickle

Standard python pickle, thinly wrapped with standard compression libraries
MIT License
41 stars 10 forks source link

Fix `with open` context manager behavior #34

Closed jungerm2 closed 2 years ago

jungerm2 commented 3 years ago

Suggested fix for issue #33.

I added a quick test case, as a PoC. It actually still fails with zip files, but it's a start.

codecov[bot] commented 3 years ago

Codecov Report

Merging #34 (2ea2ea4) into master (c8d279f) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #34   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          435       436    +1     
=========================================
+ Hits           435       436    +1     
Impacted Files Coverage Δ
compress_pickle/utils.py 100.00% <100.00%> (ø)
jungerm2 commented 3 years ago

The automated checks just confirmed it: the zip issue I was having is a Windows-specific problem. Tests pass fine on my Linux VM, and on Azure.

lucianopaz commented 2 years ago

Thanks for the PR @jungerm2. Since today I've also addressed some other issues that touched the same part of the code base, I've copied your suggestion over in this commit d55b28380c6701a7856a63f5f1818eaf918bf464. I'll close this PR, but I've added you as a co-author of the commit where I copied your suggestion.