Bug 206840 - Python 3: generate-js-builtins hits SyntaxWarning for "is 0"
Summary: Python 3: generate-js-builtins hits SyntaxWarning for "is 0"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-27 13:15 PST by Stephan Szabo
Modified: 2020-01-27 15:24 PST (History)
10 users (show)

See Also:


Attachments
Replace use of "is 0" with "== 0". (1.30 KB, patch)
2020-01-27 13:23 PST, Stephan Szabo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Szabo 2020-01-27 13:15:03 PST
After switching up to python 3.8, generate-js-builtins.py hits a SyntaxWarning for the use of "is 0".

Apparently, per https://bugs.python.org/issue34850 this sort of usage happens to work on CPython by accident, but is not guaranteed to work on other python implementation or necessarily continue working in CPython.
The warning suggests replacing is with == for such cases.
Comment 1 Stephan Szabo 2020-01-27 13:23:26 PST
Created attachment 388892 [details]
Replace use of "is 0" with "== 0".
Comment 2 EWS Watchlist 2020-01-27 13:24:09 PST
This patch modifies the JS builtins code generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-builtins-generator-tests --reset-results`)
Comment 3 BJ Burg 2020-01-27 13:46:24 PST
Comment on attachment 388892 [details]
Replace use of "is 0" with "== 0".

rs=me
Comment 4 WebKit Commit Bot 2020-01-27 15:23:05 PST
Comment on attachment 388892 [details]
Replace use of "is 0" with "== 0".

Clearing flags on attachment: 388892

Committed r255186: <https://trac.webkit.org/changeset/255186>
Comment 5 WebKit Commit Bot 2020-01-27 15:23:06 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2020-01-27 15:24:14 PST
<rdar://problem/58936818>