Bug 226018 - Fix Python 3.6+ DeprecationWarnings about unknown escapes
Summary: Fix Python 3.6+ DeprecationWarnings about unknown escapes
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: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-20 07:11 PDT by Sam Sneddon [:gsnedders]
Modified: 2021-05-21 03:17 PDT (History)
14 users (show)

See Also:


Attachments
Patch (85.93 KB, patch)
2021-05-20 07:19 PDT, Sam Sneddon [:gsnedders]
no flags Details | Formatted Diff | Diff

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