[FIX] Explicitly define the protocol version for pickling#4388
Merged
janezd merged 1 commit intobiolab:masterfrom Feb 1, 2020
Merged
[FIX] Explicitly define the protocol version for pickling#4388janezd merged 1 commit intobiolab:masterfrom
janezd merged 1 commit intobiolab:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4388 +/- ##
==========================================
+ Coverage 87.13% 87.13% +<.01%
==========================================
Files 399 399
Lines 72960 72961 +1
==========================================
+ Hits 63577 63578 +1
Misses 9383 9383 |
This was referenced Jun 26, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Data saved in pickle format in python 3.8 was not readable on older versions of python.
Description of changes
Define a new constant
PICKLE_PROTOCOLand fix it to a specific version (4, as was used now on py3.6 & py3.7). Use it instead of pickle.HIGHEST_PROTOCOL, which became 5 in py3.8.Disclaimer: I also removed
from .io_base import *indata/__init__.pyas we don't need to make the base classes publicly visible in a top level module.Orange.dataeven hadFlagsimported twice into its namespace, since it was provided byio_baseand later overwritten byfrom .io import *Includes