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

making it possible to use another package instead of pickle for serialization (e.g. dill) #494

Merged
merged 1 commit into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Compat/serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function serialize_py(s, x::Py)
if pyisnull(x)
serialize(s, nothing)
else
b = pyimport("pickle").dumps(x)
b = pyimport(get(ENV, "JULIA_PYTHONCALL_PICKLE", "pickle")).dumps(x)
serialize(s, pybytes_asvector(b))
end
end
Expand All @@ -16,7 +16,7 @@ function deserialize_py(s)
if v === nothing
pynew()
else
pyimport("pickle").loads(pybytes(v))
pyimport(get(ENV, "JULIA_PYTHONCALL_PICKLE", "pickle")).loads(pybytes(v))
end
end

Expand Down
Loading