File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
graalpython/lib-graalpython Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- # Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2
2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
3
#
4
4
# The Universal Permissive License (UPL), Version 1.0
42
42
43
43
_imp .cache_all_file_modules ()
44
44
45
- from importlib ._bootstrap import _spec_from_module
45
+ from importlib ._bootstrap import BuiltinImporter
46
46
for name in ['importlib._bootstrap' , 'importlib._bootstrap_external' , '_descriptor' ]:
47
47
mod = sys .modules .get (name , None )
48
48
if mod :
49
- setattr (mod , '__spec__' , _spec_from_module (mod ))
49
+ spec = BuiltinImporter .find_spec (name )
50
+ setattr (mod , '__spec__' , spec )
51
+ setattr (mod , '__loader__' , spec .loader )
You can’t perform that action at this time.
0 commit comments