Bug 226018

Summary: Fix Python 3.6+ DeprecationWarnings about unknown escapes
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Tools / TestsAssignee: Sam Sneddon [:gsnedders] <gsnedders>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, cdumez, changseok, ews-watchlist, glenn, jbedard, keith_miller, mark.lam, mmaxfield, msaboff, rniwa, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Sam Sneddon [:gsnedders] 2021-05-20 07:11:54 PDT
See summary.
Comment 1 Sam Sneddon [:gsnedders] 2021-05-20 07:19:17 PDT
Created attachment 429168 [details]
Patch

This was generated by a slightly hacked at pyupgrade, to only fix this deprecation warning.
Comment 2 Jonathan Bedard 2021-05-20 07:29:58 PDT
Comment on attachment 429168 [details]
Patch

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

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:42
> +    DATA_RE = re.compile(br'<[SD]:(?P<tag>\S+)>(?P<content>.*)</[SD]:.+>')

I did not know that `br` actually worked!
Comment 3 Jonathan Bedard 2021-05-20 07:30:59 PDT
Comment on attachment 429168 [details]
Patch

Looks good, but I want to see some successful layout tests before landing, I suspect webkitpy tests aren't completely covering this change.
Comment 4 Sam Sneddon [:gsnedders] 2021-05-20 10:10:57 PDT
(In reply to Jonathan Bedard from comment #2)
> I did not know that `br` actually worked!

Python 2.7 and Python 3.3 added it, IIRC. The annoying thing is even once u'' was re-added to Python 3 (in 3.3), ur'' wasn't (because, IIRC, there are syntax differences).
Comment 5 EWS 2021-05-21 03:16:20 PDT
Committed r277853 (237995@main): <https://commits.webkit.org/237995@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 429168 [details].
Comment 6 Radar WebKit Bug Importer 2021-05-21 03:17:33 PDT
<rdar://problem/78303382>