30
30
from mozbuild .util import (
31
31
ReadOnlyDict ,
32
32
ReadOnlyNamespace ,
33
- exec_ ,
34
33
memoize ,
35
34
memoized_property ,
36
35
system_encoding ,
@@ -491,7 +490,7 @@ def include_file(self, path):
491
490
source = fh .read ()
492
491
493
492
code = self .get_compiled_source (source , path )
494
- exec_ (code , self )
493
+ exec (code , self )
495
494
496
495
self ._paths .pop (- 1 )
497
496
@@ -1017,21 +1016,21 @@ def _recursively_get_property(self, module, what, wrapped):
1017
1016
@memoized_property
1018
1017
def _wrapped_os (self ):
1019
1018
wrapped_os = {}
1020
- exec_ ("from os import *" , {}, wrapped_os )
1019
+ exec ("from os import *" , {}, wrapped_os )
1021
1020
# Special case os and os.environ so that os.environ is our copy of
1022
1021
# the environment.
1023
1022
wrapped_os ["environ" ] = self ._environ
1024
1023
# Also override some os.path functions with ours.
1025
1024
wrapped_path = {}
1026
- exec_ ("from os.path import *" , {}, wrapped_path )
1025
+ exec ("from os.path import *" , {}, wrapped_path )
1027
1026
wrapped_path .update (self .OS .path .__dict__ )
1028
1027
wrapped_os ["path" ] = ReadOnlyNamespace (** wrapped_path )
1029
1028
return ReadOnlyNamespace (** wrapped_os )
1030
1029
1031
1030
@memoized_property
1032
1031
def _wrapped_subprocess (self ):
1033
1032
wrapped_subprocess = {}
1034
- exec_ ("from subprocess import *" , {}, wrapped_subprocess )
1033
+ exec ("from subprocess import *" , {}, wrapped_subprocess )
1035
1034
1036
1035
def wrap (function ):
1037
1036
def wrapper (* args , ** kwargs ):
@@ -1055,11 +1054,11 @@ def _wrapped_six(self):
1055
1054
if six .PY3 :
1056
1055
return six
1057
1056
wrapped_six = {}
1058
- exec_ ("from six import *" , {}, wrapped_six )
1057
+ exec ("from six import *" , {}, wrapped_six )
1059
1058
wrapped_six_moves = {}
1060
- exec_ ("from six.moves import *" , {}, wrapped_six_moves )
1059
+ exec ("from six.moves import *" , {}, wrapped_six_moves )
1061
1060
wrapped_six_moves_builtins = {}
1062
- exec_ ("from six.moves.builtins import *" , {}, wrapped_six_moves_builtins )
1061
+ exec ("from six.moves.builtins import *" , {}, wrapped_six_moves_builtins )
1063
1062
1064
1063
# Special case for the open() builtin, because otherwise, using it
1065
1064
# fails with "IOError: file() constructor not accessible in
@@ -1104,7 +1103,7 @@ def _get_one_import(self, _from, _import, _as, glob):
1104
1103
_import ,
1105
1104
(" as %s" % _as ) if _as else "" ,
1106
1105
)
1107
- exec_ (import_line , {}, glob )
1106
+ exec (import_line , {}, glob )
1108
1107
1109
1108
def _resolve_and_set (self , data , name , value , when = None ):
1110
1109
# Don't set anything when --help was on the command line
0 commit comments