Bug 225898

Summary: [lint-test-expectations] Change shebang to Python 3
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ews-watchlist, glenn, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225925
Attachments:
Description Flags
Patch
none
Patch none

Description Jonathan Bedard 2021-05-17 17:27:46 PDT
lint-test-expectations should be invoked with Python 3.
Comment 1 Radar WebKit Bug Importer 2021-05-17 17:28:09 PDT
<rdar://problem/78130334>
Comment 2 Jonathan Bedard 2021-05-17 17:35:12 PDT
Created attachment 428898 [details]
Patch
Comment 3 Aakash Jain 2021-05-18 08:40:44 PDT
Comment on attachment 428898 [details]
Patch

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

> Tools/Scripts/webkitpy/common/version_check.py:-32
> -if sys.version < '2.7' or sys.version >= '2.8':

Are we dropping support for 2.7? If so, it would a good idea to have exit early here if this code is run with python 2.7 (or atleast print a warning that python 2.7 is not supported anymore).
Comment 4 Jonathan Bedard 2021-05-18 08:53:48 PDT
(In reply to Aakash Jain from comment #3)
> Comment on attachment 428898 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=428898&action=review
> 
> > Tools/Scripts/webkitpy/common/version_check.py:-32
> > -if sys.version < '2.7' or sys.version >= '2.8':
> 
> Are we dropping support for 2.7? If so, it would a good idea to have exit
> early here if this code is run with python 2.7 (or atleast print a warning
> that python 2.7 is not supported anymore).

I guess we can keep the "less than 2.7" check, the trouble is that this check applies to more than just this script. I object to enshrining version checks like this anyways, we support some versions of Python 3 right now, but even that depends on the script and platform (ie, windows supports Python 3.8+, Mac supports only supports up to Python 3.7)
Comment 5 Jonathan Bedard 2021-05-18 09:31:32 PDT
Created attachment 428946 [details]
Patch
Comment 6 EWS 2021-05-18 12:03:30 PDT
Committed r277668 (237870@main): <https://commits.webkit.org/237870@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428946 [details].