summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--QMTest/TestSCons_time.py2
-rw-r--r--bench/bench.py2
-rw-r--r--bin/update-release-info.py2
-rw-r--r--src/engine/SCons/Variables/VariablesTests.py2
-rw-r--r--src/engine/SCons/Variables/__init__.py2
-rw-r--r--src/script/scons-time.py6
-rw-r--r--test/Deprecated/Options/Options.py2
-rw-r--r--test/Deprecated/Options/chdir.py2
-rw-r--r--test/SConscript/SConscriptChdir.py10
-rw-r--r--test/Variables/Variables.py2
-rw-r--r--test/Variables/chdir.py2
11 files changed, 17 insertions, 17 deletions
diff --git a/QMTest/TestSCons_time.py b/QMTest/TestSCons_time.py
index a9212f72..bc116ec0 100644
--- a/QMTest/TestSCons_time.py
+++ b/QMTest/TestSCons_time.py
@@ -49,7 +49,7 @@ for arg in sys.argv[1:]:
write_args(profile, sys.argv)
break
sys.stdout.write('SCONS_LIB_DIR = ' + os.environ['SCONS_LIB_DIR'] + '\\n')
-exec(open('SConstruct', 'rU').read())
+exec(open('SConstruct', 'r').read())
"""
aegis_py = """\
diff --git a/bench/bench.py b/bench/bench.py
index cfdac2d2..3f7dbc6e 100644
--- a/bench/bench.py
+++ b/bench/bench.py
@@ -88,7 +88,7 @@ if len(args) != 1:
sys.exit(1)
-exec(open(args[0], 'rU').read())
+exec(open(args[0], 'r').read())
try:
diff --git a/bin/update-release-info.py b/bin/update-release-info.py
index 49f2788c..81e0df5a 100644
--- a/bin/update-release-info.py
+++ b/bin/update-release-info.py
@@ -152,7 +152,7 @@ class UpdateFile(object):
'''
if orig is None: orig = file
try:
- self.content = open(orig, 'rU').read()
+ self.content = open(orig, 'r').read()
except IOError:
# Couldn't open file; don't try to write anything in __del__
self.file = None
diff --git a/src/engine/SCons/Variables/VariablesTests.py b/src/engine/SCons/Variables/VariablesTests.py
index 69f1e012..7ee66caf 100644
--- a/src/engine/SCons/Variables/VariablesTests.py
+++ b/src/engine/SCons/Variables/VariablesTests.py
@@ -65,7 +65,7 @@ def check(key, value, env):
def checkSave(file, expected):
gdict = {}
ldict = {}
- exec(open(file, 'rU').read(), gdict, ldict)
+ exec(open(file, 'r').read(), gdict, ldict)
assert expected == ldict, "%s\n...not equal to...\n%s" % (expected, ldict)
class VariablesTestCase(unittest.TestCase):
diff --git a/src/engine/SCons/Variables/__init__.py b/src/engine/SCons/Variables/__init__.py
index ce3541cd..54b97a44 100644
--- a/src/engine/SCons/Variables/__init__.py
+++ b/src/engine/SCons/Variables/__init__.py
@@ -175,7 +175,7 @@ class Variables(object):
sys.path.insert(0, dir)
try:
values['__name__'] = filename
- exec(open(filename, 'rU').read(), {}, values)
+ exec(open(filename, 'r').read(), {}, values)
finally:
if dir:
del sys.path[0]
diff --git a/src/script/scons-time.py b/src/script/scons-time.py
index c788e50f..f12280c1 100644
--- a/src/script/scons-time.py
+++ b/src/script/scons-time.py
@@ -814,7 +814,7 @@ class SConsTimer(object):
self.title = a
if self.config_file:
- exec(open(self.config_file, 'rU').read(), self.__dict__)
+ exec(open(self.config_file, 'r').read(), self.__dict__)
if self.chdir:
os.chdir(self.chdir)
@@ -933,7 +933,7 @@ class SConsTimer(object):
self.title = a
if self.config_file:
- HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__)
+ HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__)
if self.chdir:
os.chdir(self.chdir)
@@ -1053,7 +1053,7 @@ class SConsTimer(object):
object_name = args.pop(0)
if self.config_file:
- HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__)
+ HACK_for_exec(open(self.config_file, 'r').read(), self.__dict__)
if self.chdir:
os.chdir(self.chdir)
diff --git a/test/Deprecated/Options/Options.py b/test/Deprecated/Options/Options.py
index e435b9ef..6c021f02 100644
--- a/test/Deprecated/Options/Options.py
+++ b/test/Deprecated/Options/Options.py
@@ -237,7 +237,7 @@ opts.Save('options.saved', env)
def checkSave(file, expected):
gdict = {}
ldict = {}
- exec(open(file, 'rU').read(), gdict, ldict)
+ exec(open(file, 'r').read(), gdict, ldict)
assert expected == ldict, "%s\n...not equal to...\n%s" % (expected, ldict)
# First test with no command line options
diff --git a/test/Deprecated/Options/chdir.py b/test/Deprecated/Options/chdir.py
index 977a351b..ed0aab11 100644
--- a/test/Deprecated/Options/chdir.py
+++ b/test/Deprecated/Options/chdir.py
@@ -52,7 +52,7 @@ print("VARIABLE =", repr(env['VARIABLE']))
test.write(['bin', 'opts.cfg'], """\
import os
os.chdir(os.path.split(__name__)[0])
-exec(open('opts2.cfg', 'rU').read())
+exec(open('opts2.cfg', 'r').read())
""")
test.write(['bin', 'opts2.cfg'], """\
diff --git a/test/SConscript/SConscriptChdir.py b/test/SConscript/SConscriptChdir.py
index 4c558443..211d55b3 100644
--- a/test/SConscript/SConscriptChdir.py
+++ b/test/SConscript/SConscriptChdir.py
@@ -44,27 +44,27 @@ SConscript('dir5/SConscript')
""")
test.write(['dir1', 'SConscript'], """
-exec(open("create_test.py", 'rU').read())
+exec(open("create_test.py", 'r').read())
""")
test.write(['dir2', 'SConscript'], """
-exec(open("create_test.py", 'rU').read())
+exec(open("create_test.py", 'r').read())
""")
test.write(['dir3', 'SConscript'], """
import os.path
name = os.path.join('dir3', 'create_test.py')
-exec(open(name, 'rU').read())
+exec(open(name, 'r').read())
""")
test.write(['dir4', 'SConscript'], """
-exec(open("create_test.py", 'rU').read())
+exec(open("create_test.py", 'r').read())
""")
test.write(['dir5', 'SConscript'], """
import os.path
name = os.path.join('dir5', 'create_test.py')
-exec(open(name, 'rU').read())
+exec(open(name, 'r').read())
""")
for dir in ['dir1', 'dir2', 'dir3','dir4', 'dir5']:
diff --git a/test/Variables/Variables.py b/test/Variables/Variables.py
index 1c606353..d08594db 100644
--- a/test/Variables/Variables.py
+++ b/test/Variables/Variables.py
@@ -231,7 +231,7 @@ opts.Save('variables.saved', env)
def checkSave(file, expected):
gdict = {}
ldict = {}
- exec(open(file, 'rU').read(), gdict, ldict)
+ exec(open(file, 'r').read(), gdict, ldict)
assert expected == ldict, "%s\n...not equal to...\n%s" % (expected, ldict)
# First test with no command line variables
diff --git a/test/Variables/chdir.py b/test/Variables/chdir.py
index 2d097d5f..0e9abaa9 100644
--- a/test/Variables/chdir.py
+++ b/test/Variables/chdir.py
@@ -52,7 +52,7 @@ print("VARIABLE =", repr(env['VARIABLE']))
test.write(['bin', 'opts.cfg'], """\
import os
os.chdir(os.path.split(__name__)[0])
-exec(open('opts2.cfg', 'rU').read())
+exec(open('opts2.cfg', 'r').read())
""")
test.write(['bin', 'opts2.cfg'], """\