Explorar o código

Merge pull request #98 from rolando-contrib/fix-pickle-protocol

Fix pickling protocol to use highest available.
Sean J. Taylor %!s(int64=8) %!d(string=hai) anos
pai
achega
c22294e1c4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      python/setup.py

+ 1 - 1
python/setup.py

@@ -31,7 +31,7 @@ class BuildPyCommand(build_py):
                 model_code = f.read()
             sm = StanModel(model_code=model_code)
             with open(os.path.join(target_dir, '{}_growth.pkl'.format(model_type)), 'wb') as f:
-                pickle.dump(sm, f)
+                pickle.dump(sm, f, protocol=pickle.HIGHEST_PROTOCOL)
 
 class TestCommand(test_command):
     """We must run tests on the build directory, not source."""