Bug 180611 - [python] Replace print >> operator with print() function for python3 compatibility
Summary: [python] Replace print >> operator with print() function for python3 compatib...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Konstantin Tokarev
Keywords: InRadar
Depends on:
Reported: 2017-12-08 15:22 PST by Konstantin Tokarev
Modified: 2017-12-09 08:59 PST (History)
14 users (show)

See Also:

Patch (36.25 KB, patch)
2017-12-08 15:24 PST, Konstantin Tokarev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2017-12-08 15:22:06 PST
This patch converts uses of print with files or streams
Comment 1 Konstantin Tokarev 2017-12-08 15:24:40 PST
Created attachment 328878 [details]
Comment 2 Michael Catanzaro 2017-12-09 08:29:17 PST
Comment on attachment 328878 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=328878&action=review

OK, just watch webkitpy tests after it lands.

> Source/JavaScriptCore/Scripts/make-js-file-arrays.py:24
> +from __future__ import print_function

Do we have a plan for how to handle the migration for macOS? I expect python3 will just have to become a build requirement, right?
Comment 3 Konstantin Tokarev 2017-12-09 08:35:42 PST
For now there is no migration, all code is valid python2, it just will be gradually made compatible with python3. To avoid regressions, we'll need to add pylint --py3k to style checker, and probably use python3 on some bot after it can work.
Comment 4 Konstantin Tokarev 2017-12-09 08:36:28 PST
I mean it's a "modernization", not "migration" :)
Comment 5 WebKit Commit Bot 2017-12-09 08:58:40 PST
Comment on attachment 328878 [details]

Clearing flags on attachment: 328878

Committed r225724: <https://trac.webkit.org/changeset/225724>
Comment 6 WebKit Commit Bot 2017-12-09 08:58:42 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-12-09 08:59:44 PST