summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-23 20:12:06 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-23 20:12:06 (GMT)
commit6787a3806ee6a85a6f21ede70c10e15a6df267c4 (patch)
treed72149a2f3a4eab3e8f288fa2a25bb1957620d91 /Tools/scripts
parentd41c343f28bd7631cfa866f8276673ccafb71d57 (diff)
downloadcpython-6787a3806ee6a85a6f21ede70c10e15a6df267c4.zip
cpython-6787a3806ee6a85a6f21ede70c10e15a6df267c4.tar.gz
cpython-6787a3806ee6a85a6f21ede70c10e15a6df267c4.tar.bz2
Issue #15204: Deprecated the 'U' mode in file-like objects.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/diff.py4
-rwxr-xr-xTools/scripts/ndiff.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/diff.py b/Tools/scripts/diff.py
index f9b14bf..8be527f 100755
--- a/Tools/scripts/diff.py
+++ b/Tools/scripts/diff.py
@@ -38,9 +38,9 @@ def main():
fromdate = file_mtime(fromfile)
todate = file_mtime(tofile)
- with open(fromfile, 'U') as ff:
+ with open(fromfile) as ff:
fromlines = ff.readlines()
- with open(tofile, 'U') as tf:
+ with open(tofile) as tf:
tolines = tf.readlines()
if options.u:
diff --git a/Tools/scripts/ndiff.py b/Tools/scripts/ndiff.py
index 2422091..c6d09b8 100755
--- a/Tools/scripts/ndiff.py
+++ b/Tools/scripts/ndiff.py
@@ -60,7 +60,7 @@ def fail(msg):
# couldn't be opened
def fopen(fname):
try:
- return open(fname, 'U')
+ return open(fname)
except IOError as detail:
return fail("couldn't open " + fname + ": " + str(detail))