Diff
Modified: trunk/LayoutTests/ChangeLog (225697 => 225698)
--- trunk/LayoutTests/ChangeLog 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/ChangeLog 2017-12-08 21:56:09 UTC (rev 225698)
@@ -1,3 +1,23 @@
+2017-12-08 Konstantin Tokarev <annu...@yandex.ru>
+
+ [python] Replace print operator with print() function for python3 compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=180592
+
+ Reviewed by Michael Catanzaro.
+
+ * html5lib/generate-test-wrappers.py:
+ (_remove_stale_tests):
+ * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py:
+ (web_socket_do_extra_handshake):
+ * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py:
+ (web_socket_do_extra_handshake):
+ * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py:
+ (web_socket_do_extra_handshake):
+ * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py:
+ (web_socket_do_extra_handshake):
+ * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py:
+ (web_socket_do_extra_handshake):
+
2017-12-08 Ms2ger <ms2...@igalia.com>
[GTK] Rebaseline tables/mozilla/bugs/bug32205-5.html.
Modified: trunk/LayoutTests/html5lib/generate-test-wrappers.py (225697 => 225698)
--- trunk/LayoutTests/html5lib/generate-test-wrappers.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/html5lib/generate-test-wrappers.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -75,7 +75,7 @@
name = self._last_path_component_removing_suffix(path, self.HARNESS_SUFFIX)
name = self._test_name_from_harness_name(name)
if name not in test_names:
- print "Removing %s, %s no longer exists." % (path, self._input_path(name))
+ print("Removing %s, %s no longer exists." % (path, self._input_path(name)))
os.remove(path)
for path in self._files_in_directory_with_suffix(self.OUTPUT_DIRECTORY, self.EXPECTAION_SUFFIX):
@@ -82,7 +82,7 @@
name = self._last_path_component_removing_suffix(path, self.EXPECTAION_SUFFIX)
name = self._test_name_from_harness_name(name)
if name not in test_names:
- print "Removing %s, %s no longer exists." % (path, self._input_path(name))
+ print("Removing %s, %s no longer exists." % (path, self._input_path(name)))
os.remove(path)
def _input_path(self, test_name):
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py (225697 => 225698)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -10,7 +10,7 @@
msg += "\xa5:\r\n"
msg += "\r\n"
request.connection.write(msg)
- print msg
+ print(msg)
raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message.
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py (225697 => 225698)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -10,7 +10,7 @@
msg += 'Sec-WebSocket-Accept: XXXXthisiswrongXXXX\r\n'
msg += '\r\n'
request.connection.write(msg)
- print msg
+ print(msg)
raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py (225697 => 225698)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -9,7 +9,7 @@
msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_accept(request.headers_in['Sec-WebSocket-Key'])[0]
msg += '\r\n'
request.connection.write(msg)
- print msg
+ print(msg)
raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py (225697 => 225698)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -9,7 +9,7 @@
msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_accept(request.headers_in['Sec-WebSocket-Key'])[0]
msg += '\r\n'
request.connection.write(msg)
- print msg
+ print(msg)
raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
Modified: trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py (225697 => 225698)
--- trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -9,7 +9,7 @@
msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_accept(request.headers_in['Sec-WebSocket-Key'])[0]
msg += '\r\n'
request.connection.write(msg)
- print msg
+ print(msg)
raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
Modified: trunk/PerformanceTests/ChangeLog (225697 => 225698)
--- trunk/PerformanceTests/ChangeLog 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/PerformanceTests/ChangeLog 2017-12-08 21:56:09 UTC (rev 225698)
@@ -1,3 +1,12 @@
+2017-12-08 Konstantin Tokarev <annu...@yandex.ru>
+
+ [python] Replace print operator with print() function for python3 compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=180592
+
+ Reviewed by Michael Catanzaro.
+
+ * JSBench/harness.py:
+
2017-12-01 Filip Pizlo <fpi...@apple.com>
GC constraint solving should be parallel
Modified: trunk/PerformanceTests/JSBench/harness.py (225697 => 225698)
--- trunk/PerformanceTests/JSBench/harness.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/PerformanceTests/JSBench/harness.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -45,7 +45,7 @@
keepfrom = runcount - keepruns
if len(sys.argv) != 2:
- print "Use: python harness.py <JS executable>"
+ print("Use: python harness.py <JS executable>")
exit(1)
js = sys.argv[1]
@@ -169,16 +169,16 @@
totals["semm"] *= 100
totals["cim"] *= 100
-print "Final results:"
-print u" %(mean)fms \u00b1 %(cim)f%% (lower is better)" % totals
-print " Standard deviation = %(sm)f%% of mean" % totals
-print " Standard error = %(semm)f%% of mean" % totals
-print " %(runs)d runs" % {"runs": runcount}
-print ""
+print("Final results:")
+print(u" %(mean)fms \u00b1 %(cim)f%% (lower is better)" % totals)
+print(" Standard deviation = %(sm)f%% of mean" % totals)
+print(" Standard error = %(semm)f%% of mean" % totals)
+print(" %(runs)d runs" % {"runs": runcount})
+print("")
-print "Result breakdown:"
+print("Result breakdown:")
for benchmark in benchmarks:
- print " %(benchmark)s:" % {"benchmark": benchmark}
+ print(" %(benchmark)s:" % {"benchmark": benchmark})
bmodes = modes["*"]
if benchmark in modes:
@@ -185,12 +185,12 @@
bmodes = modes[benchmark]
for mode in bmodes:
- print u" %(mode)s: %(mean)fms \u00b1 %(cim)f%% (stddev=%(sm)f%%, stderr=%(semm)f%%)" % sresults[benchmark][mode]
-print ""
+ print(u" %(mode)s: %(mean)fms \u00b1 %(cim)f%% (stddev=%(sm)f%%, stderr=%(semm)f%%)" % sresults[benchmark][mode])
+print("")
-print "Raw results:"
+print("Raw results:")
for benchmark in benchmarks:
- print " %(benchmark)s:" % {"benchmark": benchmark}
+ print(" %(benchmark)s:" % {"benchmark": benchmark})
bmodes = modes["*"]
if benchmark in modes:
@@ -197,7 +197,7 @@
bmodes = modes[benchmark]
for mode in bmodes:
- print " %(mode)s: %(results)s" % {
+ print(" %(mode)s: %(results)s" % {
"mode": mode,
"results": results[benchmark][mode]
- }
+ })
Modified: trunk/Source/_javascript_Core/ChangeLog (225697 => 225698)
--- trunk/Source/_javascript_Core/ChangeLog 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-12-08 21:56:09 UTC (rev 225698)
@@ -1,3 +1,19 @@
+2017-12-08 Konstantin Tokarev <annu...@yandex.ru>
+
+ [python] Replace print operator with print() function for python3 compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=180592
+
+ Reviewed by Michael Catanzaro.
+
+ * Scripts/generateYarrUnicodePropertyTables.py:
+ (openOrExit):
+ (verifyUCDFilesExist):
+ (Aliases.parsePropertyAliasesFile):
+ (Aliases.parsePropertyValueAliasesFile):
+ * Scripts/make-js-file-arrays.py:
+ (main):
+ * generate-bytecode-files:
+
2017-12-08 Mark Lam <mark....@apple.com>
Need to unpoison native function pointers for CLoop.
Modified: trunk/Source/_javascript_Core/Scripts/generateYarrUnicodePropertyTables.py (225697 => 225698)
--- trunk/Source/_javascript_Core/Scripts/generateYarrUnicodePropertyTables.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Source/_javascript_Core/Scripts/generateYarrUnicodePropertyTables.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -92,7 +92,7 @@
try:
return open(path, mode)
except IOError as e:
- print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)
+ print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror))
exit(1)
@@ -111,7 +111,7 @@
for file in RequiredUCDFiles:
fullPath = os.path.join(UCDDirectoryPath, file)
if not os.path.exists(fullPath):
- print "Couldn't find UCD file {0} at {1}".format(file, fullPath)
+ print("Couldn't find UCD file {0} at {1}".format(file, fullPath))
missingFileCount = missingFileCount + 1
if missingFileCount:
exit(1)
@@ -150,7 +150,7 @@
aliases.append(otherAlias.strip())
if fullName in self.globalNameToAliases:
- print "Error, already an alias for {}".format(fullName)
+ print("Error, already an alias for {}".format(fullName))
else:
self.globalNameToAliases[fullName] = aliases
@@ -183,7 +183,7 @@
aliases.append(otherAlias.strip())
if fullName in mapToModify:
- print "Error, already an {} alias for {}".format(propertyType, fullName)
+ print("Error, already an {} alias for {}".format(propertyType, fullName))
else:
mapToModify[fullName] = aliases
if reverseMapToModify != None:
Modified: trunk/Source/_javascript_Core/Scripts/make-js-file-arrays.py (225697 => 225698)
--- trunk/Source/_javascript_Core/Scripts/make-js-file-arrays.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Source/_javascript_Core/Scripts/make-js-file-arrays.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -46,11 +46,11 @@
parser.add_option('-n', '--namespace', help='Namespace to use')
(options, arguments) = parser.parse_args()
if not options.namespace:
- print 'Error: must provide a namespace'
+ print('Error: must provide a namespace')
parser.print_usage()
exit(-1)
if len(arguments) < 3:
- print 'Error: must provide at least 3 arguments'
+ print('Error: must provide at least 3 arguments')
parser.print_usage()
exit(-1)
Modified: trunk/Source/_javascript_Core/generate-bytecode-files (225697 => 225698)
--- trunk/Source/_javascript_Core/generate-bytecode-files 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Source/_javascript_Core/generate-bytecode-files 2017-12-08 21:56:09 UTC (rev 225698)
@@ -91,7 +91,7 @@
try:
return open(path, mode)
except IOError as e:
- print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)
+ print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror))
exit(1)
def hashFile(file):
@@ -217,7 +217,7 @@
try:
bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
except:
- print "Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())
+ print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))
if bytecodeHFilename:
bytecodeHFile.write(hFileHashString)
Modified: trunk/Source/WebCore/PAL/AVFoundationSupport.py (225697 => 225698)
--- trunk/Source/WebCore/PAL/AVFoundationSupport.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Source/WebCore/PAL/AVFoundationSupport.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -43,22 +43,22 @@
return False
-print "/* Identifying AVFoundation Support */"
+print("/* Identifying AVFoundation Support */")
if lookFor("/include/AVFoundationCF/AVCFBase.h"):
- print "#define HAVE_AVCF 1"
+ print("#define HAVE_AVCF 1")
if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"):
- print "#define HAVE_AVCF_LEGIBLE_OUTPUT 1"
+ print("#define HAVE_AVCF_LEGIBLE_OUTPUT 1")
if lookFor("/include/AVFoundationCF/AVCFAssetResourceLoader.h"):
- print "#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1"
+ print("#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1")
if lookFor("/include/AVFoundationCF/AVCFAsset.h"):
regexp = re.compile("AVCFURLAssetIsPlayableExtendedMIMEType")
if fileContains("/include/AVFoundationCF/AVCFAsset.h", regexp):
- print "#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1"
+ print("#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1")
if lookFor("/include/QuartzCore/CACFLayer.h"):
regexp = re.compile("CACFLayerSetContentsScale")
if fileContains("/include/QuartzCore/CACFLayer.h", regexp):
- print "#define HAVE_CACFLAYER_SETCONTENTSSCALE 1"
+ print("#define HAVE_CACFLAYER_SETCONTENTSSCALE 1")
if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"):
regexp = re.compile("kAVCFPlayerItemLegibleOutput_CallbacksVersion_2")
if fileContains("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h", regexp):
- print "#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1"
+ print("#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1")
Modified: trunk/Source/WebCore/PAL/ChangeLog (225697 => 225698)
--- trunk/Source/WebCore/PAL/ChangeLog 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Source/WebCore/PAL/ChangeLog 2017-12-08 21:56:09 UTC (rev 225698)
@@ -1,3 +1,12 @@
+2017-12-08 Konstantin Tokarev <annu...@yandex.ru>
+
+ [python] Replace print operator with print() function for python3 compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=180592
+
+ Reviewed by Michael Catanzaro.
+
+ * AVFoundationSupport.py:
+
2017-12-08 Eric Carlson <eric.carl...@apple.com>
Move Logger from PAL to WTF so it can be used outside of WebCore
Modified: trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py (225697 => 225698)
--- trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -31,9 +31,9 @@
p = subprocess.Popen(["svn", "log", "--non-interactive", "--verbose", "--xml", "--limit=1", SVNServer], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
response = p.communicate()[0]
if p.returncode != 0:
- print "Can't connect to host: %s, return code %s " % (SVNServer, p.returncode)
- print "OUTPUT:"
- print response
+ print("Can't connect to host: %s, return code %s " % (SVNServer, p.returncode))
+ print("OUTPUT:")
+ print(response)
return -1
try:
doc = xml.dom.minidom.parseString(response)
@@ -40,11 +40,11 @@
el = doc.getElementsByTagName("logentry")[0]
return el.getAttribute("revision")
except xml.parsers.expat.ExpatError, e:
- print "FAILED TO PARSE 'svn log' XML:"
- print str(e)
- print "----"
- print "RECEIVED TEXT:"
- print response
+ print("FAILED TO PARSE 'svn log' XML:")
+ print(str(e))
+ print("----")
+ print("RECEIVED TEXT:")
+ print(response)
sys.exit(1)
@@ -51,7 +51,7 @@
def waitForSVNRevision(SVNServer, revision):
if not revision or not revision.isdigit():
latestRevision = int(getLatestSVNRevision(SVNServer))
- print "Latest SVN revision on %s is r%d. Don't wait, because revision argument isn't a valid SVN revision." % (SVNServer, latestRevision)
+ print("Latest SVN revision on %s is r%d. Don't wait, because revision argument isn't a valid SVN revision." % (SVNServer, latestRevision))
return
revision = int(revision)
@@ -58,13 +58,13 @@
while True:
latestRevision = int(getLatestSVNRevision(SVNServer))
if latestRevision == -1:
- print "%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer)
+ print("%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer))
time.sleep(60)
elif latestRevision < revision:
- print "Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)
+ print("Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision))
time.sleep(5)
else:
- print "Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision)
+ print("Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision))
break
Modified: trunk/Tools/ChangeLog (225697 => 225698)
--- trunk/Tools/ChangeLog 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/ChangeLog 2017-12-08 21:56:09 UTC (rev 225698)
@@ -1,3 +1,135 @@
+2017-12-08 Konstantin Tokarev <annu...@yandex.ru>
+
+ [python] Replace print operator with print() function for python3 compatibility
+ https://bugs.webkit.org/show_bug.cgi?id=180592
+
+ Reviewed by Michael Catanzaro.
+
+ * BuildSlaveSupport/wait-for-SVN-server.py:
+ (getLatestSVNRevision):
+ (waitForSVNRevision):
+ * Scripts/download-latest-github-release.py:
+ (find_latest_release):
+ (main):
+ * Scripts/update-wasm-gcc-torture.py:
+ (update_lkgr):
+ (untar_torture):
+ (list_js_files):
+ (waterfall_known_failures):
+ * Scripts/update-webkit-wincairo-libs.py:
+ * Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
+ (BenchmarkRunner.show_results):
+ * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
+ (SimpleHTTPServerDriver.fetch_result):
+ * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
+ (list_benchmark_plans):
+ * Scripts/webkitpy/bindings/main.py:
+ (BindingsTests.generate_from_idl):
+ (BindingsTests.generate_supplemental_dependency):
+ (BindingsTests.detect_changes):
+ (BindingsTests.run_tests):
+ (BindingsTests.main):
+ * Scripts/webkitpy/codegen/main.py:
+ (BuiltinsGeneratorTests.generate_from_js_builtins):
+ (BuiltinsGeneratorTests.detect_changes):
+ (BuiltinsGeneratorTests.single_builtin_test):
+ (BuiltinsGeneratorTests.run_test):
+ (BuiltinsGeneratorTests.run_tests):
+ (BuiltinsGeneratorTests.main):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
+ (MockBugzilla.fetch_attachment):
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (Builder._fetch_revision_to_build_map):
+ * Scripts/webkitpy/common/system/crashlogs.py:
+ (CrashLogs._find_newest_log_win):
+ * Scripts/webkitpy/common/system/outputcapture_unittest.py:
+ (OutputCaptureTest.test_output_capture_scope):
+ * Scripts/webkitpy/common/system/profiler.py:
+ (GooglePProf.profile_after_exit):
+ (Perf.profile_after_exit):
+ * Scripts/webkitpy/common/system/user.py:
+ (User.prompt_with_multiple_lists):
+ (User.prompt_with_list):
+ (User._warn_if_application_is_xcode):
+ (User.edit_changelog):
+ * Scripts/webkitpy/inspector/main.py:
+ (InspectorGeneratorTests.generate_from_json):
+ (InspectorGeneratorTests.detect_changes):
+ (InspectorGeneratorTests.run_tests):
+ (InspectorGeneratorTests.main):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._print_expectation_line_for_test):
+ (Manager._print_expectations_for_subset):
+ (Manager._print_expectations_for_subset.if):
+ * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
+ (run_server):
+ * Scripts/webkitpy/port/config_standalone.py:
+ (main):
+ * Scripts/webkitpy/port/darwin_testcase.py:
+ (DarwinTest.test_spindump.logging_run_command):
+ (DarwinTest.test_sample_process.logging_run_command):
+ * Scripts/webkitpy/port/ios.py:
+ (IOSPort.clean_up_test_run):
+ * Scripts/webkitpy/port/ios_device_unittest.py:
+ (IOSDeviceTest.test_spindump.logging_run_command):
+ (IOSDeviceTest.test_sample_process.logging_run_command):
+ * Scripts/webkitpy/port/ios_simulator_unittest.py:
+ (IOSSimulatorTest.test_xcrun.throwing_run_command):
+ * Scripts/webkitpy/port/leakdetector_unittest.py:
+ (test_count_total_bytes_and_unique_leaks.mock_run_script):
+ * Scripts/webkitpy/port/mac_unittest.py:
+ (MacTest.test_xcrun.throwing_run_command):
+ * Scripts/webkitpy/style/checkers/contributors.py:
+ (ContributorsChecker.check):
+ * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
+ (AbstractLocalServerCommand.execute):
+ * Scripts/webkitpy/tool/commands/adduserstogroups.py:
+ (AddUsersToGroups.execute):
+ * Scripts/webkitpy/tool/commands/analyzechangelog.py:
+ (AnalyzeChangeLog._generate_jsons):
+ (AnalyzeChangeLog.execute):
+ (ChangeLogAnalyzer._set_filename):
+ (ChangeLogAnalyzer.analyze):
+ * Scripts/webkitpy/tool/commands/bugfortest.py:
+ (BugForTest.execute):
+ * Scripts/webkitpy/tool/commands/bugsearch.py:
+ (execute):
+ * Scripts/webkitpy/tool/commands/findusers.py:
+ (FindUsers.execute):
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ (GardenOMatic.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest.execute):
+ * Scripts/webkitpy/tool/commands/rebaselineserver.py:
+ (RebaselineServer._prepare_config):
+ * Scripts/webkitpy/tool/commands/setupgitclone.py:
+ (SetupGitClone.execute):
+ (SetupGitClone._get_username_and_email):
+ * Scripts/webkitpy/tool/commands/suggestnominations.py:
+ (SuggestNominations._print_nominations):
+ (SuggestNominations._print_counts):
+ * Scripts/webkitpy/tool/commands/upload.py:
+ (CommitMessageForCurrentDiff.execute):
+ (CreateBug.prompt_for_bug_title_and_comment):
+ * Scripts/webkitpy/tool/multicommandtool.py:
+ (HelpCommand.execute):
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ (TestGardeningHTTPRequestHandler._serve_text):
+ (TestGardeningHTTPRequestHandler._serve_json):
+ * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py:
+ (AddSvnMimetypeForPng.run):
+ * Scripts/webkitpy/tool/steps/suggestreviewers.py:
+ (SuggestReviewers.run):
+ * Scripts/webkitpy/w3c/test_importer.py:
+ (TestImporter.update_tests_options):
+ * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
+ (WebDriverTestRunnerSelenium.run):
+ * TestResultServer/model/jsonresults_unittest.py:
+ * gtk/ycm_extra_conf.py:
+ (FlagsForFile):
+ * lldb/lldb_webkit.py:
+ (btjs):
+
2017-12-08 Eric Carlson <eric.carl...@apple.com>
Move Logger from PAL to WTF so it can be used outside of WebCore
Modified: trunk/Tools/Scripts/download-latest-github-release.py (225697 => 225698)
--- trunk/Tools/Scripts/download-latest-github-release.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/download-latest-github-release.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -70,7 +70,7 @@
try:
response = urllib2.urlopen(request)
except urllib2.URLError as error:
- print error
+ print(error)
return None, None
data = ""
@@ -105,38 +105,38 @@
binary_path = os.path.join(args.output_dir, args.filename)
version_info_path = binary_path + '.version'
- print 'Updating {}...'.format(args.filename)
+ print('Updating {}...'.format(args.filename))
existing_version_info = load_version_info(version_info_path)
if existing_version_info:
- print 'Found existing release:', existing_version_info['tag_name']
+ print('Found existing release:', existing_version_info['tag_name'])
else:
- print 'No existing release found.'
+ print('No existing release found.')
- print 'Seeking latest release from {}...'.format(args.repo)
+ print('Seeking latest release from {}...'.format(args.repo))
release_url, latest_version_info = find_latest_release(args)
if not latest_version_info:
if existing_version_info:
- print 'Falling back to existing release!'
+ print('Falling back to existing release!')
return Status.USING_EXISTING
- print 'No release found!'
+ print('No release found!')
return Status.COULD_NOT_FIND
- print 'Found latest release:', latest_version_info['tag_name']
+ print('Found latest release:', latest_version_info['tag_name'])
if latest_version_info == existing_version_info:
- print 'Already up-to-date!'
+ print('Already up-to-date!')
return Status.UP_TO_DATE
if not os.path.exists(args.output_dir):
os.makedirs(args.output_dir)
- print 'Downloading to {}...'.format(os.path.abspath(args.output_dir))
+ print('Downloading to {}...'.format(os.path.abspath(args.output_dir)))
download_release(release_url, binary_path)
save_version_info(version_info_path, latest_version_info)
- print 'Done!'
+ print('Done!')
return Status.DOWNLOADED
Modified: trunk/Tools/Scripts/update-wasm-gcc-torture.py (225697 => 225698)
--- trunk/Tools/Scripts/update-wasm-gcc-torture.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/update-wasm-gcc-torture.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -64,9 +64,9 @@
def update_lkgr(args):
lkgr_url = LKGR_URL % args.platform
if not args.lkgr:
- print 'Downloading: %s' % lkgr_url
+ print('Downloading: %s' % lkgr_url)
args.lkgr = json.loads(urllib2.urlopen(lkgr_url).read())['build']
- print 'lkgr: %s' % args.lkgr
+ print('lkgr: %s' % args.lkgr)
def untar_torture(args):
@@ -73,7 +73,7 @@
torture_file = TORTURE_FILE % args.lkgr
torture_url = TORTURE_URL % (args.platform, args.lkgr, torture_file)
if not os.path.exists(torture_file):
- print 'Downloading: %s' % torture_url
+ print('Downloading: %s' % torture_url)
torture_download = urllib2.urlopen(torture_url)
with open(torture_file, 'wb') as f:
f.write(torture_download.read())
@@ -81,7 +81,7 @@
if os.path.isdir(TORTURE_DIR):
shutil.rmtree(TORTURE_DIR)
with tarfile.open(torture_file, 'r') as torture_tar:
- print 'Extracting: %s -> %s' % (torture_file, TORTURE_DIR)
+ print('Extracting: %s -> %s' % (torture_file, TORTURE_DIR))
torture_tar.extractall()
assert os.path.isdir(TORTURE_DIR)
@@ -88,7 +88,7 @@
def list_js_files(args):
js_files = sorted([os.path.basename(f) for f in glob.glob(os.path.join(TORTURE_DIR, '*.js'))])
- print 'Found %s _javascript_ tests' % len(js_files)
+ print('Found %s _javascript_ tests' % len(js_files))
assert len(js_files) > 1200
return js_files
@@ -102,7 +102,7 @@
subprocess.check_call(['git', 'checkout', args.waterfall_hash], cwd=WATERFALL_DIR)
else:
args.waterfall_hash = subprocess.check_output(['git', 'log', '-n1', '--pretty=format:%H'], cwd=WATERFALL_DIR).strip()
- print 'Waterfall at: %s' % args.waterfall_hash
+ print('Waterfall at: %s' % args.waterfall_hash)
known_failures = []
with open(os.path.join(WATERFALL_DIR, WATERFALL_KNOWN_FAILURES)) as failures_file:
for line in failures_file:
Modified: trunk/Tools/Scripts/update-webkit-wincairo-libs.py (225697 => 225698)
--- trunk/Tools/Scripts/update-webkit-wincairo-libs.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/update-webkit-wincairo-libs.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -37,7 +37,7 @@
# Only unzip if required
if result == download.Status.DOWNLOADED:
- print 'Extracting release to {}...'.format(output)
+ print('Extracting release to {}...'.format(output))
zip = zipfile.ZipFile(file, 'r')
zip.extractall(output)
zip.close()
Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -156,4 +156,4 @@
@classmethod
def show_results(cls, results, scale_unit=True):
results = BenchmarkResults(results)
- print results.format(scale_unit)
+ print(results.format(scale_unit))
Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -79,7 +79,7 @@
def fetch_result(self):
(stdout, stderr) = self._server_process.communicate()
- print stderr
+ print(stderr)
return stdout
def kill_server(self):
Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -69,9 +69,9 @@
def list_benchmark_plans():
- print "Available benchmark plans: "
+ print("Available benchmark plans: ")
for plan in BenchmarkRunner.available_plans():
- print "\t%s" % plan
+ print("\t%s" % plan)
def start(args):
Modified: trunk/Tools/Scripts/webkitpy/bindings/main.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/bindings/main.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/bindings/main.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -64,9 +64,9 @@
try:
output = self.executive.run_command(cmd)
if output:
- print output
+ print(output)
except ScriptError, e:
- print e.output
+ print(e.output)
exit_code = e.exit_code
return exit_code
@@ -94,9 +94,9 @@
try:
output = self.executive.run_command(cmd)
if output:
- print output
+ print(output)
except ScriptError, e:
- print e.output
+ print(e.output)
exit_code = e.exit_code
os.remove(idl_files_list[1])
return exit_code
@@ -118,13 +118,13 @@
exit_code = e.exit_code
if exit_code or output:
- print 'FAIL: (%s) %s' % (generator, output_file)
- print output
+ print('FAIL: (%s) %s' % (generator, output_file))
+ print(output)
changes_found = True
if self.json_file_name:
self.failures.append("(%s) %s" % (generator, output_file))
elif self.verbose:
- print 'PASS: (%s) %s' % (generator, output_file)
+ print('PASS: (%s) %s' % (generator, output_file))
return changes_found
def test_matches_patterns(self, test):
@@ -159,7 +159,7 @@
passed = False
if self.reset_results:
- print "Reset results: (%s) %s" % (generator, input_file)
+ print("Reset results: (%s) %s" % (generator, input_file))
continue
# Detect changes
@@ -182,7 +182,7 @@
dedicatedworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
serviceworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file, serviceworkerglobalscope_constructors_file):
- print 'Failed to generate a supplemental dependency file.'
+ print('Failed to generate a supplemental dependency file.')
os.remove(supplemental_dependency_file)
os.remove(window_constructors_file)
os.remove(workerglobalscope_constructors_file)
@@ -210,10 +210,10 @@
with open(self.json_file_name, 'w') as json_file:
json.dump(json_data, json_file)
- print ''
+ print('')
if all_tests_passed:
- print 'All tests PASS!'
+ print('All tests PASS!')
return 0
else:
- print 'Some tests FAIL! (To update the reference files, execute "run-bindings-tests --reset-results")'
+ print('Some tests FAIL! (To update the reference files, execute "run-bindings-tests --reset-results")')
return -1
Modified: trunk/Tools/Scripts/webkitpy/codegen/main.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/codegen/main.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/codegen/main.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -58,7 +58,7 @@
if stderr_output:
self.write_error_file(framework_name + "JSBuiltins.h-error" if generate_wrappers else builtins_files[0], output_directory, stderr_output)
except ScriptError, e:
- print e.output
+ print(e.output)
exit_code = e.exit_code
return exit_code
@@ -85,17 +85,17 @@
exit_code = e.exit_code
if exit_code or output:
- print 'FAIL: %s' % output_file
- print output
+ print('FAIL: %s' % output_file)
+ print(output)
changes_found = True
else:
- print 'PASS: %s' % output_file
+ print('PASS: %s' % output_file)
return changes_found
def single_builtin_test(self, test_name, test_files, work_directory):
(framework_name, test_case, output_mode) = test_name.split('-')
if not framework_name or not output_mode or not test_case:
- print "Invalid test case name: should be Framework-TestCaseName-OutputMode.js"
+ print("Invalid test case name: should be Framework-TestCaseName-OutputMode.js")
return False
combined_outputs = output_mode == "Combined"
@@ -115,7 +115,7 @@
passed = False
if self.reset_results:
- print "Reset results for test: %s" % (test_name)
+ print("Reset results for test: %s" % (test_name))
return True
# Detect changes
@@ -141,7 +141,7 @@
separately_generated_files.append(test_file)
if self.reset_results:
- print "Reset results for test: %s" % (input_file)
+ print("Reset results for test: %s" % (input_file))
continue
if separately_generated_files:
@@ -161,10 +161,10 @@
if not self.run_tests(input_directory, reference_directory):
all_tests_passed = False
- print ''
+ print('')
if all_tests_passed:
- print 'All tests PASS!'
+ print('All tests PASS!')
return 0
else:
- print 'Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")'
+ print('Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")')
return -1
Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -401,7 +401,7 @@
attachment_dictionary = self.attachment_cache.get(attachment_id)
if not attachment_dictionary:
- print "MOCK: fetch_attachment: %s is not a known attachment id" % attachment_id
+ print("MOCK: fetch_attachment: %s is not a known attachment id" % attachment_id)
return None
bug = self.fetch_bug(attachment_dictionary["bug_id"])
for attachment in bug.attachments(include_obsolete=True):
Modified: trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -158,8 +158,8 @@
# FIXME: This method is horribly slow due to the huge network load.
# FIXME: This is a poor way to do revision -> build mapping.
# Better would be to ask buildbot through some sort of API.
- print "Loading revision/build list from %s." % self.results_url()
- print "This may take a while..."
+ print("Loading revision/build list from %s." % self.results_url())
+ print("This may take a while...")
result_files = self._buildbot._fetch_twisted_directory_listing(self.results_url())
except urllib2.HTTPError, error:
if error.code != 404:
Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -120,15 +120,15 @@
if int(match.group('pid'), 16) == pid:
return errors + log_file
except IOError, e:
- print "IOError %s" % str(e)
+ print("IOError %s" % str(e))
if include_errors:
errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e))
except OSError, e:
- print "OSError %s" % str(e)
+ print("OSError %s" % str(e))
if include_errors:
errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e))
except UnicodeDecodeError, e:
- print "UnicodeDecodeError %s" % str(e)
+ print("UnicodeDecodeError %s" % str(e))
if include_errors:
errors += u"ERROR: Failed to decode '%s' as ascii: %s\n" % (path, str(e))
Modified: trunk/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -61,11 +61,11 @@
def test_output_capture_scope(self):
scope = OutputCaptureScope()
with scope:
- print 'STRING 1'
+ print('STRING 1')
self.assertEqual(('STRING 1\n', '', ''), scope.captured_output)
with scope:
- print 'STRING 2'
+ print('STRING 2')
self.assertEqual(('STRING 2\n', '', ''), scope.captured_output)
def test_output_capture_scope_from_output_capture(self):
Modified: trunk/Tools/Scripts/webkitpy/common/system/profiler.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/common/system/profiler.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/common/system/profiler.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -116,17 +116,17 @@
def profile_after_exit(self):
# google-pprof doesn't check its arguments, so we have to.
if not (self._host.filesystem.exists(self._output_path)):
- print "Failed to gather profile, %s does not exist." % self._output_path
+ print("Failed to gather profile, %s does not exist." % self._output_path)
return
pprof_args = [self._pprof_path(), '--text', self._executable_path, self._output_path]
profile_text = self._host.executive.run_command(pprof_args)
- print "First 10 lines of pprof --text:"
- print self._first_ten_lines_of_profile(profile_text)
- print "http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output."
- print
- print "To interact with the the full profile, including produce graphs:"
- print ' '.join([self._pprof_path(), self._executable_path, self._output_path])
+ print("First 10 lines of pprof --text:")
+ print(self._first_ten_lines_of_profile(profile_text))
+ print("http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output.")
+ print()
+ print("To interact with the the full profile, including produce graphs:")
+ print(' '.join([self._pprof_path(), self._executable_path, self._output_path]))
class Perf(SingleFileOutputProfiler):
@@ -171,21 +171,21 @@
if exit_code is not 0:
print "'perf record' failed, ",
if exit_code:
- print "exit code was %i." % exit_code
+ print("exit code was %i." % exit_code)
else:
- print "the profiled process with pid %i is still running." % self._watched_pid
+ print("the profiled process with pid %i is still running." % self._watched_pid)
return
perf_report_args = [self._perf_path(), 'report', '--call-graph', 'none', '--input', self._output_path]
perf_report_output = self._host.executive.run_command(perf_report_args)
- print "First 10 lines of 'perf report --call-graph=none':"
+ print("First 10 lines of 'perf report --call-graph=none':")
- print " ".join(perf_report_args)
- print "\n".join(self._first_ten_lines_of_profile(perf_report_output))
+ print(" ".join(perf_report_args))
+ print("\n".join(self._first_ten_lines_of_profile(perf_report_output)))
- print "To view the full profile, run:"
- print ' '.join([self._perf_path(), 'report', '-i', self._output_path])
- print # An extra line between tests looks nicer.
+ print("To view the full profile, run:")
+ print(' '.join([self._perf_path(), 'report', '-i', self._output_path]))
+ print() # An extra line between tests looks nicer.
class Sample(SingleFileOutputProfiler):
Modified: trunk/Tools/Scripts/webkitpy/common/system/user.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/common/system/user.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/common/system/user.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -77,12 +77,12 @@
def prompt_with_multiple_lists(cls, list_title, subtitles, lists, can_choose_multiple=False, raw_input=raw_input):
item_index = 0
cumulated_list = []
- print list_title
+ print(list_title)
for i in range(len(subtitles)):
- print "\n" + subtitles[i]
+ print("\n" + subtitles[i])
for item in lists[i]:
item_index += 1
- print "%2d. %s" % (item_index, item)
+ print("%2d. %s" % (item_index, item))
cumulated_list += lists[i]
return cls._wait_on_list_response(cumulated_list, can_choose_multiple, raw_input)
@@ -115,11 +115,11 @@
@classmethod
def prompt_with_list(cls, list_title, list_items, can_choose_multiple=False, raw_input=raw_input):
- print list_title
+ print(list_title)
i = 0
for item in list_items:
i += 1
- print "%2d. %s" % (i, item)
+ print("%2d. %s" % (i, item))
return cls._wait_on_list_response(list_items, can_choose_multiple, raw_input)
def edit(self, files):
@@ -133,7 +133,7 @@
def _warn_if_application_is_xcode(self, edit_application):
if "Xcode" in edit_application:
- print "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\"."
+ print("Instead of using Xcode.app, consider using EDITOR=\"xed --wait\".")
def edit_changelog(self, files):
edit_application = os.environ.get("CHANGE_LOG_EDIT_APPLICATION")
@@ -140,8 +140,8 @@
if edit_application and self._platforminfo.is_mac():
# On Mac we support editing ChangeLogs using an application.
args = shlex.split(edit_application)
- print "Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable."
- print "Please quit the editor application when done editing."
+ print("Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable.")
+ print("Please quit the editor application when done editing.")
self._warn_if_application_is_xcode(edit_application)
subprocess.call(["open", "-W", "-n", "-a"] + args + files)
return
Modified: trunk/Tools/Scripts/webkitpy/inspector/main.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/inspector/main.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/inspector/main.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -54,7 +54,7 @@
if stderr_output:
self.write_error_file(json_file, output_directory, stderr_output)
except ScriptError, e:
- print e.output
+ print(e.output)
exit_code = e.exit_code
return exit_code
@@ -81,11 +81,11 @@
exit_code = e.exit_code
if exit_code or output:
- print 'FAIL: %s' % output_file
- print output
+ print('FAIL: %s' % output_file)
+ print(output)
changes_found = True
else:
- print 'PASS: %s' % output_file
+ print('PASS: %s' % output_file)
return changes_found
def run_tests(self, platform, input_directory, reference_directory):
@@ -105,7 +105,7 @@
passed = False
if self.reset_results:
- print "Reset results for test: %s" % (input_file)
+ print("Reset results for test: %s" % (input_file))
continue
# Detect changes
@@ -138,10 +138,10 @@
all_tests_passed = all_tests_passed and self.run_tests(platform_name, input_directory, reference_directory)
- print ''
+ print('')
if all_tests_passed:
- print 'All tests PASS!'
+ print('All tests PASS!')
return 0
else:
- print 'Some tests FAIL! (To update the reference files, execute "run-inspector-generator-tests --reset-results")'
+ print('Some tests FAIL! (To update the reference files, execute "run-inspector-generator-tests --reset-results")')
return -1
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -540,18 +540,18 @@
def _print_expectation_line_for_test(self, format_string, test):
line = self._expectations.model().get_expectation_line(test)
- print format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string or '')
+ print(format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string or ''))
def _print_expectations_for_subset(self, device_class, test_col_width, tests_to_run, tests_to_skip={}):
format_string = '{{:{width}}} {{}} {{}} {{}}'.format(width=test_col_width)
if tests_to_skip:
- print ''
- print 'Tests to skip ({})'.format(len(tests_to_skip))
+ print('')
+ print('Tests to skip ({})'.format(len(tests_to_skip)))
for test in sorted(tests_to_skip):
self._print_expectation_line_for_test(format_string, test)
- print ''
- print 'Tests to run{} ({})'.format(' for ' + device_class if device_class else '', len(tests_to_run))
+ print('')
+ print('Tests to run{} ({})'.format(' for ' + device_class if device_class else '', len(tests_to_run)))
for test in sorted(tests_to_run):
self._print_expectation_line_for_test(format_string, test)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -68,8 +68,8 @@
return EXCEPTIONAL_EXIT_STATUS
if options.web_platform_test_server:
- print "Starting web-platform-tests server on <%s> and <%s>" % (web_platform_test_server.base_http_url(port), web_platform_test_server.base_https_url(port))
- print "WebKit http/wpt tests are accessible at <%s>" % (web_platform_test_server.base_http_url(port) + "WebKit/")
+ print("Starting web-platform-tests server on <%s> and <%s>" % (web_platform_test_server.base_http_url(port), web_platform_test_server.base_https_url(port)))
+ print("WebKit http/wpt tests are accessible at <%s>" % (web_platform_test_server.base_http_url(port) + "WebKit/"))
port.start_web_platform_test_server()
if options.httpd_server:
@@ -76,9 +76,9 @@
# FIXME(154294): somehow retrieve the actual ports and interfaces bound by the httpd server
http_port = options.http_port if options.http_port is not None else "8000"
if options.http_all_interfaces is not None:
- print "Starting httpd on port %s (all interfaces)" % http_port
+ print("Starting httpd on port %s (all interfaces)" % http_port)
else:
- print "Starting httpd on <http://127.0.0.1:%s>" % http_port
+ print("Starting httpd on <http://127.0.0.1:%s>" % http_port)
additionalDirs = {additional_dir[0]: additional_dir[1] for additional_dir in options.additional_dirs}
port.start_http_server(additionalDirs)
@@ -85,7 +85,7 @@
port.start_websocket_server()
if options.url:
- print "Opening %s" % options.url
+ print("Opening %s" % options.url)
subprocess.Popen(['open', options.url], stdout=subprocess.PIPE)
try:
Modified: trunk/Tools/Scripts/webkitpy/port/config_standalone.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/config_standalone.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/config_standalone.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -63,7 +63,7 @@
fs = filesystem.FileSystem()
c = config.Config(e, fs)
- print c.default_configuration()
+ print(c.default_configuration())
if __name__ == '__main__':
main()
Modified: trunk/Tools/Scripts/webkitpy/port/darwin_testcase.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/darwin_testcase.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/darwin_testcase.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -100,7 +100,7 @@
def test_spindump(self):
def logging_run_command(args):
- print args
+ print(args)
port = self.make_port()
port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt'] = 'Spindump file'
@@ -115,7 +115,7 @@
def logging_run_command(args):
if args[0] == '/usr/bin/sudo':
return 1
- print args
+ print(args)
return 0
port = self.make_port()
Modified: trunk/Tools/Scripts/webkitpy/port/ios.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/ios.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/ios.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -190,7 +190,7 @@
if len(exception_list) == 1:
raise
elif len(exception_list) > 1:
- print '\n'
+ print('\n')
for exception in exception_list:
_log.error('{} raised: {}'.format(exception[0].__class__.__name__, exception[0]))
_log.error(exception[1])
Modified: trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -50,7 +50,7 @@
def test_spindump(self):
def logging_run_command(args):
- print args
+ print(args)
port = self.make_port()
port.host.filesystem.files['/__im_tmp/tmp_0_/test-42-spindump.txt'] = 'Spindump file'
@@ -64,7 +64,7 @@
def logging_run_command(args):
if args[0] == '/usr/sbin/spindump':
return 1
- print args
+ print(args)
return 0
port = self.make_port()
Modified: trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -81,7 +81,7 @@
def test_xcrun(self):
def throwing_run_command(args):
- print args
+ print(args)
raise ScriptError("MOCK script error")
port = self.make_port()
Modified: trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -127,7 +127,7 @@
detector = self._make_detector()
def mock_run_script(name, args, include_configuration_arguments=False):
- print "MOCK _run_script: %s %s" % (name, args)
+ print("MOCK _run_script: %s %s" % (name, args))
return """1 calls for 16 bytes: -[NSURLRequest mutableCopyWithZone:] | +[NSObject(NSObject) allocWithZone:] | _internal_class_createInstanceFromZone | calloc | malloc_zone_calloc
147 calls for 9,408 bytes: _CFRuntimeCreateInstance | _ZN3WTF24StringWrapperCFAllocatorL8allocateElmPv StringImplCF.cpp:67 | WTF::fastMalloc(unsigned long) FastMalloc.cpp:268 | malloc | malloc_zone_malloc
Modified: trunk/Tools/Scripts/webkitpy/port/mac_unittest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/port/mac_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/port/mac_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -136,7 +136,7 @@
def test_xcrun(self):
def throwing_run_command(args):
- print args
+ print(args)
raise ScriptError("MOCK script error")
port = self.make_port()
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/contributors.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/style/checkers/contributors.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/contributors.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -45,7 +45,7 @@
diff = self._unidiff_output(actual, canonicalized)
if diff:
self._handle_style_error(0, 'json/syntax', 5, 'contributors.json differs from the canonical format. Use "validate-committer-lists --canonicalize" to reformat it.')
- print diff
+ print(diff)
def _unidiff_output(self, expected, actual):
expected = expected.splitlines(1)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -46,8 +46,8 @@
config = self._prepare_config(options, args, tool)
server_url = "http://localhost:%d%s" % (options.httpd_port, self.launch_path)
- print "Starting server at %s" % server_url
- print "Use the 'Exit' link in the UI, %squitquitquit or Ctrl-C to stop" % server_url
+ print("Starting server at %s" % server_url)
+ print("Use the 'Exit' link in the UI, %squitquitquit or Ctrl-C to stop" % server_url)
if options.show_results:
# FIXME: This seems racy.
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -44,17 +44,17 @@
# FIXME: We could lookup what groups the current user is able to grant from bugzilla.
groups = tool.user.prompt_with_list(list_title, self.known_groups, can_choose_multiple=True)
if not groups:
- print "No groups specified."
+ print("No groups specified.")
return
login_userid_pairs = tool.bugs.queries.fetch_login_userid_pairs_matching_substring(search_string)
if not login_userid_pairs:
- print "No users found matching '%s'" % search_string
+ print("No users found matching '%s'" % search_string)
return
- print "Found %s users matching %s:" % (len(login_userid_pairs), search_string)
+ print("Found %s users matching %s:" % (len(login_userid_pairs), search_string))
for (login, user_id) in login_userid_pairs:
- print "%s (%s)" % (login, user_id)
+ print("%s (%s)" % (login, user_id))
confirm_message = "Are you sure you want add %s users to groups %s? (This action cannot be undone using webkit-patch.)" % (len(login_userid_pairs), groups)
if not tool.user.confirm(confirm_message):
@@ -61,5 +61,5 @@
return
for (login, user_id) in login_userid_pairs:
- print "Adding %s to %s" % (login, groups)
+ print("Adding %s to %s" % (login, groups))
tool.bugs.add_user_to_groups(user_id, groups)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -60,30 +60,30 @@
@staticmethod
def _generate_jsons(filesystem, jsons, output_dir):
for filename in jsons:
- print ' Generating', filename
+ print(' Generating', filename)
filesystem.write_text_file(filesystem.join(output_dir, filename), json.dumps(jsons[filename], indent=2))
def execute(self, options, args, tool):
filesystem = self._tool.filesystem
if len(args) < 1 or not filesystem.exists(args[0]):
- print "Need the directory name to look for changelog as the first argument"
+ print("Need the directory name to look for changelog as the first argument")
return
changelog_dir = filesystem.abspath(args[0])
if len(args) < 2 or not filesystem.exists(args[1]):
- print "Need the output directory name as the second argument"
+ print("Need the output directory name as the second argument")
return
output_dir = args[1]
startTime = time.time()
- print 'Enumerating ChangeLog files...'
+ print('Enumerating ChangeLog files...')
changelogs = AnalyzeChangeLog._enumerate_changelogs(filesystem, changelog_dir, options.changelog_count)
analyzer = ChangeLogAnalyzer(tool, changelogs)
analyzer.analyze()
- print 'Generating json files...'
+ print('Generating json files...')
json_files = {
'summary.json': analyzer.summary(),
'contributors.json': analyzer.contributors_statistics(),
@@ -91,11 +91,11 @@
}
AnalyzeChangeLog._generate_jsons(filesystem, json_files, output_dir)
commands_dir = filesystem.dirname(filesystem.path_to_module(self.__module__))
- print commands_dir
+ print(commands_dir)
filesystem.copyfile(filesystem.join(commands_dir, 'data/summary.html'), filesystem.join(output_dir, 'summary.html'))
tick = time.time() - startTime
- print 'Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60))
+ print('Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60)))
class ChangeLogAnalyzer(object):
@@ -132,7 +132,7 @@
def _set_filename(self, filename):
if self._filename:
- print
+ print()
self._filename = filename
def analyze(self):
@@ -142,7 +142,7 @@
self._print_status('Parsing entries...')
number_of_parsed_entries = self._analyze_entries(ChangeLog.parse_entries_from_file(changelog), path)
self._print_status('Done (%d entries)' % number_of_parsed_entries)
- print
+ print()
self._summary['contributors'] = len(self._contributors_statistics)
self._summary['contributors_with_reviews'] = sum([1 for contributor in self._contributors_statistics.values() if contributor['reviews']['total']])
self._summary['contributors_without_reviews'] = self._summary['contributors'] - self._summary['contributors_with_reviews']
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/bugfortest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/bugfortest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/bugfortest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -43,6 +43,6 @@
bug = reporter._lookup_bug_for_flaky_test(search_string)
if bug:
bug = reporter._follow_duplicate_chain(bug)
- print "%5s %s" % (bug.id(), bug.title())
+ print("%5s %s" % (bug.id(), bug.title()))
else:
- print "No bugs found matching '%s'" % search_string
+ print("No bugs found matching '%s'" % search_string)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -44,6 +44,6 @@
search_string = args[0]
bugs = tool.bugs.queries.fetch_bugs_matching_quicksearch(search_string)
for bug in bugs:
- print "%5s %s" % (bug.id(), bug.title())
+ print("%5s %s" % (bug.id(), bug.title()))
if not bugs:
- print "No bugs found matching '%s'" % search_string
+ print("No bugs found matching '%s'" % search_string)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/findusers.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/findusers.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/findusers.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -39,4 +39,4 @@
search_string = args[0]
users = CommitterList().contributors_by_search_string(search_string)
for user in users:
- print user
+ print(user)
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -39,8 +39,8 @@
]))
def execute(self, options, args, tool):
- print "This command runs a local HTTP server that changes your working copy"
- print "based on the actions you take in the web-based UI."
+ print("This command runs a local HTTP server that changes your working copy")
+ print("based on the actions you take in the web-based UI.")
args = {}
if options.platform:
@@ -55,5 +55,5 @@
httpd = GardeningHTTPServer(httpd_port=8127, config={'tool': tool, 'options': options})
self._tool.user.open_url(httpd.url(args))
- print "Local HTTP server started."
+ print("Local HTTP server started.")
httpd.serve_forever()
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -194,7 +194,7 @@
def execute(self, options, args, tool):
self._rebaseline_test_and_update_expectations(options)
- print json.dumps(self._scm_changes)
+ print(json.dumps(self._scm_changes))
class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand):
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -79,7 +79,7 @@
host = Host()
filesystem = host.filesystem
- print 'Parsing full_results.json...'
+ print('Parsing full_results.json...')
results_json_path = filesystem.join(results_directory, 'full_results.json')
results_json = json_results_generator.load_json(filesystem, results_json_path)
@@ -88,7 +88,7 @@
platforms = filesystem.listdir(filesystem.join(layout_tests_directory, 'platform'))
self._test_config = TestConfig(port, layout_tests_directory, results_directory, platforms, scm, host)
- print 'Gathering current baselines...'
+ print('Gathering current baselines...')
self._gather_baselines(results_json)
return {
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -37,11 +37,11 @@
def execute(self, options, args, tool):
if not isinstance(tool.scm(), Git):
- print "This command only works inside a Git checkout."
+ print("This command only works inside a Git checkout.")
return
if tool.scm().has_working_directory_changes():
- print "There are local changes; aborting the command."
+ print("There are local changes; aborting the command.")
return
username, email = self._get_username_and_email(tool)
@@ -72,9 +72,9 @@
if tool.user.confirm("Do you want to append the git branch name to every build? (e.g. WebKitBuild/mybranch/; y/n)"):
run_git(["config", "core.webKitBranchBuild", "true"])
- print "You can override this option via git config branch.$branchName.webKitBranchBuild (true|false)"
+ print("You can override this option via git config branch.$branchName.webKitBranchBuild (true|false)")
- print "Done"
+ print("Done")
def _get_username_and_email(self, tool):
try:
@@ -95,5 +95,5 @@
except ScriptError as error:
# VCSUtils prints useful error messages on failure, we shouldn't hide these
if error.output:
- print error.output
+ print(error.output)
raise
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -255,11 +255,11 @@
for nomination in sorted(nominations, nomination_cmp):
# This is a little bit of a hack, but its convienent to just pass the nomination dictionary to the formating operator.
nomination['roles_string'] = grammar.join_with_separators(nomination['roles']).upper()
- print "%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination
+ print("%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination)
counter = counters_by_email[nomination['author_email']]
if self.show_commits:
- print counter['commits']
+ print(counter['commits'])
def _print_counts(self, counters_by_email):
def counter_cmp(a_tuple, b_tuple):
@@ -288,9 +288,9 @@
for alias in counter['emails']:
alias_list.append(alias)
if alias_list:
- print "CONTRIBUTOR: %s (%s) has %s %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"), "(aliases: " + ", ".join(alias_list) + ")")
+ print("CONTRIBUTOR: %s (%s) has %s %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"), "(aliases: " + ", ".join(alias_list) + ")"))
else:
- print "CONTRIBUTOR: %s (%s) has %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"))
+ print("CONTRIBUTOR: %s (%s) has %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch")))
return
def execute(self, options, args, tool):
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/upload.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/commands/upload.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/upload.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -61,7 +61,7 @@
def execute(self, options, args, tool):
# This command is a useful test to make sure commit_message_for_this_commit
# always returns the right value regardless of the current working directory.
- print "%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message()
+ print("%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message())
class CleanPendingCommit(Command):
@@ -510,7 +510,7 @@
def prompt_for_bug_title_and_comment(self):
bug_title = User.prompt("Bug title: ")
# FIXME: User should provide a function for doing this multi-line prompt.
- print "Bug comment (hit ^D on blank line to end):"
+ print("Bug comment (hit ^D on blank line to end):")
lines = sys.stdin.readlines()
try:
sys.stdin.seek(0, os.SEEK_END)
Modified: trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -197,7 +197,7 @@
if args:
command = self._tool.command_by_name(args[0])
if command:
- print command.standalone_help()
+ print(command.standalone_help())
return 0
self.show_all_commands = options.show_all_commands
Modified: trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -73,14 +73,14 @@
return self.body if self.body else ''
def _serve_text(self, text):
- print "== Begin Response =="
- print text
- print "== End Response =="
+ print("== Begin Response ==")
+ print(text)
+ print("== End Response ==")
def _serve_json(self, json_object):
- print "== Begin JSON Response =="
- print json.dumps(json_object)
- print "== End JSON Response =="
+ print("== Begin JSON Response ==")
+ print(json.dumps(json_object))
+ print("== End JSON Response ==")
class GardeningServerTest(unittest.TestCase):
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -69,7 +69,7 @@
elif detection == "svn":
for filename in png_files:
if self._detector.exists(filename) and self._detector.propget('svn:mime-type', filename) != 'image/png':
- print "Adding image/png mime-type to %s" % filename
+ print("Adding image/png mime-type to %s" % filename)
self._detector.propset('svn:mime-type', 'image/png', filename)
def _check_pngs(self, changed_files):
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -43,8 +43,8 @@
return
reviewers = self._tool.checkout().suggested_reviewers(self._options.git_commit, self._changed_files(state))[:5]
- print "The following reviewers have recently modified files in your patch:"
- print ", ".join([reviewer.full_name for reviewer in reviewers])
+ print("The following reviewers have recently modified files in your patch:")
+ print(", ".join([reviewer.full_name for reviewer in reviewers]))
if not state.get('bug_id'):
return
Modified: trunk/Tools/Scripts/webkitpy/w3c/test_importer.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/w3c/test_importer.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_importer.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -529,7 +529,7 @@
should_update = self.options.clean_destination_directory
for full_path in self._slow_tests:
w3c_test_path = self.filesystem.relpath(full_path, self.source_directory)
- print w3c_test_path
+ print(w3c_test_path)
# No need to mark tests as slow if they are in skipped directories
if self._already_identified_as_resource_file(w3c_test_path):
continue
Modified: trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py (225697 => 225698)
--- trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -73,7 +73,7 @@
timeout = self._port.get_option('timeout')
for test in tests:
test_name = os.path.relpath(test, self._tests_dir())
- print test_name
+ print(test_name)
harness_result, test_results = executor.run(test, timeout)
result = WebDriverTestResult(test_name, *harness_result)
if harness_result[0] == 'OK':
Modified: trunk/Tools/TestResultServer/model/jsonresults_unittest.py (225697 => 225698)
--- trunk/Tools/TestResultServer/model/jsonresults_unittest.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/TestResultServer/model/jsonresults_unittest.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -30,7 +30,7 @@
import jsonresults
from jsonresults import JsonResults
except ImportError:
- print "ERROR: Add the TestResultServer, google_appengine and yaml/lib directories to your PYTHONPATH"
+ print("ERROR: Add the TestResultServer, google_appengine and yaml/lib directories to your PYTHONPATH")
raise
from django.utils import simplejson
Modified: trunk/Tools/gtk/ycm_extra_conf.py (225697 => 225698)
--- trunk/Tools/gtk/ycm_extra_conf.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/gtk/ycm_extra_conf.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -110,17 +110,17 @@
build_path = os.path.normpath(get_build_path())
if not build_path:
- print "Could not find WebKit build path."
+ print("Could not find WebKit build path.")
return result
database = ycm_core.CompilationDatabase(build_path)
if not database:
- print "Could not find compile_commands.json in %s, You might forget to add CMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeargs" % build_path
+ print("Could not find compile_commands.json in %s, You might forget to add CMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeargs" % build_path)
return result
compilation_info = database.GetCompilationInfoForFile(filename)
if not compilation_info:
- print "No compilation info."
+ print("No compilation info.")
return result
result['flags'] = transform_relative_paths_to_absolute_paths(list(compilation_info.compiler_flags_), compilation_info.compiler_working_dir_)
@@ -130,4 +130,4 @@
if __name__ == "__main__":
import sys
if len(sys.argv) >= 2:
- print FlagsForFile(sys.argv[1])
+ print(FlagsForFile(sys.argv[1]))
Modified: trunk/Tools/lldb/lldb_webkit.py (225697 => 225698)
--- trunk/Tools/lldb/lldb_webkit.py 2017-12-08 21:38:02 UTC (rev 225697)
+++ trunk/Tools/lldb/lldb_webkit.py 2017-12-08 21:56:09 UTC (rev 225698)
@@ -130,7 +130,7 @@
annotateJSFrames = False
if not annotateJSFrames:
- print "Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate _javascript_ frames"
+ print("Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate _javascript_ frames")
backtraceDepth = thread.GetNumFrames()
@@ -141,7 +141,7 @@
return
threadFormat = '* thread #{num}: tid = {tid:#x}, {pcAddr:' + addressFormat + '}, queue = \'{queueName}, stop reason = {stopReason}'
- print threadFormat.format(num=thread.GetIndexID(), tid=thread.GetThreadID(), pcAddr=thread.GetFrameAtIndex(0).GetPC(), queueName=thread.GetQueueName(), stopReason=thread.GetStopDescription(30))
+ print(threadFormat.format(num=thread.GetIndexID(), tid=thread.GetThreadID(), pcAddr=thread.GetFrameAtIndex(0).GetPC(), queueName=thread.GetQueueName(), stopReason=thread.GetStopDescription(30)))
for frame in thread:
if backtraceDepth < 1:
@@ -161,9 +161,9 @@
if JSFrameDescription:
JSFrameDescription = string.strip(JSFrameDescription, '"')
frameFormat = ' frame #{num}: {addr:' + addressFormat + '} {desc}'
- print frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription)
+ print(frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription))
continue
- print ' %s' % frame
+ print(' %s' % frame)
# FIXME: Provide support for the following types:
# def WTFVector_SummaryProvider(valobj, dict):