WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
220200
Update root level scripts in Tools/Scripts to Python 3
https://bugs.webkit.org/show_bug.cgi?id=220200
Summary
Update root level scripts in Tools/Scripts to Python 3
Alexey Proskuryakov
Reported
2020-12-30 12:08:19 PST
Quite a few are still Python 2.
Attachments
proposed patch
(40.33 KB, patch)
2020-12-30 12:11 PST
,
Alexey Proskuryakov
darin
: review+
jbedard
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2020-12-30 12:11:06 PST
Created
attachment 416849
[details]
proposed patch
Darin Adler
Comment 2
2021-01-02 14:31:25 PST
Comment on
attachment 416849
[details]
proposed patch I’m assuming these changes are all compatible with both Python 2 and Python 3 even though the comment doesn’t say that specifically.
Alexey Proskuryakov
Comment 3
2021-01-05 08:51:25 PST
Comment on
attachment 416849
[details]
proposed patch Correct, I verified compatibility with both to the best of my ability.
Jonathan Bedard
Comment 4
2021-01-05 08:58:47 PST
Comment on
attachment 416849
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=416849&action=review
> Tools/Scripts/dump-webkit-tests-run:5 > +import six
Need to import webkitpy first to get the auto-installed six
> Tools/Scripts/dump-webkit-tests-run:19 > + six.print_("file not found: %s" % args[0], file=sys.stderr)
Could also use sys.stderr.write(...)
> Tools/Scripts/rebase-patch-after-webkit-move:52 > + for current_name, rebased_name in six.iteritems(REBASE_DICTIONARY):
Could just use ".items()" to avoid the six dependency (If we don't care about that, should probably import webkitpy so we get the auto-installed six)
> Tools/Scripts/sync-feature-defines:30 > +import six
Need to import webkitpy first so we get the auto-installed six.
Alexey Proskuryakov
Comment 5
2021-01-05 09:04:05 PST
> Could just use ".items()" to avoid the six dependency (If we don't care > about that, should probably import webkitpy so we get the auto-installed six)
While I didn't actually measure performance, it seems reasonable to keep using an iterator to avoid regressing it. Thank you for catching the auto-install issue!
Alexey Proskuryakov
Comment 6
2021-01-05 10:00:53 PST
Committed
https://trac.webkit.org/r271151
Radar WebKit Bug Importer
Comment 7
2021-01-05 10:01:25 PST
<
rdar://problem/72817606
>
Alexey Proskuryakov
Comment 8
2021-01-05 10:40:04 PST
Comment on
attachment 416849
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=416849&action=review
> Tools/Scripts/extract-dependencies-from-makefile:-37 > -from __future__ import print_function
This was necessary, removing it broke the build. Re-added in
r271159
. Will double-check the other print_function removals now.
Alexey Proskuryakov
Comment 9
2021-01-05 10:44:28 PST
Comment on
attachment 416849
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=416849&action=review
> Tools/Scripts/make-dist:-18 > -from __future__ import print_function
This was also needed, reverted in
r271161
. The rest of print_function removals were fine AFAICT.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug