Skip to content

Commit

Permalink
use dill._dill.__builtin__ instead of builtins for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
leogama committed Jul 22, 2022
1 parent a7d42dd commit 4e381f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dill/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ def load_module_asdict(
>>> new_var in main # would be True if the option 'update' was set
False
"""
import builtins
if 'module' in kwds:
raise TypeError("'module' is an invalid keyword argument for load_module_asdict()")
if hasattr(filename, 'read'):
Expand All @@ -561,7 +560,7 @@ def load_module_asdict(
old_main = _import_module(main_name)
main.__dict__.update(old_main.__dict__)
else:
main.__builtins__ = builtins
main.__builtins__ = _dill.__builtin__
sys.modules[main_name] = main
load_module(file, **kwds)
finally:
Expand Down

0 comments on commit 4e381f9

Please sign in to comment.