Bug 202473

Summary: Python 3: Add support in webkitpy.common.watchlist
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, commit-queue, dean_johnson, dewei_zhu, ews-watchlist, glenn, jbedard, slewis, 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=202462
Attachments:
Description Flags
Patch
none
Patch none

Jonathan Bedard
Reported 2019-10-02 09:12:09 PDT
Add webkitpy.common.watchlist to test-webkitpy-python3
Attachments
Patch (52.06 KB, patch)
2019-10-03 11:31 PDT, Jonathan Bedard
no flags
Patch (12.83 KB, patch)
2019-10-17 15:48 PDT, Jonathan Bedard
no flags
Jonathan Bedard
Comment 1 2019-10-03 11:31:28 PDT
Stephanie Lewis
Comment 2 2019-10-16 15:34:58 PDT
why are we removing raw strings? They don't appear to be different in python3 from a brief look.
Jonathan Bedard
Comment 3 2019-10-16 15:53:27 PDT
(In reply to Stephanie Lewis from comment #2) > why are we removing raw strings? They don't appear to be different in > python3 from a brief look. Because Python 2 and Python 3 have different rules for \ in r strings.
Jonathan Bedard
Comment 4 2019-10-16 15:54:08 PDT
(In reply to Jonathan Bedard from comment #3) > (In reply to Stephanie Lewis from comment #2) > > why are we removing raw strings? They don't appear to be different in > > python3 from a brief look. > > Because Python 2 and Python 3 have different rules for \ in r strings. Totally open to other ideas, but this was the easiest way to get things working in a compatible way.
dewei_zhu
Comment 5 2019-10-17 13:56:03 PDT
Comment on attachment 380145 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380145&action=review > Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py:46 > + ' "filename": ".*\\\\\\\\MyFileName\\\\.cpp",' Why do we need so may back slashes for first '\\'
Jonathan Bedard
Comment 6 2019-10-17 15:48:34 PDT
dewei_zhu
Comment 7 2019-10-18 14:33:39 PDT
Comment on attachment 381241 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381241&action=review > Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py:46 > + ' "filename": r".*MyFileName\\.cpp",' Can we still use raw string in Python3? Also regex before and after your change are not identical, we usually don't change test case itself when converting to be python3 compatible, do we?
Jonathan Bedard
Comment 8 2019-10-18 14:45:12 PDT
Comment on attachment 381241 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381241&action=review >> Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py:46 >> + ' "filename": r".*MyFileName\\.cpp",' > > Can we still use raw string in Python3? Also regex before and after your change are not identical, we usually don't change test case itself when converting to be python3 compatible, do we? We can. The are not identical, not sure why we had \M before, that's a special regex value (Like \s) in Python2, not exactly sure what it does, but we definitely shouldn't have been using it.
dewei_zhu
Comment 9 2019-10-18 14:52:07 PDT
r=me after discussing with Jonathan in person. It's probably OK to allow `ThisIsMyFileName.cpp` to match (which does not previously) as those are test cases.
WebKit Commit Bot
Comment 10 2019-10-18 16:54:37 PDT
The commit-queue encountered the following flaky tests while processing attachment 381241 [details]: inspector/console/webcore-logging.html bug 203118 (authors: drousso@apple.com and eric.carlson@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 11 2019-10-18 16:55:26 PDT
Comment on attachment 381241 [details] Patch Clearing flags on attachment: 381241 Committed r251312: <https://trac.webkit.org/changeset/251312>
WebKit Commit Bot
Comment 12 2019-10-18 16:55:28 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 13 2019-10-18 16:56:17 PDT
Note You need to log in before you can comment on or make changes to this bug.