Bug 225898 - [lint-test-expectations] Change shebang to Python 3
Summary: [lint-test-expectations] Change shebang to Python 3
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-17 17:27 PDT by Jonathan Bedard
Modified: 2021-05-18 12:03 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.97 KB, patch)
2021-05-17 17:35 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.28 KB, patch)
2021-05-18 09:31 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].