You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
). It breaks for the way we package software with bazel where modules in the third party packages do not have 'site-packages' in their path. We are able to run it with the following patch (with pypi__ being a substring in our third party packages)
diff --git a/dill/_dill.py b/dill/_dill.py
index d52c486..13c6258 100644
--- a/dill/_dill.py+++ b/dill/_dill.py@@ -1247,7 +1247,7 @@ def save_module(pickler, obj):
"prefix", "real_prefix"]
builtin_mod = any([obj.__file__.startswith(os.path.normpath(getattr(sys, name)))
for name in names if hasattr(sys, name)])
- builtin_mod = builtin_mod or 'site-packages' in obj.__file__+ builtin_mod = builtin_mod or 'pypi__' in obj.__file__ or 'site-packages' in obj.__file__
else:
builtin_mod = True
if obj.__name__ not in ("builtins", "dill") \
Is it possible to not depend on the module path here?
The text was updated successfully, but these errors were encountered:
dill.dumps tries to detect if the object is from a builtin (or an installed package?) by looking for 'site-packages' in module path (
dill/dill/_dill.py
Line 1268 in a2e2a59
Is it possible to not depend on the module path here?
The text was updated successfully, but these errors were encountered: