Summary: | Python 3: Add support in webkitpy.common.watchlist | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||
Component: | Tools / Tests | Assignee: | 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
Jonathan Bedard
2019-10-02 09:12:09 PDT
Created attachment 380145 [details]
Patch
why are we removing raw strings? They don't appear to be different in python3 from a brief look. (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. (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. 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 '\\' Created attachment 381241 [details]
Patch
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? 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. 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. 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. Comment on attachment 381241 [details] Patch Clearing flags on attachment: 381241 Committed r251312: <https://trac.webkit.org/changeset/251312> All reviewed patches have been landed. Closing bug. |