@@ -1000,7 +1000,8 @@ def exec_module(self, module):
10001000 if code is None :
10011001 raise ImportError (f'cannot load module { module .__name__ !r} when '
10021002 'get_code() returns None' )
1003- _bootstrap ._call_with_frames_removed (exec , code , module .__dict__ )
1003+ # GraalPy change: we don't need _call_with_frames_removed
1004+ exec (code , module .__dict__ )
10041005
10051006 def load_module (self , fullname ):
10061007 """This method is deprecated."""
@@ -1064,7 +1065,8 @@ def source_to_code(self, data, path, *, _optimize=-1):
10641065
10651066 The 'data' argument can be any object type that compile() supports.
10661067 """
1067- return _bootstrap ._call_with_frames_removed (compile , data , path , 'exec' ,
1068+ # GraalPy change: we don't need _call_with_frames_removed
1069+ return compile (data , path , 'exec' ,
10681070 dont_inherit = True , optimize = _optimize )
10691071
10701072 def get_code (self , fullname ):
@@ -1294,15 +1296,15 @@ def __hash__(self):
12941296
12951297 def create_module (self , spec ):
12961298 """Create an uninitialized extension module"""
1297- module = _bootstrap . _call_with_frames_removed (
1298- _imp .create_dynamic , spec )
1299+ # GraalPy change: we don't need _call_with_frames_removed
1300+ module = _imp .create_dynamic ( spec )
12991301 _bootstrap ._verbose_message ('extension module {!r} loaded from {!r}' ,
13001302 spec .name , self .path )
13011303 return module
13021304
13031305 def exec_module (self , module ):
13041306 """Initialize an extension module"""
1305- _bootstrap . _call_with_frames_removed ( _imp .exec_dynamic , module )
1307+ _imp .exec_dynamic ( module )
13061308 _bootstrap ._verbose_message ('extension module {!r} executed from {!r}' ,
13071309 self .name , self .path )
13081310
0 commit comments