Changeset 225698 in webkit


Ignore:
Timestamp:
Dec 8, 2017 1:56:09 PM (6 years ago)
Author:
Konstantin Tokarev
Message:

[python] Replace print operator with print() function for python3 compatibility
https://bugs.webkit.org/show_bug.cgi?id=180592

Reviewed by Michael Catanzaro.

PerformanceTests:

  • JSBench/harness.py:

Source/JavaScriptCore:

  • Scripts/generateYarrUnicodePropertyTables.py:

(openOrExit):
(verifyUCDFilesExist):
(Aliases.parsePropertyAliasesFile):
(Aliases.parsePropertyValueAliasesFile):

  • Scripts/make-js-file-arrays.py:

(main):

  • generate-bytecode-files:

Source/WebCore/PAL:

  • AVFoundationSupport.py:

Tools:

  • 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):

LayoutTests:

  • 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):

Location:
trunk
Files:
63 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r225678 r225698  
     12017-12-08  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [python] Replace print operator with print() function for python3 compatibility
     4        https://bugs.webkit.org/show_bug.cgi?id=180592
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * html5lib/generate-test-wrappers.py:
     9        (_remove_stale_tests):
     10        * http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py:
     11        (web_socket_do_extra_handshake):
     12        * http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py:
     13        (web_socket_do_extra_handshake):
     14        * http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py:
     15        (web_socket_do_extra_handshake):
     16        * http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py:
     17        (web_socket_do_extra_handshake):
     18        * http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py:
     19        (web_socket_do_extra_handshake):
     20
    1212017-12-08  Ms2ger  <Ms2ger@igalia.com>
    222
  • trunk/LayoutTests/html5lib/generate-test-wrappers.py

    r144032 r225698  
    7676            name = self._test_name_from_harness_name(name)
    7777            if name not in test_names:
    78                 print "Removing %s, %s no longer exists." % (path, self._input_path(name))
     78                print("Removing %s, %s no longer exists." % (path, self._input_path(name)))
    7979                os.remove(path)
    8080
     
    8383            name = self._test_name_from_harness_name(name)
    8484            if name not in test_names:
    85                 print "Removing %s, %s no longer exists." % (path, self._input_path(name))
     85                print("Removing %s, %s no longer exists." % (path, self._input_path(name)))
    8686                os.remove(path)
    8787
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/bad-handshake-crash_wsh.py

    r94164 r225698  
    1111    msg += "\r\n"
    1212    request.connection.write(msg)
    13     print msg
     13    print(msg)
    1414    raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message.
    1515
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py

    r111554 r225698  
    1111    msg += '\r\n'
    1212    request.connection.write(msg)
    13     print msg
     13    print(msg)
    1414    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
    1515
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py

    r94164 r225698  
    1010    msg += '\r\n'
    1111    request.connection.write(msg)
    12     print msg
     12    print(msg)
    1313    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
    1414
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py

    r94164 r225698  
    1010    msg += '\r\n'
    1111    request.connection.write(msg)
    12     print msg
     12    print(msg)
    1313    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
    1414
  • trunk/LayoutTests/http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py

    r94164 r225698  
    1010    msg += '\r\n'
    1111    request.connection.write(msg)
    12     print msg
     12    print(msg)
    1313    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
    1414
  • trunk/PerformanceTests/ChangeLog

    r225524 r225698  
     12017-12-08  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [python] Replace print operator with print() function for python3 compatibility
     4        https://bugs.webkit.org/show_bug.cgi?id=180592
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * JSBench/harness.py:
     9
    1102017-12-01  Filip Pizlo  <fpizlo@apple.com>
    211
  • trunk/PerformanceTests/JSBench/harness.py

    r201339 r225698  
    4646
    4747if len(sys.argv) != 2:
    48     print "Use: python harness.py <JS executable>"
     48    print("Use: python harness.py <JS executable>")
    4949    exit(1)
    5050js = sys.argv[1]
     
    170170totals["cim"] *= 100
    171171
    172 print "Final results:"
    173 print u"  %(mean)fms \u00b1 %(cim)f%% (lower is better)" % totals
    174 print "  Standard deviation = %(sm)f%% of mean" % totals
    175 print "  Standard error = %(semm)f%% of mean" % totals
    176 print "  %(runs)d runs" % {"runs": runcount}
    177 print ""
    178 
    179 print "Result breakdown:"
    180 for benchmark in benchmarks:
    181     print "  %(benchmark)s:" % {"benchmark": benchmark}
     172print("Final results:")
     173print(u"  %(mean)fms \u00b1 %(cim)f%% (lower is better)" % totals)
     174print("  Standard deviation = %(sm)f%% of mean" % totals)
     175print("  Standard error = %(semm)f%% of mean" % totals)
     176print("  %(runs)d runs" % {"runs": runcount})
     177print("")
     178
     179print("Result breakdown:")
     180for benchmark in benchmarks:
     181    print("  %(benchmark)s:" % {"benchmark": benchmark})
    182182   
    183183    bmodes = modes["*"]
     
    186186
    187187    for mode in bmodes:
    188         print u"  %(mode)s: %(mean)fms \u00b1 %(cim)f%% (stddev=%(sm)f%%, stderr=%(semm)f%%)" % sresults[benchmark][mode]
    189 print ""
    190 
    191 print "Raw results:"
    192 for benchmark in benchmarks:
    193     print "  %(benchmark)s:" % {"benchmark": benchmark}
    194 
    195     bmodes = modes["*"]
    196     if benchmark in modes:
    197         bmodes = modes[benchmark]
    198 
    199     for mode in bmodes:
    200         print "    %(mode)s: %(results)s" % {
     188        print(u"  %(mode)s: %(mean)fms \u00b1 %(cim)f%% (stddev=%(sm)f%%, stderr=%(semm)f%%)" % sresults[benchmark][mode])
     189print("")
     190
     191print("Raw results:")
     192for benchmark in benchmarks:
     193    print("  %(benchmark)s:" % {"benchmark": benchmark})
     194
     195    bmodes = modes["*"]
     196    if benchmark in modes:
     197        bmodes = modes[benchmark]
     198
     199    for mode in bmodes:
     200        print("    %(mode)s: %(results)s" % {
    201201            "mode": mode,
    202202            "results": results[benchmark][mode]
    203         }
     203        })
  • trunk/Source/JavaScriptCore/ChangeLog

    r225697 r225698  
     12017-12-08  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [python] Replace print operator with print() function for python3 compatibility
     4        https://bugs.webkit.org/show_bug.cgi?id=180592
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * Scripts/generateYarrUnicodePropertyTables.py:
     9        (openOrExit):
     10        (verifyUCDFilesExist):
     11        (Aliases.parsePropertyAliasesFile):
     12        (Aliases.parsePropertyValueAliasesFile):
     13        * Scripts/make-js-file-arrays.py:
     14        (main):
     15        * generate-bytecode-files:
     16
    1172017-12-08  Mark Lam  <mark.lam@apple.com>
    218
  • trunk/Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py

    r223081 r225698  
    9393        return open(path, mode)
    9494    except IOError as e:
    95         print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)
     95        print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror))
    9696        exit(1)
    9797
     
    112112        fullPath = os.path.join(UCDDirectoryPath, file)
    113113        if not os.path.exists(fullPath):
    114             print "Couldn't find UCD file {0} at {1}".format(file, fullPath)
     114            print("Couldn't find UCD file {0} at {1}".format(file, fullPath))
    115115            missingFileCount = missingFileCount + 1
    116116    if missingFileCount:
     
    151151
    152152            if fullName in self.globalNameToAliases:
    153                 print "Error, already an alias for {}".format(fullName)
     153                print("Error, already an alias for {}".format(fullName))
    154154            else:
    155155                self.globalNameToAliases[fullName] = aliases
     
    184184
    185185            if fullName in mapToModify:
    186                 print "Error, already an {} alias for {}".format(propertyType, fullName)
     186                print("Error, already an {} alias for {}".format(propertyType, fullName))
    187187            else:
    188188                mapToModify[fullName] = aliases
  • trunk/Source/JavaScriptCore/Scripts/make-js-file-arrays.py

    r219289 r225698  
    4747    (options, arguments) = parser.parse_args()
    4848    if not options.namespace:
    49         print 'Error: must provide a namespace'
     49        print('Error: must provide a namespace')
    5050        parser.print_usage()
    5151        exit(-1)
    5252    if len(arguments) < 3:
    53         print 'Error: must provide at least 3 arguments'
     53        print('Error: must provide at least 3 arguments')
    5454        parser.print_usage()
    5555        exit(-1)
  • trunk/Source/JavaScriptCore/generate-bytecode-files

    r220753 r225698  
    9292        return open(path, mode)
    9393    except IOError as e:
    94         print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)
     94        print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror))
    9595        exit(1)
    9696
     
    218218        bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
    219219    except:
    220         print "Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())
     220        print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))
    221221
    222222    if bytecodeHFilename:
  • trunk/Source/WebCore/PAL/AVFoundationSupport.py

    r222148 r225698  
    4444
    4545
    46 print "/* Identifying AVFoundation Support */"
     46print("/* Identifying AVFoundation Support */")
    4747if lookFor("/include/AVFoundationCF/AVCFBase.h"):
    48     print "#define HAVE_AVCF 1"
     48    print("#define HAVE_AVCF 1")
    4949if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"):
    50     print "#define HAVE_AVCF_LEGIBLE_OUTPUT 1"
     50    print("#define HAVE_AVCF_LEGIBLE_OUTPUT 1")
    5151if lookFor("/include/AVFoundationCF/AVCFAssetResourceLoader.h"):
    52     print "#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1"
     52    print("#define HAVE_AVFOUNDATION_LOADER_DELEGATE 1")
    5353if lookFor("/include/AVFoundationCF/AVCFAsset.h"):
    5454    regexp = re.compile("AVCFURLAssetIsPlayableExtendedMIMEType")
    5555    if fileContains("/include/AVFoundationCF/AVCFAsset.h", regexp):
    56         print "#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1"
     56        print("#define HAVE_AVCFURL_PLAYABLE_MIMETYPE 1")
    5757if lookFor("/include/QuartzCore/CACFLayer.h"):
    5858    regexp = re.compile("CACFLayerSetContentsScale")
    5959    if fileContains("/include/QuartzCore/CACFLayer.h", regexp):
    60         print "#define HAVE_CACFLAYER_SETCONTENTSSCALE 1"
     60        print("#define HAVE_CACFLAYER_SETCONTENTSSCALE 1")
    6161if lookFor("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h"):
    6262    regexp = re.compile("kAVCFPlayerItemLegibleOutput_CallbacksVersion_2")
    6363    if fileContains("/include/AVFoundationCF/AVCFPlayerItemLegibleOutput.h", regexp):
    64         print "#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1"
     64        print("#define HAVE_AVCFPLAYERITEM_CALLBACK_VERSION_2 1")
  • trunk/Source/WebCore/PAL/ChangeLog

    r225696 r225698  
     12017-12-08  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [python] Replace print operator with print() function for python3 compatibility
     4        https://bugs.webkit.org/show_bug.cgi?id=180592
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * AVFoundationSupport.py:
     9
    1102017-12-08  Eric Carlson  <eric.carlson@apple.com>
    211
  • trunk/Tools/BuildSlaveSupport/wait-for-SVN-server.py

    r173871 r225698  
    3232    response = p.communicate()[0]
    3333    if p.returncode != 0:
    34         print "Can't connect to host: %s, return code %s " % (SVNServer, p.returncode)
    35         print "OUTPUT:"
    36         print response
     34        print("Can't connect to host: %s, return code %s " % (SVNServer, p.returncode))
     35        print("OUTPUT:")
     36        print(response)
    3737        return -1
    3838    try:
     
    4141        return el.getAttribute("revision")
    4242    except xml.parsers.expat.ExpatError, e:
    43         print "FAILED TO PARSE 'svn log' XML:"
    44         print str(e)
    45         print "----"
    46         print "RECEIVED TEXT:"
    47         print response
     43        print("FAILED TO PARSE 'svn log' XML:")
     44        print(str(e))
     45        print("----")
     46        print("RECEIVED TEXT:")
     47        print(response)
    4848        sys.exit(1)
    4949
     
    5252    if not revision or not revision.isdigit():
    5353        latestRevision = int(getLatestSVNRevision(SVNServer))
    54         print "Latest SVN revision on %s is r%d. Don't wait, because revision argument isn't a valid SVN revision." % (SVNServer, latestRevision)
     54        print("Latest SVN revision on %s is r%d. Don't wait, because revision argument isn't a valid SVN revision." % (SVNServer, latestRevision))
    5555        return
    5656
     
    5959        latestRevision = int(getLatestSVNRevision(SVNServer))
    6060        if latestRevision == -1:
    61             print "%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer)
     61            print("%s SVN server is unreachable. Sleeping for 60 seconds." % (SVNServer))
    6262            time.sleep(60)
    6363        elif latestRevision < revision:
    64             print "Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision)
     64            print("Latest SVN revision on %s is r%d, but we are waiting for r%d. Sleeping for 5 seconds." % (SVNServer, latestRevision, revision))
    6565            time.sleep(5)
    6666        else:
    67             print "Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision)
     67            print("Latest SVN revision on %s is r%d, which is newer or equal than r%d." % (SVNServer, latestRevision, revision))
    6868            break
    6969
  • trunk/Tools/ChangeLog

    r225696 r225698  
     12017-12-08  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        [python] Replace print operator with print() function for python3 compatibility
     4        https://bugs.webkit.org/show_bug.cgi?id=180592
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * BuildSlaveSupport/wait-for-SVN-server.py:
     9        (getLatestSVNRevision):
     10        (waitForSVNRevision):
     11        * Scripts/download-latest-github-release.py:
     12        (find_latest_release):
     13        (main):
     14        * Scripts/update-wasm-gcc-torture.py:
     15        (update_lkgr):
     16        (untar_torture):
     17        (list_js_files):
     18        (waterfall_known_failures):
     19        * Scripts/update-webkit-wincairo-libs.py:
     20        * Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
     21        (BenchmarkRunner.show_results):
     22        * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
     23        (SimpleHTTPServerDriver.fetch_result):
     24        * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
     25        (list_benchmark_plans):
     26        * Scripts/webkitpy/bindings/main.py:
     27        (BindingsTests.generate_from_idl):
     28        (BindingsTests.generate_supplemental_dependency):
     29        (BindingsTests.detect_changes):
     30        (BindingsTests.run_tests):
     31        (BindingsTests.main):
     32        * Scripts/webkitpy/codegen/main.py:
     33        (BuiltinsGeneratorTests.generate_from_js_builtins):
     34        (BuiltinsGeneratorTests.detect_changes):
     35        (BuiltinsGeneratorTests.single_builtin_test):
     36        (BuiltinsGeneratorTests.run_test):
     37        (BuiltinsGeneratorTests.run_tests):
     38        (BuiltinsGeneratorTests.main):
     39        * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
     40        (MockBugzilla.fetch_attachment):
     41        * Scripts/webkitpy/common/net/buildbot/buildbot.py:
     42        (Builder._fetch_revision_to_build_map):
     43        * Scripts/webkitpy/common/system/crashlogs.py:
     44        (CrashLogs._find_newest_log_win):
     45        * Scripts/webkitpy/common/system/outputcapture_unittest.py:
     46        (OutputCaptureTest.test_output_capture_scope):
     47        * Scripts/webkitpy/common/system/profiler.py:
     48        (GooglePProf.profile_after_exit):
     49        (Perf.profile_after_exit):
     50        * Scripts/webkitpy/common/system/user.py:
     51        (User.prompt_with_multiple_lists):
     52        (User.prompt_with_list):
     53        (User._warn_if_application_is_xcode):
     54        (User.edit_changelog):
     55        * Scripts/webkitpy/inspector/main.py:
     56        (InspectorGeneratorTests.generate_from_json):
     57        (InspectorGeneratorTests.detect_changes):
     58        (InspectorGeneratorTests.run_tests):
     59        (InspectorGeneratorTests.main):
     60        * Scripts/webkitpy/layout_tests/controllers/manager.py:
     61        (Manager._print_expectation_line_for_test):
     62        (Manager._print_expectations_for_subset):
     63        (Manager._print_expectations_for_subset.if):
     64        * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
     65        (run_server):
     66        * Scripts/webkitpy/port/config_standalone.py:
     67        (main):
     68        * Scripts/webkitpy/port/darwin_testcase.py:
     69        (DarwinTest.test_spindump.logging_run_command):
     70        (DarwinTest.test_sample_process.logging_run_command):
     71        * Scripts/webkitpy/port/ios.py:
     72        (IOSPort.clean_up_test_run):
     73        * Scripts/webkitpy/port/ios_device_unittest.py:
     74        (IOSDeviceTest.test_spindump.logging_run_command):
     75        (IOSDeviceTest.test_sample_process.logging_run_command):
     76        * Scripts/webkitpy/port/ios_simulator_unittest.py:
     77        (IOSSimulatorTest.test_xcrun.throwing_run_command):
     78        * Scripts/webkitpy/port/leakdetector_unittest.py:
     79        (test_count_total_bytes_and_unique_leaks.mock_run_script):
     80        * Scripts/webkitpy/port/mac_unittest.py:
     81        (MacTest.test_xcrun.throwing_run_command):
     82        * Scripts/webkitpy/style/checkers/contributors.py:
     83        (ContributorsChecker.check):
     84        * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
     85        (AbstractLocalServerCommand.execute):
     86        * Scripts/webkitpy/tool/commands/adduserstogroups.py:
     87        (AddUsersToGroups.execute):
     88        * Scripts/webkitpy/tool/commands/analyzechangelog.py:
     89        (AnalyzeChangeLog._generate_jsons):
     90        (AnalyzeChangeLog.execute):
     91        (ChangeLogAnalyzer._set_filename):
     92        (ChangeLogAnalyzer.analyze):
     93        * Scripts/webkitpy/tool/commands/bugfortest.py:
     94        (BugForTest.execute):
     95        * Scripts/webkitpy/tool/commands/bugsearch.py:
     96        (execute):
     97        * Scripts/webkitpy/tool/commands/findusers.py:
     98        (FindUsers.execute):
     99        * Scripts/webkitpy/tool/commands/gardenomatic.py:
     100        (GardenOMatic.execute):
     101        * Scripts/webkitpy/tool/commands/rebaseline.py:
     102        (RebaselineTest.execute):
     103        * Scripts/webkitpy/tool/commands/rebaselineserver.py:
     104        (RebaselineServer._prepare_config):
     105        * Scripts/webkitpy/tool/commands/setupgitclone.py:
     106        (SetupGitClone.execute):
     107        (SetupGitClone._get_username_and_email):
     108        * Scripts/webkitpy/tool/commands/suggestnominations.py:
     109        (SuggestNominations._print_nominations):
     110        (SuggestNominations._print_counts):
     111        * Scripts/webkitpy/tool/commands/upload.py:
     112        (CommitMessageForCurrentDiff.execute):
     113        (CreateBug.prompt_for_bug_title_and_comment):
     114        * Scripts/webkitpy/tool/multicommandtool.py:
     115        (HelpCommand.execute):
     116        * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
     117        (TestGardeningHTTPRequestHandler._serve_text):
     118        (TestGardeningHTTPRequestHandler._serve_json):
     119        * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py:
     120        (AddSvnMimetypeForPng.run):
     121        * Scripts/webkitpy/tool/steps/suggestreviewers.py:
     122        (SuggestReviewers.run):
     123        * Scripts/webkitpy/w3c/test_importer.py:
     124        (TestImporter.update_tests_options):
     125        * Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
     126        (WebDriverTestRunnerSelenium.run):
     127        * TestResultServer/model/jsonresults_unittest.py:
     128        * gtk/ycm_extra_conf.py:
     129        (FlagsForFile):
     130        * lldb/lldb_webkit.py:
     131        (btjs):
     132
    11332017-12-08  Eric Carlson  <eric.carlson@apple.com>
    2134
  • trunk/Tools/Scripts/download-latest-github-release.py

    r225498 r225698  
    7171        response = urllib2.urlopen(request)
    7272    except urllib2.URLError as error:
    73         print error
     73        print(error)
    7474        return None, None
    7575
     
    106106    version_info_path = binary_path + '.version'
    107107
    108     print 'Updating {}...'.format(args.filename)
     108    print('Updating {}...'.format(args.filename))
    109109
    110110    existing_version_info = load_version_info(version_info_path)
    111111    if existing_version_info:
    112         print 'Found existing release:', existing_version_info['tag_name']
     112        print('Found existing release:', existing_version_info['tag_name'])
    113113    else:
    114         print 'No existing release found.'
     114        print('No existing release found.')
    115115
    116     print 'Seeking latest release from {}...'.format(args.repo)
     116    print('Seeking latest release from {}...'.format(args.repo))
    117117    release_url, latest_version_info = find_latest_release(args)
    118118
    119119    if not latest_version_info:
    120120        if existing_version_info:
    121             print 'Falling back to existing release!'
     121            print('Falling back to existing release!')
    122122            return Status.USING_EXISTING
    123123
    124         print 'No release found!'
     124        print('No release found!')
    125125        return Status.COULD_NOT_FIND
    126126
    127     print 'Found latest release:', latest_version_info['tag_name']
     127    print('Found latest release:', latest_version_info['tag_name'])
    128128
    129129    if latest_version_info == existing_version_info:
    130         print 'Already up-to-date!'
     130        print('Already up-to-date!')
    131131        return Status.UP_TO_DATE
    132132
     
    134134        os.makedirs(args.output_dir)
    135135
    136     print 'Downloading to {}...'.format(os.path.abspath(args.output_dir))
     136    print('Downloading to {}...'.format(os.path.abspath(args.output_dir)))
    137137    download_release(release_url, binary_path)
    138138    save_version_info(version_info_path, latest_version_info)
    139     print 'Done!'
     139    print('Done!')
    140140
    141141    return Status.DOWNLOADED
  • trunk/Tools/Scripts/update-wasm-gcc-torture.py

    r215519 r225698  
    6565    lkgr_url = LKGR_URL % args.platform
    6666    if not args.lkgr:
    67         print 'Downloading: %s' % lkgr_url
     67        print('Downloading: %s' % lkgr_url)
    6868        args.lkgr = json.loads(urllib2.urlopen(lkgr_url).read())['build']
    69     print 'lkgr: %s' % args.lkgr
     69    print('lkgr: %s' % args.lkgr)
    7070
    7171
     
    7474    torture_url = TORTURE_URL % (args.platform, args.lkgr, torture_file)
    7575    if not os.path.exists(torture_file):
    76         print 'Downloading: %s' % torture_url
     76        print('Downloading: %s' % torture_url)
    7777        torture_download = urllib2.urlopen(torture_url)
    7878        with open(torture_file, 'wb') as f:
     
    8282            shutil.rmtree(TORTURE_DIR)
    8383        with tarfile.open(torture_file, 'r') as torture_tar:
    84             print 'Extracting: %s -> %s' % (torture_file, TORTURE_DIR)
     84            print('Extracting: %s -> %s' % (torture_file, TORTURE_DIR))
    8585            torture_tar.extractall()
    8686    assert os.path.isdir(TORTURE_DIR)
     
    8989def list_js_files(args):
    9090    js_files = sorted([os.path.basename(f) for f in glob.glob(os.path.join(TORTURE_DIR, '*.js'))])
    91     print 'Found %s JavaScript tests' % len(js_files)
     91    print('Found %s JavaScript tests' % len(js_files))
    9292    assert len(js_files) > 1200
    9393    return js_files
     
    103103    else:
    104104        args.waterfall_hash = subprocess.check_output(['git', 'log', '-n1', '--pretty=format:%H'], cwd=WATERFALL_DIR).strip()
    105     print 'Waterfall at: %s' % args.waterfall_hash
     105    print('Waterfall at: %s' % args.waterfall_hash)
    106106    known_failures = []
    107107    with open(os.path.join(WATERFALL_DIR, WATERFALL_KNOWN_FAILURES)) as failures_file:
  • trunk/Tools/Scripts/update-webkit-wincairo-libs.py

    r221191 r225698  
    3838# Only unzip if required
    3939if result == download.Status.DOWNLOADED:
    40     print 'Extracting release to {}...'.format(output)
     40    print('Extracting release to {}...'.format(output))
    4141    zip = zipfile.ZipFile(file, 'r')
    4242    zip.extractall(output)
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py

    r223341 r225698  
    157157    def show_results(cls, results, scale_unit=True):
    158158        results = BenchmarkResults(results)
    159         print results.format(scale_unit)
     159        print(results.format(scale_unit))
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py

    r225440 r225698  
    8080    def fetch_result(self):
    8181        (stdout, stderr) = self._server_process.communicate()
    82         print stderr
     82        print(stderr)
    8383        return stdout
    8484
  • trunk/Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py

    r224688 r225698  
    7070
    7171def list_benchmark_plans():
    72     print "Available benchmark plans: "
     72    print("Available benchmark plans: ")
    7373    for plan in BenchmarkRunner.available_plans():
    74         print "\t%s" % plan
     74        print("\t%s" % plan)
    7575
    7676
  • trunk/Tools/Scripts/webkitpy/bindings/main.py

    r220220 r225698  
    6565            output = self.executive.run_command(cmd)
    6666            if output:
    67                 print output
     67                print(output)
    6868        except ScriptError, e:
    69             print e.output
     69            print(e.output)
    7070            exit_code = e.exit_code
    7171        return exit_code
     
    9595            output = self.executive.run_command(cmd)
    9696            if output:
    97                 print output
     97                print(output)
    9898        except ScriptError, e:
    99             print e.output
     99            print(e.output)
    100100            exit_code = e.exit_code
    101101        os.remove(idl_files_list[1])
     
    119119
    120120            if exit_code or output:
    121                 print 'FAIL: (%s) %s' % (generator, output_file)
    122                 print output
     121                print('FAIL: (%s) %s' % (generator, output_file))
     122                print(output)
    123123                changes_found = True
    124124                if self.json_file_name:
    125125                    self.failures.append("(%s) %s" % (generator, output_file))
    126126            elif self.verbose:
    127                 print 'PASS: (%s) %s' % (generator, output_file)
     127                print('PASS: (%s) %s' % (generator, output_file))
    128128        return changes_found
    129129
     
    160160
    161161            if self.reset_results:
    162                 print "Reset results: (%s) %s" % (generator, input_file)
     162                print("Reset results: (%s) %s" % (generator, input_file))
    163163                continue
    164164
     
    183183        serviceworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
    184184        if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file, serviceworkerglobalscope_constructors_file):
    185             print 'Failed to generate a supplemental dependency file.'
     185            print('Failed to generate a supplemental dependency file.')
    186186            os.remove(supplemental_dependency_file)
    187187            os.remove(window_constructors_file)
     
    211211                json.dump(json_data, json_file)
    212212
    213         print ''
     213        print('')
    214214        if all_tests_passed:
    215             print 'All tests PASS!'
     215            print('All tests PASS!')
    216216            return 0
    217217        else:
    218             print 'Some tests FAIL! (To update the reference files, execute "run-bindings-tests --reset-results")'
     218            print('Some tests FAIL! (To update the reference files, execute "run-bindings-tests --reset-results")')
    219219            return -1
  • trunk/Tools/Scripts/webkitpy/codegen/main.py

    r203554 r225698  
    5959                self.write_error_file(framework_name + "JSBuiltins.h-error" if generate_wrappers else builtins_files[0], output_directory, stderr_output)
    6060        except ScriptError, e:
    61             print e.output
     61            print(e.output)
    6262            exit_code = e.exit_code
    6363        return exit_code
     
    8686
    8787            if exit_code or output:
    88                 print 'FAIL: %s' % output_file
    89                 print output
     88                print('FAIL: %s' % output_file)
     89                print(output)
    9090                changes_found = True
    9191            else:
    92                 print 'PASS: %s' % output_file
     92                print('PASS: %s' % output_file)
    9393        return changes_found
    9494
     
    9696        (framework_name, test_case, output_mode) = test_name.split('-')
    9797        if not framework_name or not output_mode or not test_case:
    98             print "Invalid test case name: should be Framework-TestCaseName-OutputMode.js"
     98            print("Invalid test case name: should be Framework-TestCaseName-OutputMode.js")
    9999            return False
    100100
     
    116116
    117117        if self.reset_results:
    118             print "Reset results for test: %s" % (test_name)
     118            print("Reset results for test: %s" % (test_name))
    119119            return True
    120120
     
    142142
    143143            if self.reset_results:
    144                 print "Reset results for test: %s" % (input_file)
     144                print("Reset results for test: %s" % (input_file))
    145145                continue
    146146
     
    162162            all_tests_passed = False
    163163
    164         print ''
     164        print('')
    165165        if all_tests_passed:
    166             print 'All tests PASS!'
     166            print('All tests PASS!')
    167167            return 0
    168168        else:
    169             print 'Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")'
     169            print('Some tests FAIL! (To update the reference files, execute "run-builtins-generator-tests --reset-results")')
    170170            return -1
  • trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py

    r223177 r225698  
    402402        attachment_dictionary = self.attachment_cache.get(attachment_id)
    403403        if not attachment_dictionary:
    404             print "MOCK: fetch_attachment: %s is not a known attachment id" % attachment_id
     404            print("MOCK: fetch_attachment: %s is not a known attachment id" % attachment_id)
    405405            return None
    406406        bug = self.fetch_bug(attachment_dictionary["bug_id"])
  • trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py

    r224691 r225698  
    159159            # FIXME: This is a poor way to do revision -> build mapping.
    160160            # Better would be to ask buildbot through some sort of API.
    161             print "Loading revision/build list from %s." % self.results_url()
    162             print "This may take a while..."
     161            print("Loading revision/build list from %s." % self.results_url())
     162            print("This may take a while...")
    163163            result_files = self._buildbot._fetch_twisted_directory_listing(self.results_url())
    164164        except urllib2.HTTPError, error:
  • trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py

    r220708 r225698  
    121121                        return errors + log_file
    122122            except IOError, e:
    123                 print "IOError %s" % str(e)
     123                print("IOError %s" % str(e))
    124124                if include_errors:
    125125                    errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e))
    126126            except OSError, e:
    127                 print "OSError %s" % str(e)
     127                print("OSError %s" % str(e))
    128128                if include_errors:
    129129                    errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e))
    130130            except UnicodeDecodeError, e:
    131                 print "UnicodeDecodeError %s" % str(e)
     131                print("UnicodeDecodeError %s" % str(e))
    132132                if include_errors:
    133133                    errors += u"ERROR: Failed to decode '%s' as ascii: %s\n" % (path, str(e))
  • trunk/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py

    r217758 r225698  
    6262        scope = OutputCaptureScope()
    6363        with scope:
    64             print 'STRING 1'
     64            print('STRING 1')
    6565        self.assertEqual(('STRING 1\n', '', ''), scope.captured_output)
    6666
    6767        with scope:
    68             print 'STRING 2'
     68            print('STRING 2')
    6969        self.assertEqual(('STRING 2\n', '', ''), scope.captured_output)
    7070
  • trunk/Tools/Scripts/webkitpy/common/system/profiler.py

    r166711 r225698  
    117117        # google-pprof doesn't check its arguments, so we have to.
    118118        if not (self._host.filesystem.exists(self._output_path)):
    119             print "Failed to gather profile, %s does not exist." % self._output_path
     119            print("Failed to gather profile, %s does not exist." % self._output_path)
    120120            return
    121121
    122122        pprof_args = [self._pprof_path(), '--text', self._executable_path, self._output_path]
    123123        profile_text = self._host.executive.run_command(pprof_args)
    124         print "First 10 lines of pprof --text:"
    125         print self._first_ten_lines_of_profile(profile_text)
    126         print "http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output."
    127         print
    128         print "To interact with the the full profile, including produce graphs:"
    129         print ' '.join([self._pprof_path(), self._executable_path, self._output_path])
     124        print("First 10 lines of pprof --text:")
     125        print(self._first_ten_lines_of_profile(profile_text))
     126        print("http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output.")
     127        print()
     128        print("To interact with the the full profile, including produce graphs:")
     129        print(' '.join([self._pprof_path(), self._executable_path, self._output_path]))
    130130
    131131
     
    172172            print "'perf record' failed, ",
    173173            if exit_code:
    174                 print "exit code was %i." % exit_code
     174                print("exit code was %i." % exit_code)
    175175            else:
    176                 print "the profiled process with pid %i is still running." % self._watched_pid
     176                print("the profiled process with pid %i is still running." % self._watched_pid)
    177177            return
    178178
    179179        perf_report_args = [self._perf_path(), 'report', '--call-graph', 'none', '--input', self._output_path]
    180180        perf_report_output = self._host.executive.run_command(perf_report_args)
    181         print "First 10 lines of 'perf report --call-graph=none':"
    182 
    183         print " ".join(perf_report_args)
    184         print "\n".join(self._first_ten_lines_of_profile(perf_report_output))
    185 
    186         print "To view the full profile, run:"
    187         print ' '.join([self._perf_path(), 'report', '-i', self._output_path])
    188         print  # An extra line between tests looks nicer.
     181        print("First 10 lines of 'perf report --call-graph=none':")
     182
     183        print(" ".join(perf_report_args))
     184        print("\n".join(self._first_ten_lines_of_profile(perf_report_output)))
     185
     186        print("To view the full profile, run:")
     187        print(' '.join([self._perf_path(), 'report', '-i', self._output_path]))
     188        print()  # An extra line between tests looks nicer.
    189189
    190190
  • trunk/Tools/Scripts/webkitpy/common/system/user.py

    r202362 r225698  
    7878        item_index = 0
    7979        cumulated_list = []
    80         print list_title
     80        print(list_title)
    8181        for i in range(len(subtitles)):
    82             print "\n" + subtitles[i]
     82            print("\n" + subtitles[i])
    8383            for item in lists[i]:
    8484                item_index += 1
    85                 print "%2d. %s" % (item_index, item)
     85                print("%2d. %s" % (item_index, item))
    8686            cumulated_list += lists[i]
    8787        return cls._wait_on_list_response(cumulated_list, can_choose_multiple, raw_input)
     
    116116    @classmethod
    117117    def prompt_with_list(cls, list_title, list_items, can_choose_multiple=False, raw_input=raw_input):
    118         print list_title
     118        print(list_title)
    119119        i = 0
    120120        for item in list_items:
    121121            i += 1
    122             print "%2d. %s" % (i, item)
     122            print("%2d. %s" % (i, item))
    123123        return cls._wait_on_list_response(list_items, can_choose_multiple, raw_input)
    124124
     
    134134    def _warn_if_application_is_xcode(self, edit_application):
    135135        if "Xcode" in edit_application:
    136             print "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\"."
     136            print("Instead of using Xcode.app, consider using EDITOR=\"xed --wait\".")
    137137
    138138    def edit_changelog(self, files):
     
    141141            # On Mac we support editing ChangeLogs using an application.
    142142            args = shlex.split(edit_application)
    143             print "Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable."
    144             print "Please quit the editor application when done editing."
     143            print("Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable.")
     144            print("Please quit the editor application when done editing.")
    145145            self._warn_if_application_is_xcode(edit_application)
    146146            subprocess.call(["open", "-W", "-n", "-a"] + args + files)
  • trunk/Tools/Scripts/webkitpy/inspector/main.py

    r210308 r225698  
    5555                self.write_error_file(json_file, output_directory, stderr_output)
    5656        except ScriptError, e:
    57             print e.output
     57            print(e.output)
    5858            exit_code = e.exit_code
    5959        return exit_code
     
    8282
    8383            if exit_code or output:
    84                 print 'FAIL: %s' % output_file
    85                 print output
     84                print('FAIL: %s' % output_file)
     85                print(output)
    8686                changes_found = True
    8787            else:
    88                 print 'PASS: %s' % output_file
     88                print('PASS: %s' % output_file)
    8989        return changes_found
    9090
     
    106106
    107107            if self.reset_results:
    108                 print "Reset results for test: %s" % (input_file)
     108                print("Reset results for test: %s" % (input_file))
    109109                continue
    110110
     
    139139            all_tests_passed = all_tests_passed and self.run_tests(platform_name, input_directory, reference_directory)
    140140
    141         print ''
     141        print('')
    142142        if all_tests_passed:
    143             print 'All tests PASS!'
     143            print('All tests PASS!')
    144144            return 0
    145145        else:
    146             print 'Some tests FAIL! (To update the reference files, execute "run-inspector-generator-tests --reset-results")'
     146            print('Some tests FAIL! (To update the reference files, execute "run-inspector-generator-tests --reset-results")')
    147147            return -1
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

    r223132 r225698  
    541541    def _print_expectation_line_for_test(self, format_string, test):
    542542        line = self._expectations.model().get_expectation_line(test)
    543         print format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string or '')
     543        print(format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string or ''))
    544544   
    545545    def _print_expectations_for_subset(self, device_class, test_col_width, tests_to_run, tests_to_skip={}):
    546546        format_string = '{{:{width}}} {{}} {{}} {{}}'.format(width=test_col_width)
    547547        if tests_to_skip:
    548             print ''
    549             print 'Tests to skip ({})'.format(len(tests_to_skip))
     548            print('')
     549            print('Tests to skip ({})'.format(len(tests_to_skip)))
    550550            for test in sorted(tests_to_skip):
    551551                self._print_expectation_line_for_test(format_string, test)
    552552
    553         print ''
    554         print 'Tests to run{} ({})'.format(' for ' + device_class if device_class else '', len(tests_to_run))
     553        print('')
     554        print('Tests to run{} ({})'.format(' for ' + device_class if device_class else '', len(tests_to_run)))
    555555        for test in sorted(tests_to_run):
    556556            self._print_expectation_line_for_test(format_string, test)
  • trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py

    r221869 r225698  
    6969
    7070    if options.web_platform_test_server:
    71         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))
    72         print "WebKit http/wpt tests are accessible at <%s>" % (web_platform_test_server.base_http_url(port) + "WebKit/")
     71        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)))
     72        print("WebKit http/wpt tests are accessible at <%s>" % (web_platform_test_server.base_http_url(port) + "WebKit/"))
    7373        port.start_web_platform_test_server()
    7474
     
    7777        http_port = options.http_port if options.http_port is not None else "8000"
    7878        if options.http_all_interfaces is not None:
    79             print "Starting httpd on port %s (all interfaces)" % http_port
     79            print("Starting httpd on port %s (all interfaces)" % http_port)
    8080        else:
    81             print "Starting httpd on <http://127.0.0.1:%s>" % http_port
     81            print("Starting httpd on <http://127.0.0.1:%s>" % http_port)
    8282
    8383        additionalDirs = {additional_dir[0]: additional_dir[1] for additional_dir in options.additional_dirs}
     
    8686
    8787    if options.url:
    88         print "Opening %s" % options.url
     88        print("Opening %s" % options.url)
    8989        subprocess.Popen(['open', options.url], stdout=subprocess.PIPE)
    9090
  • trunk/Tools/Scripts/webkitpy/port/config_standalone.py

    r140510 r225698  
    6464
    6565    c = config.Config(e, fs)
    66     print c.default_configuration()
     66    print(c.default_configuration())
    6767
    6868if __name__ == '__main__':
  • trunk/Tools/Scripts/webkitpy/port/darwin_testcase.py

    r217853 r225698  
    101101
    102102        def logging_run_command(args):
    103             print args
     103            print(args)
    104104
    105105        port = self.make_port()
     
    116116            if args[0] == '/usr/bin/sudo':
    117117                return 1
    118             print args
     118            print(args)
    119119            return 0
    120120
  • trunk/Tools/Scripts/webkitpy/port/ios.py

    r225229 r225698  
    191191            raise
    192192        elif len(exception_list) > 1:
    193             print '\n'
     193            print('\n')
    194194            for exception in exception_list:
    195195                _log.error('{} raised: {}'.format(exception[0].__class__.__name__, exception[0]))
  • trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py

    r221087 r225698  
    5151    def test_spindump(self):
    5252        def logging_run_command(args):
    53             print args
     53            print(args)
    5454
    5555        port = self.make_port()
     
    6565            if args[0] == '/usr/sbin/spindump':
    6666                return 1
    67             print args
     67            print(args)
    6868            return 0
    6969
  • trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py

    r221087 r225698  
    8282    def test_xcrun(self):
    8383        def throwing_run_command(args):
    84             print args
     84            print(args)
    8585            raise ScriptError("MOCK script error")
    8686
  • trunk/Tools/Scripts/webkitpy/port/leakdetector_unittest.py

    r225496 r225698  
    128128
    129129        def mock_run_script(name, args, include_configuration_arguments=False):
    130             print "MOCK _run_script: %s %s" % (name, args)
     130            print("MOCK _run_script: %s %s" % (name, args))
    131131            return """1 calls for 16 bytes: -[NSURLRequest mutableCopyWithZone:] | +[NSObject(NSObject) allocWithZone:] | _internal_class_createInstanceFromZone | calloc | malloc_zone_calloc
    132132
  • trunk/Tools/Scripts/webkitpy/port/mac_unittest.py

    r224688 r225698  
    137137    def test_xcrun(self):
    138138        def throwing_run_command(args):
    139             print args
     139            print(args)
    140140            raise ScriptError("MOCK script error")
    141141
  • trunk/Tools/Scripts/webkitpy/style/checkers/contributors.py

    r206967 r225698  
    4646        if diff:
    4747            self._handle_style_error(0, 'json/syntax', 5, 'contributors.json differs from the canonical format. Use "validate-committer-lists --canonicalize" to reformat it.')
    48             print diff
     48            print(diff)
    4949
    5050    def _unidiff_output(self, expected, actual):
  • trunk/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py

    r148360 r225698  
    4747
    4848        server_url = "http://localhost:%d%s" % (options.httpd_port, self.launch_path)
    49         print "Starting server at %s" % server_url
    50         print "Use the 'Exit' link in the UI, %squitquitquit or Ctrl-C to stop" % server_url
     49        print("Starting server at %s" % server_url)
     50        print("Use the 'Exit' link in the UI, %squitquitquit or Ctrl-C to stop" % server_url)
    5151
    5252        if options.show_results:
  • trunk/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py

    r148360 r225698  
    4545        groups = tool.user.prompt_with_list(list_title, self.known_groups, can_choose_multiple=True)
    4646        if not groups:
    47             print "No groups specified."
     47            print("No groups specified.")
    4848            return
    4949
    5050        login_userid_pairs = tool.bugs.queries.fetch_login_userid_pairs_matching_substring(search_string)
    5151        if not login_userid_pairs:
    52             print "No users found matching '%s'" % search_string
     52            print("No users found matching '%s'" % search_string)
    5353            return
    5454
    55         print "Found %s users matching %s:" % (len(login_userid_pairs), search_string)
     55        print("Found %s users matching %s:" % (len(login_userid_pairs), search_string))
    5656        for (login, user_id) in login_userid_pairs:
    57             print "%s (%s)" % (login, user_id)
     57            print("%s (%s)" % (login, user_id))
    5858
    5959        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)
     
    6262
    6363        for (login, user_id) in login_userid_pairs:
    64             print "Adding %s to %s" % (login, groups)
     64            print("Adding %s to %s" % (login, groups))
    6565            tool.bugs.add_user_to_groups(user_id, groups)
  • trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py

    r150237 r225698  
    6161    def _generate_jsons(filesystem, jsons, output_dir):
    6262        for filename in jsons:
    63             print '    Generating', filename
     63            print('    Generating', filename)
    6464            filesystem.write_text_file(filesystem.join(output_dir, filename), json.dumps(jsons[filename], indent=2))
    6565
     
    6767        filesystem = self._tool.filesystem
    6868        if len(args) < 1 or not filesystem.exists(args[0]):
    69             print "Need the directory name to look for changelog as the first argument"
     69            print("Need the directory name to look for changelog as the first argument")
    7070            return
    7171        changelog_dir = filesystem.abspath(args[0])
    7272
    7373        if len(args) < 2 or not filesystem.exists(args[1]):
    74             print "Need the output directory name as the second argument"
     74            print("Need the output directory name as the second argument")
    7575            return
    7676        output_dir = args[1]
     
    7878        startTime = time.time()
    7979
    80         print 'Enumerating ChangeLog files...'
     80        print('Enumerating ChangeLog files...')
    8181        changelogs = AnalyzeChangeLog._enumerate_changelogs(filesystem, changelog_dir, options.changelog_count)
    8282
     
    8484        analyzer.analyze()
    8585
    86         print 'Generating json files...'
     86        print('Generating json files...')
    8787        json_files = {
    8888            'summary.json': analyzer.summary(),
     
    9292        AnalyzeChangeLog._generate_jsons(filesystem, json_files, output_dir)
    9393        commands_dir = filesystem.dirname(filesystem.path_to_module(self.__module__))
    94         print commands_dir
     94        print(commands_dir)
    9595        filesystem.copyfile(filesystem.join(commands_dir, 'data/summary.html'), filesystem.join(output_dir, 'summary.html'))
    9696
    9797        tick = time.time() - startTime
    98         print 'Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60))
     98        print('Finished in %02dm:%02ds' % (int(tick / 60), int(tick % 60)))
    9999
    100100
     
    133133    def _set_filename(self, filename):
    134134        if self._filename:
    135             print
     135            print()
    136136        self._filename = filename
    137137
     
    143143                number_of_parsed_entries = self._analyze_entries(ChangeLog.parse_entries_from_file(changelog), path)
    144144            self._print_status('Done (%d entries)' % number_of_parsed_entries)
    145         print
     145        print()
    146146        self._summary['contributors'] = len(self._contributors_statistics)
    147147        self._summary['contributors_with_reviews'] = sum([1 for contributor in self._contributors_statistics.values() if contributor['reviews']['total']])
  • trunk/Tools/Scripts/webkitpy/tool/commands/bugfortest.py

    r148360 r225698  
    4444        if bug:
    4545            bug = reporter._follow_duplicate_chain(bug)
    46             print "%5s %s" % (bug.id(), bug.title())
     46            print("%5s %s" % (bug.id(), bug.title()))
    4747        else:
    48             print "No bugs found matching '%s'" % search_string
     48            print("No bugs found matching '%s'" % search_string)
  • trunk/Tools/Scripts/webkitpy/tool/commands/bugsearch.py

    r148360 r225698  
    4545        bugs = tool.bugs.queries.fetch_bugs_matching_quicksearch(search_string)
    4646        for bug in bugs:
    47             print "%5s %s" % (bug.id(), bug.title())
     47            print("%5s %s" % (bug.id(), bug.title()))
    4848        if not bugs:
    49             print "No bugs found matching '%s'" % search_string
     49            print("No bugs found matching '%s'" % search_string)
  • trunk/Tools/Scripts/webkitpy/tool/commands/findusers.py

    r174385 r225698  
    4040        users = CommitterList().contributors_by_search_string(search_string)
    4141        for user in users:
    42             print user
     42            print(user)
  • trunk/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py

    r148502 r225698  
    4040
    4141    def execute(self, options, args, tool):
    42         print "This command runs a local HTTP server that changes your working copy"
    43         print "based on the actions you take in the web-based UI."
     42        print("This command runs a local HTTP server that changes your working copy")
     43        print("based on the actions you take in the web-based UI.")
    4444
    4545        args = {}
     
    5656        self._tool.user.open_url(httpd.url(args))
    5757
    58         print "Local HTTP server started."
     58        print("Local HTTP server started.")
    5959        httpd.serve_forever()
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

    r202319 r225698  
    195195    def execute(self, options, args, tool):
    196196        self._rebaseline_test_and_update_expectations(options)
    197         print json.dumps(self._scm_changes)
     197        print(json.dumps(self._scm_changes))
    198198
    199199
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py

    r160848 r225698  
    8080        filesystem = host.filesystem
    8181
    82         print 'Parsing full_results.json...'
     82        print('Parsing full_results.json...')
    8383        results_json_path = filesystem.join(results_directory, 'full_results.json')
    8484        results_json = json_results_generator.load_json(filesystem, results_json_path)
     
    8989        self._test_config = TestConfig(port, layout_tests_directory, results_directory, platforms, scm, host)
    9090
    91         print 'Gathering current baselines...'
     91        print('Gathering current baselines...')
    9292        self._gather_baselines(results_json)
    9393
  • trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py

    r219197 r225698  
    3838    def execute(self, options, args, tool):
    3939        if not isinstance(tool.scm(), Git):
    40             print "This command only works inside a Git checkout."
     40            print("This command only works inside a Git checkout.")
    4141            return
    4242
    4343        if tool.scm().has_working_directory_changes():
    44             print "There are local changes; aborting the command."
     44            print("There are local changes; aborting the command.")
    4545            return
    4646
     
    7373        if tool.user.confirm("Do you want to append the git branch name to every build? (e.g. WebKitBuild/mybranch/; y/n)"):
    7474            run_git(["config", "core.webKitBranchBuild", "true"])
    75             print "You can override this option via git config branch.$branchName.webKitBranchBuild (true|false)"
     75            print("You can override this option via git config branch.$branchName.webKitBranchBuild (true|false)")
    7676
    77         print "Done"
     77        print("Done")
    7878
    7979    def _get_username_and_email(self, tool):
     
    9696            # VCSUtils prints useful error messages on failure, we shouldn't hide these
    9797            if error.output:
    98                 print error.output
     98                print(error.output)
    9999            raise
  • trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py

    r223177 r225698  
    256256            # This is a little bit of a hack, but its convienent to just pass the nomination dictionary to the formating operator.
    257257            nomination['roles_string'] = grammar.join_with_separators(nomination['roles']).upper()
    258             print "%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination
     258            print("%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination)
    259259            counter = counters_by_email[nomination['author_email']]
    260260
    261261            if self.show_commits:
    262                 print counter['commits']
     262                print(counter['commits'])
    263263
    264264    def _print_counts(self, counters_by_email):
     
    289289                alias_list.append(alias)
    290290            if alias_list:
    291                 print "CONTRIBUTOR: %s (%s) has %s %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"), "(aliases: " + ", ".join(alias_list) + ")")
     291                print("CONTRIBUTOR: %s (%s) has %s %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"), "(aliases: " + ", ".join(alias_list) + ")"))
    292292            else:
    293                 print "CONTRIBUTOR: %s (%s) has %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch"))
     293                print("CONTRIBUTOR: %s (%s) has %s" % (author_name, author_email, grammar.pluralize(patch_count, "reviewed patch")))
    294294        return
    295295
  • trunk/Tools/Scripts/webkitpy/tool/commands/upload.py

    r221567 r225698  
    6262        # This command is a useful test to make sure commit_message_for_this_commit
    6363        # always returns the right value regardless of the current working directory.
    64         print "%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message()
     64        print("%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message())
    6565
    6666
     
    511511        bug_title = User.prompt("Bug title: ")
    512512        # FIXME: User should provide a function for doing this multi-line prompt.
    513         print "Bug comment (hit ^D on blank line to end):"
     513        print("Bug comment (hit ^D on blank line to end):")
    514514        lines = sys.stdin.readlines()
    515515        try:
  • trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py

    r215982 r225698  
    198198            command = self._tool.command_by_name(args[0])
    199199            if command:
    200                 print command.standalone_help()
     200                print(command.standalone_help())
    201201                return 0
    202202
  • trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py

    r174136 r225698  
    7474
    7575    def _serve_text(self, text):
    76         print "== Begin Response =="
    77         print text
    78         print "== End Response =="
     76        print("== Begin Response ==")
     77        print(text)
     78        print("== End Response ==")
    7979
    8080    def _serve_json(self, json_object):
    81         print "== Begin JSON Response =="
    82         print json.dumps(json_object)
    83         print "== End JSON Response =="
     81        print("== Begin JSON Response ==")
     82        print(json.dumps(json_object))
     83        print("== End JSON Response ==")
    8484
    8585
  • trunk/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py

    r135744 r225698  
    7070                for filename in png_files:
    7171                    if self._detector.exists(filename) and self._detector.propget('svn:mime-type', filename) != 'image/png':
    72                         print "Adding image/png mime-type to %s" % filename
     72                        print("Adding image/png mime-type to %s" % filename)
    7373                        self._detector.propset('svn:mime-type', 'image/png', filename)
    7474
  • trunk/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py

    r143033 r225698  
    4444
    4545        reviewers = self._tool.checkout().suggested_reviewers(self._options.git_commit, self._changed_files(state))[:5]
    46         print "The following reviewers have recently modified files in your patch:"
    47         print ", ".join([reviewer.full_name for reviewer in reviewers])
     46        print("The following reviewers have recently modified files in your patch:")
     47        print(", ".join([reviewer.full_name for reviewer in reviewers]))
    4848
    4949        if not state.get('bug_id'):
  • trunk/Tools/Scripts/webkitpy/w3c/test_importer.py

    r223273 r225698  
    530530        for full_path in self._slow_tests:
    531531            w3c_test_path = self.filesystem.relpath(full_path, self.source_directory)
    532             print w3c_test_path
     532            print(w3c_test_path)
    533533            # No need to mark tests as slow if they are in skipped directories
    534534            if self._already_identified_as_resource_file(w3c_test_path):
  • trunk/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py

    r225390 r225698  
    7474        for test in tests:
    7575            test_name = os.path.relpath(test, self._tests_dir())
    76             print test_name
     76            print(test_name)
    7777            harness_result, test_results = executor.run(test, timeout)
    7878            result = WebDriverTestResult(test_name, *harness_result)
  • trunk/Tools/TestResultServer/model/jsonresults_unittest.py

    r157359 r225698  
    3131    from jsonresults import JsonResults
    3232except ImportError:
    33     print "ERROR: Add the TestResultServer, google_appengine and yaml/lib directories to your PYTHONPATH"
     33    print("ERROR: Add the TestResultServer, google_appengine and yaml/lib directories to your PYTHONPATH")
    3434    raise
    3535
  • trunk/Tools/gtk/ycm_extra_conf.py

    r225047 r225698  
    111111    build_path = os.path.normpath(get_build_path())
    112112    if not build_path:
    113         print "Could not find WebKit build path."
     113        print("Could not find WebKit build path.")
    114114        return result
    115115
    116116    database = ycm_core.CompilationDatabase(build_path)
    117117    if not database:
    118         print "Could not find compile_commands.json in %s, You might forget to add CMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeargs" % build_path
     118        print("Could not find compile_commands.json in %s, You might forget to add CMAKE_EXPORT_COMPILE_COMMANDS=ON to cmakeargs" % build_path)
    119119        return result
    120120
    121121    compilation_info = database.GetCompilationInfoForFile(filename)
    122122    if not compilation_info:
    123         print "No compilation info."
     123        print("No compilation info.")
    124124        return result
    125125
     
    131131    import sys
    132132    if len(sys.argv) >= 2:
    133         print FlagsForFile(sys.argv[1])
     133        print(FlagsForFile(sys.argv[1]))
  • trunk/Tools/lldb/lldb_webkit.py

    r219637 r225698  
    131131
    132132    if not annotateJSFrames:
    133         print "Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate JavaScript frames"
     133        print("Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate JavaScript frames")
    134134
    135135    backtraceDepth = thread.GetNumFrames()
     
    142142
    143143    threadFormat = '* thread #{num}: tid = {tid:#x}, {pcAddr:' + addressFormat + '}, queue = \'{queueName}, stop reason = {stopReason}'
    144     print threadFormat.format(num=thread.GetIndexID(), tid=thread.GetThreadID(), pcAddr=thread.GetFrameAtIndex(0).GetPC(), queueName=thread.GetQueueName(), stopReason=thread.GetStopDescription(30))
     144    print(threadFormat.format(num=thread.GetIndexID(), tid=thread.GetThreadID(), pcAddr=thread.GetFrameAtIndex(0).GetPC(), queueName=thread.GetQueueName(), stopReason=thread.GetStopDescription(30)))
    145145
    146146    for frame in thread:
     
    162162                JSFrameDescription = string.strip(JSFrameDescription, '"')
    163163                frameFormat = '    frame #{num}: {addr:' + addressFormat + '} {desc}'
    164                 print frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription)
     164                print(frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription))
    165165                continue
    166         print '    %s' % frame
     166        print('    %s' % frame)
    167167
    168168# FIXME: Provide support for the following types:
Note: See TracChangeset for help on using the changeset viewer.