[FIX] Explicitly define the protocol version for pickling #4388
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_PROTOCOL
and 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__.py
as we don't need to make the base classes publicly visible in a top level module.Orange.data
even hadFlags
imported twice into its namespace, since it was provided byio_base
and later overwritten byfrom .io import *
Includes