Ignore:
Timestamp:
Dec 9, 2017, 8:58:36 AM (7 years ago)
Author:
Konstantin Tokarev
Message:

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

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

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

(main):

Tools:

  • CygwinDownloader/cygwin-downloader.py:

(download_url_to_file):

  • Scripts/webkitpy/common/system/profiler.py:

(Perf.profile_after_exit):

  • Scripts/webkitpy/common/version_check.py:
  • Scripts/webkitpy/layout_tests/lint_test_expectations.py:

(main):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(main):

  • Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:

(run_server):

  • Scripts/webkitpy/tool/commands/analyzechangelog.py:

(ChangeLogAnalyzer._print_status):

  • Scripts/webkitpy/tool/commands/queries.py:

(BugsToCommit.execute):
(PatchesInCommitQueue.execute):
(PatchesToCommitQueue.execute):
(PatchesToReview._print_report):
(WhatBroke._print_builder_line):
(WhatBroke._print_blame_information_for_builder):
(WhatBroke.execute):
(ResultsFor._print_layout_test_results):
(ResultsFor.execute):
(FailureReason._print_blame_information_for_transition):
(FailureReason._explain_failures_for_builder):
(FailureReason._builder_to_explain):
(FailureReason.execute):
(FindFlakyTests._find_failures):
(FindFlakyTests._print_statistics):
(FindFlakyTests._walk_backwards_from):
(execute):
(PrintExpectations.execute):
(PrintBaselines.execute):
(PrintBaselines._print_baselines):
(FindResolvedBugs.execute):

  • Scripts/webkitpy/tool/commands/rebaseline.py:

(AbstractParallelRebaselineCommand._run_webkit_patch):
(AbstractParallelRebaselineCommand._rebaseline):

  • Scripts/webkitpy/tool/servers/gardeningserver.py:

(GardeningHTTPRequestHandler.rebaselineall):

  • Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:

(GardeningServerTest.disabled_test_rebaselineall.run_command):
(GardeningServerTest):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/Scripts/make-js-file-arrays.py

    r225698 r225724  
    2222# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2323
     24from __future__ import print_function
    2425import io
    2526import os
     
    6162
    6263    headerFile = open(headerPath, 'w')
    63     print >> headerFile, 'namespace {0:s} {{'.format(namespace)
     64    print('namespace {0:s} {{'.format(namespace), file=headerFile)
    6465
    6566    sourceFile = open(sourcePath, 'w')
    66     print >> sourceFile, '#include "{0:s}"'.format(os.path.basename(headerPath))
    67     print >> sourceFile, 'namespace {0:s} {{'.format(namespace)
     67    print('#include "{0:s}"'.format(os.path.basename(headerPath)), file=sourceFile)
     68    print('namespace {0:s} {{'.format(namespace), file=sourceFile)
    6869
    6970    jsm = JavascriptMinify()
     
    8283        variableName = os.path.splitext(os.path.basename(inputFileName))[0]
    8384
    84         print >> headerFile, 'extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size)
    85         print >> sourceFile, 'const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size)
     85        print('extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size), file=headerFile)
     86        print('const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size), file=sourceFile)
    8687
    8788        codepoints = map(ord, characters)
    8889        for codepointChunk in chunk(codepoints, 16):
    89             print >> sourceFile, '    {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk)))
     90            print('    {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk))), file=sourceFile)
    9091
    91         print >> sourceFile, '};'
     92        print('};', file=sourceFile)
    9293
    93     print >> headerFile, '}} // namespace {0:s}'.format(namespace)
    94     print >> sourceFile, '}} // namespace {0:s}'.format(namespace)
     94    print('}} // namespace {0:s}'.format(namespace), file=headerFile)
     95    print('}} // namespace {0:s}'.format(namespace), file=sourceFile)
    9596
    9697if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.