Bug 231055

Summary: Python 3: run-inspector-generator-tests and generate-inspector-protocol-bindings.py
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Web InspectorAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bburg, don.olmstead, ews-watchlist, glenn, hi, inspector-bugzilla-changes, jbedard, joepeck, keith_miller, mark.lam, msaboff, pangle, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Fujii Hironori 2021-09-30 18:01:20 PDT
Let's convert run-inspector-generator-tests and generate-inspector-protocol-bindings.py to Python 3.
Comment 1 Fujii Hironori 2021-09-30 18:12:44 PDT
Created attachment 439810 [details]
Patch
Comment 2 EWS Watchlist 2021-09-30 18:13:47 PDT
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)
Comment 3 Devin Rousso 2021-10-01 12:06:29 PDT
Can you explain why this needs to be done?  AFAICT none of the other inspector protocol python scripts are Python3?
Comment 4 Jonathan Bedard 2021-10-01 12:18:23 PDT
(In reply to Devin Rousso from comment #3)
> Can you explain why this needs to be done?  AFAICT none of the other
> inspector protocol python scripts are Python3?

I think folks working on Windows are trying to drop Python 2 from their bots entirely.
Comment 5 Don Olmstead 2021-10-01 13:02:30 PDT
(In reply to Jonathan Bedard from comment #4)
> (In reply to Devin Rousso from comment #3)
> > Can you explain why this needs to be done?  AFAICT none of the other
> > inspector protocol python scripts are Python3?
> 
> I think folks working on Windows are trying to drop Python 2 from their bots
> entirely.

Yea dropping Python 2 would be great but I also thought Python 2 was leaving OS X in a default install.
Comment 6 Fujii Hironori 2021-10-03 13:09:31 PDT
(In reply to Devin Rousso from comment #3)
> Can you explain why this needs to be done?  AFAICT none of the other
> inspector protocol python scripts are Python3?

Because some Linux distributions don't allow packages to depends on Python 2, those scripts invokded while building WebKit have been Python 2&3 compatible since several years ago.
(Note that this patch isn't 2&3 compatible, and it is a test script.)
Comment 7 Alexey Proskuryakov 2021-10-04 10:19:54 PDT
I think that at this point, we are just converting everything on every platform to python3, and completely ignoring python2 compatibility.
Comment 8 Jonathan Bedard 2021-10-06 14:32:32 PDT
Comment on attachment 439810 [details]
Patch

We don't have this running in infrastructure anywhere, so this should be save to land
Comment 9 Fujii Hironori 2021-10-06 17:00:39 PDT
Comment on attachment 439810 [details]
Patch

Thank you very much for the reveiw.
Comment 10 EWS 2021-10-06 17:09:24 PDT
Committed r283682 (242620@main): <https://commits.webkit.org/242620@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439810 [details].
Comment 11 Radar WebKit Bug Importer 2021-10-06 17:10:24 PDT
<rdar://problem/83959145>