Replies: 1 comment 3 replies
-
|
you can take following code as an example: import pyfory
import pickle
fory = pyfory.Fory(ref=True, strict=False)
pickle.dumps = fory.dumps
pickle.loads = fory.loads |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
If fory is so cool, what are the ways to replace pickle with fory globally?
For example, many libraries using
pickle.dumps/pickle.loads, I think it would be nice to monkeypatch it so thatpickle.dumps/pickle.loadsare actuallyfory.dumps/fory.loads.Any reliable ideas of doing so?
The best what I can think of is monkeypatch it in
sitecustomize.pyAlso, I don't really like monkeypatching, maybe there are other alternatives?
PS: Thanks for this cool project!
Beta Was this translation helpful? Give feedback.
All reactions