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

[FIX] Explicitly define the protocol version for pickling #4388

Merged
merged 1 commit into from
Feb 1, 2020

Conversation

lanzagar
Copy link
Contributor

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 * in data/__init__.py as we don't need to make the base classes publicly visible in a top level module. Orange.data even had Flags imported twice into its namespace, since it was provided by io_base and later overwritten by from .io import *

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jan 31, 2020

Codecov Report

Merging #4388 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4388      +/-   ##
==========================================
+ Coverage   87.13%   87.13%   +<.01%     
==========================================
  Files         399      399              
  Lines       72960    72961       +1     
==========================================
+ Hits        63577    63578       +1     
  Misses       9383     9383

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.

2 participants