Title: [277853] trunk
Revision
277853
Author
gsnedd...@apple.com
Date
2021-05-21 03:16:11 -0700 (Fri, 21 May 2021)

Log Message

Fix Python 3.6+ DeprecationWarnings about unknown escapes
https://bugs.webkit.org/show_bug.cgi?id=226018

Reviewed by Jonathan Bedard.

Fix Python 3.6+ DeprecationWarnings about unknown escapes

PerformanceTests:

* JetStream2/RAMification.py:
* JetStream2/RexBench/FlightPlanner/convert-nfdc.py:
* RexBench/FlightPlanner/convert-nfdc.py:

Source/_javascript_Core:

* wasm/generateWasmB3IRGeneratorInlinesHeader.py:

Source/WebCore:

No new tests.

* Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py:

Tools:

* CISupport/build-webkit-org/loadConfig.py:
(getTagsForBuilder):
* CISupport/build-webkit-org/steps.py:
(RunGLibAPITests.commandComplete):
(RunWebDriverTests.commandComplete):
* CISupport/ews-app/ews/common/bugzilla.py:
(BugzillaBeautifulSoup._parse_attachment_ids_request_query):
* CISupport/ews-app/ews/common/buildbot.py:
(Buildbot._get_display_name_from_builder_name):
* CISupport/ews-build/loadConfig.py:
(getTagsForBuilder):
* CISupport/ews-build/steps.py:
(CleanUpGitIndexLock.start):
(FindModifiedLayoutTests):
(BuildLogLineObserver.__init__):
(PushCommitToWebKitRepo):
* CISupport/ews-build/steps_unittest.py:
* Scripts/ic-stats.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
(Svn):
* Scripts/webkitpy/common/checkout/changelog.py:
(parse_bug_id_from_changelog):
(ChangeLogEntry):
(update_with_unreviewed_message):
(set_reviewer):
* Scripts/webkitpy/common/checkout/diff_parser.py:
(git_diff_to_svn_diff):
* Scripts/webkitpy/common/checkout/diff_test_data.py:
* Scripts/webkitpy/common/checkout/scm/commitmessage.py:
(_first_non_empty_line_after_index):
(CommitMessage.description):
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.commit_success_regexp):
(Git.timestamp_of_revision):
(Git.git_commit_from_svn_revision):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.strip_r_from_svn_revision):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.commit_success_regexp):
(SVN.revisions_changing_file):
* Scripts/webkitpy/common/checksvnconfigfile.py:
(check):
* Scripts/webkitpy/common/config/contributionareas.py:
(ContributionAreas._split_camelcase):
* Scripts/webkitpy/common/config/urls.py:
* Scripts/webkitpy/common/find_files_unittest.py:
(TestWinNormalize.assert_filesystem_normalizes):
* Scripts/webkitpy/common/net/bugzilla/bug.py:
(Bug.commit_revision):
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries._parse_attachment_ids_request_query):
(Bugzilla._parse_bug_id_from_attachment_page):
(Bugzilla._parse_attachment_id_from_add_patch_to_bug_response):
(Bugzilla._check_create_bug_response):
* Scripts/webkitpy/common/net/buildbot/buildbot.py:
(BuildBot._parse_current_build_cell):
* Scripts/webkitpy/common/net/credentials.py:
(Credentials._parse_security_tool_output):
* Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
(ParsedJSONResultsTest):
* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs.get_timestamp_from_log):
* Scripts/webkitpy/common/system/crashlogs_unittest.py:
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.available_sdks):
* Scripts/webkitpy/common/system/user.py:
(User._wait_on_list_response):
* Scripts/webkitpy/common/watchlist/watchlistparser.py:
(WatchListParser._rule_definitions_as_set):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser):
(TestExpectationParser._parse_modifiers):
(TestExpectationParser._tokenize_line):
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
* Scripts/webkitpy/port/base.py:
(Port._natural_sort_key):
* Scripts/webkitpy/port/driver.py:
(DriverOutput):
(Driver._check_for_driver_timeout):
(Driver._check_for_driver_crash_or_unresponsiveness):
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer._read):
* Scripts/webkitpy/port/win.py:
(WinPort.write_registry_value):
* Scripts/webkitpy/pytest.ini:
* Scripts/webkitpy/style/checker.py:
(CheckerDispatcher._should_skip_file_path):
* Scripts/webkitpy/style/checkers/changelog.py:
(ChangeLogChecker.check_entry):
* Scripts/webkitpy/style/checkers/cmake.py:
(CMakeChecker._process_line):
(CMakeChecker._check_no_space_cmds):
(CMakeChecker._check_one_space_cmds):
(CMakeChecker._check_non_lowercase_cmd):
(CMakeChecker._check_list_order):
* Scripts/webkitpy/style/checkers/cpp.py:
(FileInfo.repository_name):
(check_for_non_standard_constructs):
(check_spacing):
(check_language):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
* Scripts/webkitpy/style/checkers/jstest.py:
(map_functions_to_dict):
(strip_trailing_blank_lines_and_comments):
* Scripts/webkitpy/style/checkers/messagesin.py:
(MessagesInChecker.check_WTF_prefix):
* Scripts/webkitpy/style/patchreader.py:
(PatchReader.check):
* Scripts/webkitpy/test/runner.py:
* Scripts/webkitpy/test/runner_unittest.py:
(FakeLoader.__init__):
* Scripts/webkitpy/tool/commands/analyzechangelog.py:
(AnalyzeChangeLog._enumerate_changelogs):
* Scripts/webkitpy/tool/commands/queries.py:
(PrintBaselines.__init__):
(FindResolvedBugs.execute):
* Scripts/webkitpy/tool/commands/upload.py:
(MarkBugFixed._determine_bug_id_and_svn_revision):
* Scripts/webkitpy/tool/steps/promptforbugortitle.py:
(PromptForBugOrTitle.run):
* Scripts/webkitpy/w3c/test_converter.py:
(_W3CTestConverter.__init__):
(_W3CTestConverter.read_webkit_prefixed_css_property_list):
(_W3CTestConverter.legacy_read_webkit_prefixed_css_property_list):
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.support_files):
* lldb/lldb_dump_class_layout.py:
(LLDBDebuggerInstance._get_first_file_architecture):

Websites/browserbench.org:

* JetStream2.0/RexBench/FlightPlanner/convert-nfdc.py:

Modified Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (277852 => 277853)


--- trunk/PerformanceTests/ChangeLog	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/PerformanceTests/ChangeLog	2021-05-21 10:16:11 UTC (rev 277853)
@@ -1,3 +1,16 @@
+2021-05-21  Sam Sneddon  <gsnedd...@apple.com>
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+        https://bugs.webkit.org/show_bug.cgi?id=226018
+
+        Reviewed by Jonathan Bedard.
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+
+        * JetStream2/RAMification.py:
+        * JetStream2/RexBench/FlightPlanner/convert-nfdc.py:
+        * RexBench/FlightPlanner/convert-nfdc.py:
+
 2021-05-12  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [MotionMark] Temporarily remove the focus test

Modified: trunk/PerformanceTests/JetStream2/RAMification.py (277852 => 277853)


--- trunk/PerformanceTests/JetStream2/RAMification.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/PerformanceTests/JetStream2/RAMification.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -40,8 +40,8 @@
 luaTests = [("hello_world-LJF", "LuaJSFight/hello_world.js", 5), ("list_search-LJF", "LuaJSFight/list_search.js", 5), ("lists-LJF", "LuaJSFight/lists.js", 5), ("string_lists-LJF", "LuaJSFight/string_lists.js", 5), ("richards", "LuaJSFight/richards.js", 5)]
 
 _oneMB_ = float(1024 * 1024)
-footprintRE = re.compile("Current Footprint: (\d+(?:.\d+)?)")
-peakFootprintRE = re.compile("Peak Footprint: (\d+(?:.\d+)?)")
+footprintRE = re.compile(r"Current Footprint: (\d+(?:.\d+)?)")
+peakFootprintRE = re.compile(r"Peak Footprint: (\d+(?:.\d+)?)")
 
 TestResult = collections.namedtuple("TestResult", ["name", "returnCode", "footprint", "peakFootprint", "vmmapOutput"])
 

Modified: trunk/PerformanceTests/JetStream2/RexBench/FlightPlanner/convert-nfdc.py (277852 => 277853)


--- trunk/PerformanceTests/JetStream2/RexBench/FlightPlanner/convert-nfdc.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/PerformanceTests/JetStream2/RexBench/FlightPlanner/convert-nfdc.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -36,7 +36,7 @@
 
 import re
 
-latLongRE = re.compile('\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([NS])\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([EW])')
+latLongRE = re.compile(r'\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([NS])\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([EW])')
 statesAbbreviationsToExclude = ['AK', 'HI']
 navaidsToInclude = ['VOR', 'NDB']
 airwayFixTypes = frozenset(['CN', 'NDB/DME', 'NDB', 'MIL-REP-PT', 'REP-PT', 'RNAV', 'VOR', 'VOR/DME', 'VORTAC'])

Modified: trunk/PerformanceTests/RexBench/FlightPlanner/convert-nfdc.py (277852 => 277853)


--- trunk/PerformanceTests/RexBench/FlightPlanner/convert-nfdc.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/PerformanceTests/RexBench/FlightPlanner/convert-nfdc.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -36,7 +36,7 @@
 
 import re
 
-latLongRE = re.compile('\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([NS])\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([EW])')
+latLongRE = re.compile(r'\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([NS])\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([EW])')
 statesAbbreviationsToExclude = ['AK', 'HI']
 navaidsToInclude = ['VOR', 'NDB']
 airwayFixTypes = frozenset(['CN', 'NDB/DME', 'NDB', 'MIL-REP-PT', 'REP-PT', 'RNAV', 'VOR', 'VOR/DME', 'VORTAC'])

Modified: trunk/Source/_javascript_Core/ChangeLog (277852 => 277853)


--- trunk/Source/_javascript_Core/ChangeLog	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-05-21 10:16:11 UTC (rev 277853)
@@ -1,3 +1,14 @@
+2021-05-21  Sam Sneddon  <gsnedd...@apple.com>
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+        https://bugs.webkit.org/show_bug.cgi?id=226018
+
+        Reviewed by Jonathan Bedard.
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+
+        * wasm/generateWasmB3IRGeneratorInlinesHeader.py:
+
 2021-05-20  Saam Barati  <sbar...@apple.com>
 
         [ Catalina Release JSC] A large number of JSC test appear to be flaky failing

Modified: trunk/Source/_javascript_Core/wasm/generateWasmB3IRGeneratorInlinesHeader.py (277852 => 277853)


--- trunk/Source/_javascript_Core/wasm/generateWasmB3IRGeneratorInlinesHeader.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Source/_javascript_Core/wasm/generateWasmB3IRGeneratorInlinesHeader.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -40,12 +40,12 @@
 wasmB3IRGeneratorHFile = open(args[2], "w")
 
 opcodeRegex = re.compile('([a-zA-Z0-9]+)')
-argumentRegex = re.compile('(\@[0-9]+)')
+argumentRegex = re.compile(r'(\@[0-9]+)')
 decimalRegex = re.compile('([-]?[0-9]+)')
-whitespaceRegex = re.compile('\s+')
+whitespaceRegex = re.compile(r'\s+')
 commaRegex = re.compile('(,)')
-oparenRegex = re.compile('(\()')
-cparenRegex = re.compile('(\))')
+oparenRegex = re.compile(r'(\()')
+cparenRegex = re.compile(r'(\))')
 
 
 class Source:

Modified: trunk/Source/WebCore/ChangeLog (277852 => 277853)


--- trunk/Source/WebCore/ChangeLog	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Source/WebCore/ChangeLog	2021-05-21 10:16:11 UTC (rev 277853)
@@ -1,3 +1,16 @@
+2021-05-21  Sam Sneddon  <gsnedd...@apple.com>
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+        https://bugs.webkit.org/show_bug.cgi?id=226018
+
+        Reviewed by Jonathan Bedard.
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+
+        No new tests.
+
+        * Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py:
+
 2021-05-21  Youenn Fablet  <you...@apple.com>
 
         Implement a remote Internal Unit in GPUProcess for audio MediaStreamTrack rendering

Modified: trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py (277852 => 277853)


--- trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLBuildStandardLibraryFunctionMap.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -26,7 +26,7 @@
 import sys
 import re
 
-regularExpression = re.compile("/\* Functions named (.*) \*/")
+regularExpression = re.compile(r"/\* Functions named (.*) \*/")
 
 infile = open(sys.argv[1], "r")
 contents = infile.read()

Modified: trunk/Tools/CISupport/build-webkit-org/loadConfig.py (277852 => 277853)


--- trunk/Tools/CISupport/build-webkit-org/loadConfig.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/build-webkit-org/loadConfig.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -244,5 +244,5 @@
 
 
 def getTagsForBuilder(builder):
-    keywords = re.split('[, \-_:()]+', str(builder['name']))
+    keywords = re.split(r'[, \-_:()]+', str(builder['name']))
     return getValidTags(keywords)

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (277852 => 277853)


--- trunk/Tools/CISupport/build-webkit-org/steps.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -888,22 +888,22 @@
         messages = []
         self.statusLine = []
 
-        foundItems = re.findall("Unexpected failures \((\d+)\)", logText)
+        foundItems = re.findall(r"Unexpected failures \((\d+)\)", logText)
         if foundItems:
             failedTests = int(foundItems[0])
             messages.append("%d failures" % failedTests)
 
-        foundItems = re.findall("Unexpected crashes \((\d+)\)", logText)
+        foundItems = re.findall(r"Unexpected crashes \((\d+)\)", logText)
         if foundItems:
             crashedTests = int(foundItems[0])
             messages.append("%d crashes" % crashedTests)
 
-        foundItems = re.findall("Unexpected timeouts \((\d+)\)", logText)
+        foundItems = re.findall(r"Unexpected timeouts \((\d+)\)", logText)
         if foundItems:
             timedOutTests = int(foundItems[0])
             messages.append("%d timeouts" % timedOutTests)
 
-        foundItems = re.findall("Unexpected passes \((\d+)\)", logText)
+        foundItems = re.findall(r"Unexpected passes \((\d+)\)", logText)
         if foundItems:
             newPassTests = int(foundItems[0])
             messages.append("%d new passes" % newPassTests)
@@ -961,10 +961,10 @@
 
         self.failuresCount = 0
         self.newPassesCount = 0
-        foundItems = re.findall("^Unexpected .+ \((\d+)\)", logText, re.MULTILINE)
+        foundItems = re.findall(r"^Unexpected .+ \((\d+)\)", logText, re.MULTILINE)
         if foundItems:
             self.failuresCount = int(foundItems[0])
-        foundItems = re.findall("^Expected to .+, but passed \((\d+)\)", logText, re.MULTILINE)
+        foundItems = re.findall(r"^Expected to .+, but passed \((\d+)\)", logText, re.MULTILINE)
         if foundItems:
             self.newPassesCount = int(foundItems[0])
 

Modified: trunk/Tools/CISupport/ews-app/ews/common/bugzilla.py (277852 => 277853)


--- trunk/Tools/CISupport/ews-app/ews/common/bugzilla.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/ews-app/ews/common/bugzilla.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -270,8 +270,8 @@
 
     def _parse_attachment_ids_request_query(self, page, since=None):
         # Formats
-        digits = re.compile("\d+")
-        attachment_href = re.compile("attachment.cgi\?id=\d+&action=""
+        digits = re.compile(r"\d+")
+        attachment_href = re.compile(r"attachment.cgi\?id=\d+&action=""
         # if no date is given, return all ids
         if not since:
             attachment_links = SoupStrainer("a", href=""
@@ -279,7 +279,7 @@
                 for tag in BeautifulSoup(page, parseOnlyThese=attachment_links)]
 
         # Parse the main table only
-        date_format = re.compile("\d{4}-\d{2}-\d{2} \d{2}:\d{2}")
+        date_format = re.compile(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}")
         mtab = SoupStrainer("table", {"class": "requests"})
         soup = BeautifulSoup(page, parseOnlyThese=mtab)
         patch_ids = []

Modified: trunk/Tools/CISupport/ews-app/ews/common/buildbot.py (277852 => 277853)


--- trunk/Tools/CISupport/ews-app/ews/common/buildbot.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/ews-app/ews/common/buildbot.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -81,7 +81,7 @@
 
     @classmethod
     def _get_display_name_from_builder_name(cls, builder_name):
-        words = re.split('[, \-_:()]+', builder_name)
+        words = re.split(r'[, \-_:()]+', builder_name)
         if not words:
             return builder_name
         return words[0].lower()

Modified: trunk/Tools/CISupport/ews-build/loadConfig.py (277852 => 277853)


--- trunk/Tools/CISupport/ews-build/loadConfig.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/ews-build/loadConfig.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -213,5 +213,5 @@
 
 
 def getTagsForBuilder(builder):
-    keywords = re.split('[, \-_:()]+', str(builder['name']))
+    keywords = re.split(r'[, \-_:()]+', str(builder['name']))
     return getValidTags(keywords)

Modified: trunk/Tools/CISupport/ews-build/steps.py (277852 => 277853)


--- trunk/Tools/CISupport/ews-build/steps.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -140,7 +140,7 @@
     def start(self):
         platform = self.getProperty('platform', '*')
         if platform == 'wincairo':
-            self.command = ['del', '.git\index.lock']
+            self.command = ['del', r'.git\index.lock']
         return shell.ShellCommand.start(self)
 
     def evaluateCommand(self, cmd):
@@ -479,7 +479,7 @@
 
 class FindModifiedLayoutTests(AnalyzePatch):
     name = 'find-modified-layout-tests'
-    RE_LAYOUT_TEST = b'^(\+\+\+).*(LayoutTests.*\.html)'
+    RE_LAYOUT_TEST = br'^(\+\+\+).*(LayoutTests.*\.html)'
     DIRECTORIES_TO_IGNORE = ['reference', 'reftest', 'resources', 'support', 'script-tests', 'tools']
     SUFFIXES_TO_IGNORE = ['-expected', '-expected-mismatch', '-ref', '-notref']
 
@@ -1492,7 +1492,7 @@
         self.searchString = searchString
         self.includeRelatedLines = includeRelatedLines
         self.error_context_buffer = []
-        self.whitespace_re = re.compile('^[\s]*$')
+        self.whitespace_re = re.compile(r'^[\s]*$')
         super(BuildLogLineObserver, self).__init__()
 
     def outLineReceived(self, line):
@@ -3301,7 +3301,7 @@
     name = 'push-commit-to-webkit-repo'
     descriptionDone = ['Pushed commit to WebKit repository']
     command = ['git', 'svn', 'dcommit', '--rmdir']
-    commit_success_regexp = '^Committed r(?P<svn_revision>\d+)$'
+    commit_success_regexp = r'^Committed r(?P<svn_revision>\d+)$'
     haltOnFailure = False
     MAX_RETRY = 2
 

Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (277852 => 277853)


--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -951,7 +951,7 @@
             ExpectShell(workdir='wkdir',
                         timeout=120,
                         logEnviron=False,
-                        command=['del', '.git\index.lock'],
+                        command=['del', r'.git\index.lock'],
                         )
             + 0,
         )
@@ -3338,7 +3338,7 @@
     TestWTF.WTF_Expected.Unexpected
         **FAIL** WTF_Expected.Unexpected
 
-        Tools\TestWebKitAPI\Tests\WTF\Expected.cpp:96
+        Tools\\TestWebKitAPI\\Tests\\WTF\\Expected.cpp:96
         Value of: s1
           Actual: oops
         Expected: s0

Modified: trunk/Tools/ChangeLog (277852 => 277853)


--- trunk/Tools/ChangeLog	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/ChangeLog	2021-05-21 10:16:11 UTC (rev 277853)
@@ -1,3 +1,142 @@
+2021-05-21  Sam Sneddon  <gsnedd...@apple.com>
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+        https://bugs.webkit.org/show_bug.cgi?id=226018
+
+        Reviewed by Jonathan Bedard.
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+
+        * CISupport/build-webkit-org/loadConfig.py:
+        (getTagsForBuilder):
+        * CISupport/build-webkit-org/steps.py:
+        (RunGLibAPITests.commandComplete):
+        (RunWebDriverTests.commandComplete):
+        * CISupport/ews-app/ews/common/bugzilla.py:
+        (BugzillaBeautifulSoup._parse_attachment_ids_request_query):
+        * CISupport/ews-app/ews/common/buildbot.py:
+        (Buildbot._get_display_name_from_builder_name):
+        * CISupport/ews-build/loadConfig.py:
+        (getTagsForBuilder):
+        * CISupport/ews-build/steps.py:
+        (CleanUpGitIndexLock.start):
+        (FindModifiedLayoutTests):
+        (BuildLogLineObserver.__init__):
+        (PushCommitToWebKitRepo):
+        * CISupport/ews-build/steps_unittest.py:
+        * Scripts/ic-stats.py:
+        * Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
+        (Svn):
+        * Scripts/webkitpy/common/checkout/changelog.py:
+        (parse_bug_id_from_changelog):
+        (ChangeLogEntry):
+        (update_with_unreviewed_message):
+        (set_reviewer):
+        * Scripts/webkitpy/common/checkout/diff_parser.py:
+        (git_diff_to_svn_diff):
+        * Scripts/webkitpy/common/checkout/diff_test_data.py:
+        * Scripts/webkitpy/common/checkout/scm/commitmessage.py:
+        (_first_non_empty_line_after_index):
+        (CommitMessage.description):
+        * Scripts/webkitpy/common/checkout/scm/git.py:
+        (Git.commit_success_regexp):
+        (Git.timestamp_of_revision):
+        (Git.git_commit_from_svn_revision):
+        * Scripts/webkitpy/common/checkout/scm/scm.py:
+        (SCM.strip_r_from_svn_revision):
+        * Scripts/webkitpy/common/checkout/scm/svn.py:
+        (SVN.commit_success_regexp):
+        (SVN.revisions_changing_file):
+        * Scripts/webkitpy/common/checksvnconfigfile.py:
+        (check):
+        * Scripts/webkitpy/common/config/contributionareas.py:
+        (ContributionAreas._split_camelcase):
+        * Scripts/webkitpy/common/config/urls.py:
+        * Scripts/webkitpy/common/find_files_unittest.py:
+        (TestWinNormalize.assert_filesystem_normalizes):
+        * Scripts/webkitpy/common/net/bugzilla/bug.py:
+        (Bug.commit_revision):
+        * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+        (BugzillaQueries._parse_attachment_ids_request_query):
+        (Bugzilla._parse_bug_id_from_attachment_page):
+        (Bugzilla._parse_attachment_id_from_add_patch_to_bug_response):
+        (Bugzilla._check_create_bug_response):
+        * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+        (BuildBot._parse_current_build_cell):
+        * Scripts/webkitpy/common/net/credentials.py:
+        (Credentials._parse_security_tool_output):
+        * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
+        (ParsedJSONResultsTest):
+        * Scripts/webkitpy/common/system/crashlogs.py:
+        (CrashLogs.get_timestamp_from_log):
+        * Scripts/webkitpy/common/system/crashlogs_unittest.py:
+        * Scripts/webkitpy/common/system/platforminfo.py:
+        (PlatformInfo.available_sdks):
+        * Scripts/webkitpy/common/system/user.py:
+        (User._wait_on_list_response):
+        * Scripts/webkitpy/common/watchlist/watchlistparser.py:
+        (WatchListParser._rule_definitions_as_set):
+        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+        (TestExpectationParser):
+        (TestExpectationParser._parse_modifiers):
+        (TestExpectationParser._tokenize_line):
+        * Scripts/webkitpy/performance_tests/perftest.py:
+        (PerfTest):
+        * Scripts/webkitpy/port/base.py:
+        (Port._natural_sort_key):
+        * Scripts/webkitpy/port/driver.py:
+        (DriverOutput):
+        (Driver._check_for_driver_timeout):
+        (Driver._check_for_driver_crash_or_unresponsiveness):
+        * Scripts/webkitpy/port/image_diff.py:
+        (ImageDiffer._read):
+        * Scripts/webkitpy/port/win.py:
+        (WinPort.write_registry_value):
+        * Scripts/webkitpy/pytest.ini:
+        * Scripts/webkitpy/style/checker.py:
+        (CheckerDispatcher._should_skip_file_path):
+        * Scripts/webkitpy/style/checkers/changelog.py:
+        (ChangeLogChecker.check_entry):
+        * Scripts/webkitpy/style/checkers/cmake.py:
+        (CMakeChecker._process_line):
+        (CMakeChecker._check_no_space_cmds):
+        (CMakeChecker._check_one_space_cmds):
+        (CMakeChecker._check_non_lowercase_cmd):
+        (CMakeChecker._check_list_order):
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (FileInfo.repository_name):
+        (check_for_non_standard_constructs):
+        (check_spacing):
+        (check_language):
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        * Scripts/webkitpy/style/checkers/jstest.py:
+        (map_functions_to_dict):
+        (strip_trailing_blank_lines_and_comments):
+        * Scripts/webkitpy/style/checkers/messagesin.py:
+        (MessagesInChecker.check_WTF_prefix):
+        * Scripts/webkitpy/style/patchreader.py:
+        (PatchReader.check):
+        * Scripts/webkitpy/test/runner.py:
+        * Scripts/webkitpy/test/runner_unittest.py:
+        (FakeLoader.__init__):
+        * Scripts/webkitpy/tool/commands/analyzechangelog.py:
+        (AnalyzeChangeLog._enumerate_changelogs):
+        * Scripts/webkitpy/tool/commands/queries.py:
+        (PrintBaselines.__init__):
+        (FindResolvedBugs.execute):
+        * Scripts/webkitpy/tool/commands/upload.py:
+        (MarkBugFixed._determine_bug_id_and_svn_revision):
+        * Scripts/webkitpy/tool/steps/promptforbugortitle.py:
+        (PromptForBugOrTitle.run):
+        * Scripts/webkitpy/w3c/test_converter.py:
+        (_W3CTestConverter.__init__):
+        (_W3CTestConverter.read_webkit_prefixed_css_property_list):
+        (_W3CTestConverter.legacy_read_webkit_prefixed_css_property_list):
+        * Scripts/webkitpy/w3c/test_parser.py:
+        (TestParser.support_files):
+        * lldb/lldb_dump_class_layout.py:
+        (LLDBDebuggerInstance._get_first_file_architecture):
+
 2021-05-20  Julian Gonzalez  <julian_a_gonza...@apple.com>
 
         WKRemoteObjectRegistry  _invokeMethod needs to check for nil completionHandlers

Modified: trunk/Tools/Scripts/ic-stats.py (277852 => 277853)


--- trunk/Tools/Scripts/ic-stats.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/ic-stats.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -26,7 +26,7 @@
 import re
 import sys
 
-icStatRecord = re.compile(" +(\w+)\(([^,]+), ([^)]+)\)([^:]*): (\d+)")
+icStatRecord = re.compile(r" +(\w+)\(([^,]+), ([^)]+)\)([^:]*): (\d+)")
 getByIdPrefix = "OperationGetById"
 putByIdPrefix = "OperationPutById"
 

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py (277852 => 277853)


--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -39,7 +39,7 @@
 
 class Svn(Scm):
     URL_RE = re.compile(r'\Ahttps?://svn.(?P<host>\S+)/repository/\S+\Z')
-    DATA_RE = re.compile(b'<[SD]:(?P<tag>\S+)>(?P<content>.*)</[SD]:.+>')
+    DATA_RE = re.compile(br'<[SD]:(?P<tag>\S+)>(?P<content>.*)</[SD]:.+>')
     CACHE_VERSION = Version(1)
 
     @classmethod

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/changelog.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -47,10 +47,10 @@
 def parse_bug_id_from_changelog(message):
     if not message:
         return None
-    match = re.search("^\s*" + config_urls.bug_url_short + "$", message, re.MULTILINE)
+    match = re.search(r"^\s*" + config_urls.bug_url_short + "$", message, re.MULTILINE)
     if match:
         return int(match.group('bug_id'))
-    match = re.search("^\s*" + config_urls.bug_url_long + "$", message, re.MULTILINE)
+    match = re.search(r"^\s*" + config_urls.bug_url_long + "$", message, re.MULTILINE)
     if match:
         return int(match.group('bug_id'))
     # We weren't able to find a bug URL in the format used by prepare-ChangeLog. Fall back to the
@@ -149,7 +149,7 @@
 
         # Get rid of "reviewers" like "even though this is just a..." in "Reviewed by Sam Weinig, even though this is just a..."
         # and "who wrote the original code" in "Noam Rosenthal, who wrote the original code"
-        reviewer_list = [reviewer for reviewer in reviewer_list if not re.match('^who\s|^([a-z]+(\s+|\.|$)){6,}$', reviewer)]
+        reviewer_list = [reviewer for reviewer in reviewer_list if not re.match(r'^who\s|^([a-z]+(\s+|\.|$)){6,}$', reviewer)]
 
         return reviewer_text, reviewer_list
 
@@ -398,7 +398,7 @@
 
     def update_with_unreviewed_message(self, message):
         first_boilerplate_line_regexp = re.compile(
-                "%sNeed a short description \(OOPS!\)\." % self._changelog_indent)
+                r"%sNeed a short description \(OOPS!\)\." % self._changelog_indent)
         removing_boilerplate = False
         result = StringIO()
         with self._filesystem.open_text_file_for_reading(self.path) as file:
@@ -420,7 +420,7 @@
         latest_entry = self.latest_entry()
         latest_entry_contents = latest_entry.contents()
         reviewer_text = latest_entry.reviewer()
-        found_nobody = re.search("NOBODY\s*\(OOPS!\)", latest_entry_contents, re.MULTILINE)
+        found_nobody = re.search(r"NOBODY\s*\(OOPS!\)", latest_entry_contents, re.MULTILINE)
         found_reviewer_or_unreviewed = latest_entry.has_valid_reviewer()
         if not found_nobody and not found_reviewer_or_unreviewed and not reviewer_text:
             bug_url_number_of_items = len(re.findall(config_urls.bug_url_long, latest_entry_contents, re.MULTILINE))

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/diff_parser.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -56,11 +56,11 @@
     """
     # FIXME: This list should be a class member on DiffParser.
     # These regexp patterns should be compiled once instead of every time.
-    conversion_patterns = (("^diff --git \w/(.+) \w/(?P<FilePath>.+)", lambda matched: "Index: " + matched.group('FilePath') + "\n"),
+    conversion_patterns = ((r"^diff --git \w/(.+) \w/(?P<FilePath>.+)", lambda matched: "Index: " + matched.group('FilePath') + "\n"),
                            ("^new file.*", lambda matched: "\n"),
-                           ("^index (([0-9a-f]{7}\.\.[0-9a-f]{7})|([0-9a-f]{40}\.\.[0-9a-f]{40})) [0-9]{6}", lambda matched: "===================================================================\n"),
-                           ("^--- \w/(?P<FilePath>.+)", lambda matched: "--- " + matched.group('FilePath') + "\n"),
-                           ("^\+\+\+ \w/(?P<FilePath>.+)", lambda matched: "+++ " + matched.group('FilePath') + "\n"))
+                           (r"^index (([0-9a-f]{7}\.\.[0-9a-f]{7})|([0-9a-f]{40}\.\.[0-9a-f]{40})) [0-9]{6}", lambda matched: "===================================================================\n"),
+                           (r"^--- \w/(?P<FilePath>.+)", lambda matched: "--- " + matched.group('FilePath') + "\n"),
+                           (r"^\+\+\+ \w/(?P<FilePath>.+)", lambda matched: "+++ " + matched.group('FilePath') + "\n"))
 
     for pattern, conversion in conversion_patterns:
         matched = match(pattern, line)

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/diff_test_data.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/diff_test_data.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/diff_test_data.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -27,7 +27,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #  FIXME: Store this as a .patch file in some new fixtures directory or similar.
-DIFF_TEST_DATA = '''diff --git a/WebCore/rendering/style/StyleFlexibleBoxData.h b/WebCore/rendering/style/StyleFlexibleBoxData.h
+DIFF_TEST_DATA = r'''diff --git a/WebCore/rendering/style/StyleFlexibleBoxData.h b/WebCore/rendering/style/StyleFlexibleBoxData.h
 index f5d5e74..3b6aa92 100644
 --- a/WebCore/rendering/style/StyleFlexibleBoxData.h
 +++ b/WebCore/rendering/style/StyleFlexibleBoxData.h

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/commitmessage.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/commitmessage.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/commitmessage.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -33,7 +33,7 @@
 def _first_non_empty_line_after_index(lines, index=0):
     first_non_empty_line = index
     for line in lines[index:]:
-        if re.match("^\s*$", line):
+        if re.match(r"^\s*$", line):
             first_non_empty_line += 1
         else:
             break
@@ -55,7 +55,7 @@
         if lstrip:
             line = line.lstrip()
         if strip_url:
-            line = re.sub("^(\s*)<.+> ", "\1", line)
+            line = re.sub(r"^(\s*)<.+> ", "\1", line)
         return line
 
     def message(self):

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -149,7 +149,7 @@
 
     @staticmethod
     def commit_success_regexp():
-        return "^Committed r(?P<svn_revision>\d+)$"
+        return r"^Committed r(?P<svn_revision>\d+)$"
 
     def discard_local_commits(self):
         self._run_git(['reset', '--hard', self.remote_branch_ref()])
@@ -325,7 +325,7 @@
 
     def timestamp_of_revision(self, path, revision):
         git_log = self._most_recent_log_matching('git-svn-id:.*@%s' % revision, path)
-        match = re.search("^Date:\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-])(\d{2})(\d{2})$", git_log, re.MULTILINE)
+        match = re.search(r"^Date:\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-])(\d{2})(\d{2})$", git_log, re.MULTILINE)
         if not match:
             return ""
 
@@ -391,7 +391,7 @@
 
     @memoized
     def git_commit_from_svn_revision(self, svn_revision):
-        git_log = self._run_git(['log', '--no-abbrev-commit', '-1', '--grep=^\s*git-svn-id:.*@%s ' % svn_revision])
+        git_log = self._run_git(['log', '--no-abbrev-commit', '-1', r'--grep=^\s*git-svn-id:.*@%s ' % svn_revision])
         git_commit = re.search("^commit (?P<commit>[a-f0-9]{40})", git_log)
         if not git_commit:
             # FIXME: Alternatively we could offer to update the checkout? Or return None?

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -97,7 +97,7 @@
         return filenames
 
     def strip_r_from_svn_revision(self, svn_revision):
-        match = re.match("^r(?P<svn_revision>\d+)", unicode(svn_revision))
+        match = re.match(r"^r(?P<svn_revision>\d+)", unicode(svn_revision))
         if (match):
             return match.group('svn_revision')
         return svn_revision

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -144,7 +144,7 @@
 
     @staticmethod
     def commit_success_regexp():
-        return "^Committed revision (?P<svn_revision>\d+)\.$"
+        return r"^Committed revision (?P<svn_revision>\d+)\.$"
 
     def _run_svn(self, args, **kwargs):
         return self.run([self.executable_name] + args, **kwargs)
@@ -258,7 +258,7 @@
         except ScriptError:
             return []
         for line in log_output.splitlines():
-            match = re.search('^r(?P<revision>\d+) ', line)
+            match = re.search(r'^r(?P<revision>\d+) ', line)
             if not match:
                 continue
             revisions.append(int(match.group('revision')))

Modified: trunk/Tools/Scripts/webkitpy/common/checksvnconfigfile.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/checksvnconfigfile.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/checksvnconfigfile.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -43,8 +43,8 @@
     except IOError:
         return (True, True, True)
 
-    errorcode_autoprop = not re.search("^\s*enable-auto-props\s*=\s*yes", config_file, re.MULTILINE)
-    errorcode_png = not re.search("^\s*\*\.png\s*=\s*svn:mime-type=image/png", config_file, re.MULTILINE)
+    errorcode_autoprop = not re.search(r"^\s*enable-auto-props\s*=\s*yes", config_file, re.MULTILINE)
+    errorcode_png = not re.search(r"^\s*\*\.png\s*=\s*svn:mime-type=image/png", config_file, re.MULTILINE)
 
     return (False, errorcode_autoprop, errorcode_png)
 

Modified: trunk/Tools/Scripts/webkitpy/common/config/contributionareas.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/config/contributionareas.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributionareas.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -189,7 +189,7 @@
     def _split_camelcase(self, name, transform=lambda x: x):
         result = []
         while name and len(name):
-            m = re.match('^([A-Z][a-z0-9]+)|([A-Z0-9]+(?=([A-Z][a-z0-9]|\.|$)))', name)
+            m = re.match(r'^([A-Z][a-z0-9]+)|([A-Z0-9]+(?=([A-Z][a-z0-9]|\.|$)))', name)
             if m:
                 result.append(transform(m.group(0)))
                 name = name[m.end():]

Modified: trunk/Tools/Scripts/webkitpy/common/config/urls.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/config/urls.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/config/urls.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -46,7 +46,7 @@
 
 bug_server_domain = "webkit.org"
 bug_server_host = "bugs." + bug_server_domain
-_bug_server_regex = "https?://%s/" % re.sub('\.', '\\.', bug_server_host)
+_bug_server_regex = "https?://%s/" % re.sub(r'\.', '\\.', bug_server_host)
 bug_server_url = "https://%s/" % bug_server_host
 bug_url_long = _bug_server_regex + r"show_bug\.cgi\?id=(?P<bug_id>\d+)(&ctype=xml|&excludefield=attachmentdata)*"
 bug_url_short = r"https?\://%s/b/(?P<bug_id>\d+)" % bug_server_domain

Modified: trunk/Tools/Scripts/webkitpy/common/find_files_unittest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/find_files_unittest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/find_files_unittest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -46,7 +46,7 @@
     def assert_filesystem_normalizes(self, filesystem):
         self.assertEqual(find_files._normalize(filesystem, "c:\\foo",
             ['fast/html', 'fast/canvas/*', 'compositing/foo.html']),
-            ['c:\\foo\\fast\html', 'c:\\foo\\fast\canvas\*', 'c:\\foo\compositing\\foo.html'])
+            ['c:\\foo\\fast\\html', 'c:\\foo\\fast\\canvas\\*', 'c:\\foo\\compositing\\foo.html'])
 
     def test_mocked_win(self):
         # This tests test_files.normalize, using portable behavior emulating

Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -126,7 +126,7 @@
 
     def commit_revision(self):
         # Sort the comments in reverse order as we want the latest committed revision.
-        r = re.compile("Committed r(?P<svn_revision>\d+)")
+        r = re.compile(r"Committed r(?P<svn_revision>\d+)")
         for comment in sorted(self.comments(), key=lambda comment: comment['text'], reverse=True):
             rev = r.search(comment['text'])
             if rev:

Modified: trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -188,8 +188,8 @@
 
     def _parse_attachment_ids_request_query(self, page, since=None):
         # Formats
-        digits = re.compile("\d+")
-        attachment_href = re.compile("attachment.cgi\?id=\d+&action=""
+        digits = re.compile(r"\d+")
+        attachment_href = re.compile(r"attachment.cgi\?id=\d+&action=""
         # if no date is given, return all ids
         if not since:
             attachment_links = SoupStrainer("a", href=""
@@ -197,7 +197,7 @@
                 for tag in BeautifulSoup(page, parseOnlyThese=attachment_links)]
 
         # Parse the main table only
-        date_format = re.compile("\d{4}-\d{2}-\d{2} \d{2}:\d{2}")
+        date_format = re.compile(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}")
         mtab = SoupStrainer("table", {"class": "requests"})
         soup = BeautifulSoup(page, parseOnlyThese=mtab)
         patch_ids = []
@@ -505,7 +505,7 @@
         if not title:
             _log.warning("This attachment does not exist (or you don't have permissions to view it).")
             return None
-        match = re.search("show_bug.cgi\?id=(?P<bug_id>\d+)", str(title))
+        match = re.search(r"show_bug.cgi\?id=(?P<bug_id>\d+)", str(title))
         if not match:
             _log.warning("Unable to parse bug id from attachment")
             return None
@@ -640,7 +640,7 @@
     @staticmethod
     def _parse_attachment_id_from_add_patch_to_bug_response(response_html):
         response_html = string_utils.decode(response_html, target_type=str)
-        match = re.search('<title>Attachment (?P<attachment_id>\d+) added to Bug \d+</title>', response_html)
+        match = re.search(r'<title>Attachment (?P<attachment_id>\d+) added to Bug \d+</title>', response_html)
         if match:
             return match.group('attachment_id')
         _log.warning('Unable to parse attachment id')
@@ -684,7 +684,7 @@
     # FIXME: There has to be a more concise way to write this method.
     def _check_create_bug_response(self, response_html):
         response_html = string_utils.decode(response_html, target_type=str)
-        match = re.search('<title>Bug (?P<bug_id>\d+) Submitted[^<]*</title>', response_html)
+        match = re.search(r'<title>Bug (?P<bug_id>\d+) Submitted[^<]*</title>', response_html)
         if match:
             return match.group('bug_id')
 

Modified: trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -345,7 +345,7 @@
 
         builder["activity"] = activity_lines[0]  # normally "building" or "idle"
         # The middle lines document how long left for any current builds.
-        match = re.match("(?P<pending_builds>\d) pending", activity_lines[-1])
+        match = re.match(r"(?P<pending_builds>\d) pending", activity_lines[-1])
         builder["pending_builds"] = int(match.group("pending_builds")) if match else 0
 
     def _parse_builder_status_from_row(self, status_row):

Modified: trunk/Tools/Scripts/webkitpy/common/net/credentials.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/net/credentials.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/net/credentials.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -84,7 +84,7 @@
         return platform.mac_ver()[0]
 
     def _parse_security_tool_output(self, security_output):
-        username = self._keychain_value_with_label("^\s*\"acct\"<blob>=",
+        username = self._keychain_value_with_label("^\\s*\"acct\"<blob>=",
                                                    security_output)
         password = self._keychain_value_with_label("^password: ",
                                                    security_output)

Modified: trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -37,7 +37,7 @@
 class ParsedJSONResultsTest(unittest.TestCase):
     # The real files have no whitespace, but newlines make this much more readable.
 
-    _example_full_results_json = """ADD_RESULTS({
+    _example_full_results_json = r"""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {
@@ -90,7 +90,7 @@
     "uses_expectations_file": true
 });"""
 
-    _not_interrupted_example_full_results_json = """ADD_RESULTS({
+    _not_interrupted_example_full_results_json = r"""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {

Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -186,7 +186,7 @@
         return crash_logs
 
     def get_timestamp_from_log(self, log_contents):
-        date_match = re.search('Date/Time:\s+(.+?)\n', log_contents)
+        date_match = re.search('Date/Time:\\s+(.+?)\n', log_contents)
         if not date_match:
             return None
         try:

Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -115,9 +115,9 @@
 
 
 def make_mock_crash_report_win(process_name, pid):
-    return """Opened log file 'C:\Projects\WebKit\OpenSource\WebKitBuild\Release\bin32\layout-test-results\CrashLog_1d58_2013-06-03_12-21-20-110.txt'
-0:000> .srcpath "C:\Projects\WebKit\OpenSource"
-Source search path is: C:\Projects\WebKit\OpenSource
+    return """Opened log file 'C:\\Projects\\WebKit\\OpenSource\\WebKitBuild\\Release\bin32\\layout-test-results\\CrashLog_1d58_2013-06-03_12-21-20-110.txt'
+0:000> .srcpath "C:\\Projects\\WebKit\\OpenSource"
+Source search path is: C:\\Projects\\WebKit\\OpenSource
 0:000> !analyze -vv
 *******************************************************************************
 *                                                                             *
@@ -125,11 +125,11 @@
 *                                                                             *
 *******************************************************************************
 
-*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Projects\WebKit\OpenSource\WebKitBuild\Release\bin32\libdispatch.dll -
-*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\SYSTEM32\atiumdag.dll -
+*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\\Projects\\WebKit\\OpenSource\\WebKitBuild\\Release\bin32\\libdispatch.dll -
+*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\\Windows\\SYSTEM32\atiumdag.dll -
 
 FAULTING_IP:
-_javascript_Core!JSC::JSActivation::getOwnPropertySlot+0 [c:\projects\webkit\opensource\source\_javascript_core\runtime\jsactivation.cpp @ 146]
+_javascript_Core!JSC::JSActivation::getOwnPropertySlot+0 [c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsactivation.cpp @ 146]
 01e3d070 55              push    ebp
 
 EXCEPTION_RECORD:  00092cc8 -- (.exr 0x92cc8)
@@ -151,7 +151,7 @@
 READ_ADDRESS:  00090000
 
 FOLLOWUP_IP:
-_javascript_Core!JSC::JSActivation::getOwnPropertySlot+0 [c:\projects\webkit\opensource\source\_javascript_core\runtime\jsactivation.cpp @ 146]
+_javascript_Core!JSC::JSActivation::getOwnPropertySlot+0 [c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsactivation.cpp @ 146]
 01e3d070 55              push    ebp
 
 WATSON_BKT_PROCSTAMP:  51a8f979
@@ -189,8 +189,8 @@
     Global     Thread_Count: [19]
     Global     PageSize: [4096]
     Global     ModList_SHA1_Hash: [aacef4e7e83b9bddc9cd0cc094dac88d531ea4a3]
-    Global     CommandLine: [C:\Projects\WebKit\OpenSource\WebKitBuild\Release\bin32\{process_name} -]
-    Global     Desktop_Name: [Winsta0\Default]
+    Global     CommandLine: [C:\\Projects\\WebKit\\OpenSource\\WebKitBuild\\Release\bin32\\{process_name} -]
+    Global     Desktop_Name: [Winsta0\\Default]
     Global     ProcessName: [{process_name}]
     Global     Debugger_CPU_Architecture: [X86]
     Global     CPU_ProcessorCount: [24]
@@ -219,9 +219,9 @@
 
 FAULT_INSTR_CODE:  83ec8b55
 
-FAULTING_SOURCE_LINE:  c:\projects\webkit\opensource\source\_javascript_core\runtime\jsactivation.cpp
+FAULTING_SOURCE_LINE:  c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsactivation.cpp
 
-FAULTING_SOURCE_FILE:  c:\projects\webkit\opensource\source\_javascript_core\runtime\jsactivation.cpp
+FAULTING_SOURCE_FILE:  c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsactivation.cpp
 
 FAULTING_SOURCE_LINE_NUMBER:  146
 
@@ -257,7 +257,7 @@
 02 00092a6c 7261ef6b MSVCR100!_flush+0x3b
 03 00092a7c 7261ef1c MSVCR100!_fflush_nolock+0x1c
 04 00092ab4 1000f814 MSVCR100!fflush+0x30
-05 00092ac8 77c0084e DumpRenderTree_10000000!exceptionFilter(struct _EXCEPTION_POINTERS * __formal = 0x852ac807)+0x24 [c:\projects\webkit\opensource\tools\dumprendertree\win\dumprendertree.cpp @ 1281]
+05 00092ac8 77c0084e DumpRenderTree_10000000!exceptionFilter(struct _EXCEPTION_POINTERS * __formal = 0x852ac807)+0x24 [c:\\projects\\webkit\\opensource\tools\\dumprendertree\\win\\dumprendertree.cpp @ 1281]
 06 00092b60 77e8bf2c KERNELBASE!UnhandledExceptionFilter+0x164
 07 00092b68 77e530b4 ntdll!__RtlUserThreadStart+0x57
 08 00092b7c 77e15246 ntdll!_EH4_CallFilterFunc+0x12
@@ -266,10 +266,10 @@
 0b 00092be8 77e52e43 ntdll!ExecuteHandler2+0x26
 0c 00092cb0 77e52cbb ntdll!ExecuteHandler+0x24
 0d 00092cb0 01e3d070 ntdll!KiUserExceptionDispatcher+0xf
-0e 00092ffc 01e67d25 _javascript_Core!JSC::JSActivation::getOwnPropertySlot(class JSC::JSCell * cell = 0x07a7ff98, class JSC::ExecState * exec = 0x0751e168, class JSC::PropertyName propertyName = class JSC::PropertyName, class JSC::PropertySlot * slot = 0x000930bc) [c:\projects\webkit\opensource\source\_javascript_core\runtime\jsactivation.cpp @ 146]
-0f 0009306c 01e68837 _javascript_Core!JSC::JSScope::resolveContainingScopeInternal<1,2>(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class JSC::PropertySlot * slot = 0x7fe03ed0, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0, struct JSC::PutToBaseOperation * putToBaseOperation = 0x00000000, bool __formal = false)+0x205 [c:\projects\webkit\opensource\source\_javascript_core\runtime\jsscope.cpp @ 247]
-10 00093090 01e65860 _javascript_Core!JSC::JSScope::resolveContainingScope<1>(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class JSC::PropertySlot * slot = 0x000930bc, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0, struct JSC::PutToBaseOperation * putToBaseOperation = 0x00000000, bool isStrict = false)+0x27 [c:\projects\webkit\opensource\source\_javascript_core\runtime\jsscope.cpp @ 427]
-11 00093104 01dceeff _javascript_Core!JSC::JSScope::resolve(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0)+0xc0 [c:\projects\webkit\opensource\source\_javascript_core\runtime\jsscope.cpp @ 447]
+0e 00092ffc 01e67d25 _javascript_Core!JSC::JSActivation::getOwnPropertySlot(class JSC::JSCell * cell = 0x07a7ff98, class JSC::ExecState * exec = 0x0751e168, class JSC::PropertyName propertyName = class JSC::PropertyName, class JSC::PropertySlot * slot = 0x000930bc) [c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsactivation.cpp @ 146]
+0f 0009306c 01e68837 _javascript_Core!JSC::JSScope::resolveContainingScopeInternal<1,2>(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class JSC::PropertySlot * slot = 0x7fe03ed0, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0, struct JSC::PutToBaseOperation * putToBaseOperation = 0x00000000, bool __formal = false)+0x205 [c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsscope.cpp @ 247]
+10 00093090 01e65860 _javascript_Core!JSC::JSScope::resolveContainingScope<1>(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class JSC::PropertySlot * slot = 0x000930bc, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0, struct JSC::PutToBaseOperation * putToBaseOperation = 0x00000000, bool isStrict = false)+0x27 [c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsscope.cpp @ 427]
+11 00093104 01dceeff _javascript_Core!JSC::JSScope::resolve(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0)+0xc0 [c:\\projects\\webkit\\opensource\\source\\_javascript_core\runtime\\jsscope.cpp @ 447]
 
 0:000> q
 quit:

Modified: trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -213,7 +213,7 @@
         if not self.xcode_sdk_version('macosx'):
             return []
 
-        XCODE_SDK_REGEX = re.compile('\-sdk (?P<sdk>\D+)\d+\.\d+(?P<specifier>\D*)')
+        XCODE_SDK_REGEX = re.compile(r'\-sdk (?P<sdk>\D+)\d+\.\d+(?P<specifier>\D*)')
         output = self._executive.run_command(['xcodebuild', '-showsdks'], return_stderr=False)
 
         sdks = list()

Modified: trunk/Tools/Scripts/webkitpy/common/system/user.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/system/user.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/system/user.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -101,7 +101,7 @@
 
                 try:
                     indices = []
-                    for value in re.split("\s*,\s*", response):
+                    for value in re.split(r"\s*,\s*", response):
                         parts = value.split('-')
                         if len(parts) == 2:
                             indices += range(int(parts[0]) - 1, int(parts[1]))

Modified: trunk/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -177,6 +177,6 @@
     def _rule_definitions_as_set(self, rules):
         definition_set = set()
         for rule in rules:
-            definitions_inside_rule = re.split('&|\|', rule.definitions_to_match.replace('!', ''))
+            definitions_inside_rule = re.split(r'&|\|', rule.definitions_to_match.replace('!', ''))
             definition_set = definition_set.union(definitions_inside_rule)
         return definition_set

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -105,7 +105,7 @@
     """Provides parsing facilities for lines in the test_expectation.txt file."""
 
     BUG_MODIFIER_PREFIX = 'bug'
-    BUG_MODIFIER_REGEX = 'bug\d+'
+    BUG_MODIFIER_REGEX = r'bug\d+'
     REBASELINE_MODIFIER = 'rebaseline'
     PASS_EXPECTATION = 'pass'
     SKIP_MODIFIER = 'skip'
@@ -198,7 +198,7 @@
             elif modifier.startswith(self.BUG_MODIFIER_PREFIX):
                 has_bugid = True
                 if re.match(self.BUG_MODIFIER_REGEX, modifier):
-                    expectation_line.warnings.append('BUG\d+ is not allowed, must be one of BUGWK\d+, or a non-numeric bug identifier.')
+                    expectation_line.warnings.append(r'BUG\d+ is not allowed, must be one of BUGWK\d+, or a non-numeric bug identifier.')
                 else:
                     expectation_line.parsed_bug_modifiers.append(modifier)
             else:
@@ -344,7 +344,7 @@
                 if token.startswith(WEBKIT_BUG_PREFIX):
                     bugs.append(token.replace(WEBKIT_BUG_PREFIX, 'BUGWK'))
                 else:
-                    match = re.match('Bug\((\w+)\)$', token)
+                    match = re.match(r'Bug\((\w+)\)$', token)
                     if not match:
                         warnings.append('unrecognized bug identifier "%s"' % token)
                         break

Modified: trunk/Tools/Scripts/webkitpy/performance_tests/perftest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/performance_tests/perftest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/performance_tests/perftest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -241,10 +241,10 @@
         return '\n'.join(filtered_lines)
 
     _lines_to_ignore = [
-        re.compile("^\s+$"),
+        re.compile(r"^\s+$"),
         # Following are for handle existing test like Dromaeo
         re.compile(re.escape("""main frame - has 1 onunload handler(s)""")),
-        re.compile('frame \"[^"]+\" - has \d+ onunload handler\(s\)'),
+        re.compile('frame \"[^"]+\" - has \\d+ onunload handler\\(s\\)'),
         # Following is for html5.html
         re.compile(re.escape("""Blocked access to external URL http://www.whatwg.org/specs/web-apps/current-work/""")),
         re.compile(r"CONSOLE MESSAGE: (line \d+: )?Blocked script execution in '[A-Za-z0-9\-\.:]+' because the document's frame is sandboxed and the 'allow-scripts' permission is not set."),

Modified: trunk/Tools/Scripts/webkitpy/port/base.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/port/base.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/port/base.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -550,7 +550,7 @@
             except ValueError:
                 return val
 
-        return [tryint(chunk) for chunk in re.split('(\d+)', string_to_split)]
+        return [tryint(chunk) for chunk in re.split(r'(\d+)', string_to_split)]
 
     def test_dirs(self):
         """Returns the list of top-level test directories."""

Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/port/driver.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -63,7 +63,7 @@
     and post-processing of data."""
 
     metrics_patterns = []
-    metrics_patterns.append((re.compile('at \(-?[0-9]+,-?[0-9]+\) *'), ''))
+    metrics_patterns.append((re.compile(r'at \(-?[0-9]+,-?[0-9]+\) *'), ''))
     metrics_patterns.append((re.compile('size -?[0-9]+x-?[0-9]+ *'), ''))
     metrics_patterns.append((re.compile('text run width -?[0-9]+: '), ''))
     metrics_patterns.append((re.compile('text run width -?[0-9]+ [a-zA-Z ]+: '), ''))
@@ -71,12 +71,12 @@
     metrics_patterns.append((re.compile('RenderImage {INPUT} .*'), 'RenderImage {INPUT}'))
     metrics_patterns.append((re.compile('RenderBlock {INPUT} .*'), 'RenderBlock {INPUT}'))
     metrics_patterns.append((re.compile('RenderTextControl {INPUT} .*'), 'RenderTextControl {INPUT}'))
-    metrics_patterns.append((re.compile('\([0-9]+px'), 'px'))
+    metrics_patterns.append((re.compile(r'\([0-9]+px'), 'px'))
     metrics_patterns.append((re.compile(' *" *\n +" *'), ' '))
     metrics_patterns.append((re.compile('" +$'), '"'))
     metrics_patterns.append((re.compile('- '), '-'))
-    metrics_patterns.append((re.compile('\n( *)"\s+'), '\n\g<1>"'))
-    metrics_patterns.append((re.compile('\s+"\n'), '"\n'))
+    metrics_patterns.append((re.compile('\n( *)"\\s+'), '\n\\g<1>"'))
+    metrics_patterns.append((re.compile('\\s+"\n'), '"\n'))
     metrics_patterns.append((re.compile('scrollWidth [0-9]+'), 'scrollWidth'))
     metrics_patterns.append((re.compile('scrollHeight [0-9]+'), 'scrollHeight'))
     metrics_patterns.append((re.compile('scrollX [0-9]+'), 'scrollX'))
@@ -551,9 +551,9 @@
 
     def _check_for_driver_timeout(self, out_line):
         if out_line.startswith(b"#PID UNRESPONSIVE - "):
-            match = re.match(b'#PID UNRESPONSIVE - (\S+)', out_line)
+            match = re.match(br'#PID UNRESPONSIVE - (\S+)', out_line)
             child_process_name = string_utils.decode(match.group(1), target_type=str) if match else 'WebProcess'
-            match = re.search(b'pid (\d+)', out_line)
+            match = re.search(br'pid (\d+)', out_line)
             child_process_pid = int(match.group(1)) if match else None
             err_line = 'Wait on notifyDone timed out, process ' + child_process_name + ' pid = ' + str(child_process_pid)
             self.error_from_test += err_line
@@ -574,16 +574,16 @@
             self._crashed_pid = self._server_process.system_pid()
             return True
         elif error_line.startswith(b"#CRASHED - "):
-            match = re.match(b'#CRASHED - (\S+)', error_line)
+            match = re.match(br'#CRASHED - (\S+)', error_line)
             self._crashed_process_name = string_utils.decode(match.group(1), target_type=str) if match else 'WebProcess'
-            match = re.search(b'pid (\d+)', error_line)
+            match = re.search(br'pid (\d+)', error_line)
             self._crashed_pid = int(match.group(1)) if match else None
             _log.debug('%s crash, pid = %s' % (self._crashed_process_name, str(self._crashed_pid)))
             return True
         elif error_line.startswith(b"#PROCESS UNRESPONSIVE - "):
-            match = re.match(b'#PROCESS UNRESPONSIVE - (\S+)', error_line)
+            match = re.match(br'#PROCESS UNRESPONSIVE - (\S+)', error_line)
             child_process_name = string_utils.decode(match.group(1), target_type=str) if match else 'WebProcess'
-            match = re.search(b'pid (\d+)', error_line)
+            match = re.search(br'pid (\d+)', error_line)
             child_process_pid = int(match.group(1)) if match else None
             _log.debug('%s is unresponsive, pid = %s' % (child_process_name, str(child_process_pid)))
             self._driver_timed_out = True

Modified: trunk/Tools/Scripts/webkitpy/port/image_diff.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/port/image_diff.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/port/image_diff.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -90,7 +90,7 @@
                 break
 
             if output.startswith(b'Content-Length'):
-                m = re.match(b'Content-Length: (\d+)', output)
+                m = re.match(br'Content-Length: (\d+)', output)
                 content_length = int(string_utils.decode(m.group(1), target_type=str))
                 output_image = self._process.read_stdout(deadline, content_length)
                 output = self._process.read_stdout_line(deadline)

Modified: trunk/Tools/Scripts/webkitpy/port/win.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/port/win.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/port/win.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -283,7 +283,7 @@
                     _log.debug("Key doesn't exist -- must create it.")
                     registry_key = _winreg.CreateKeyEx(root, reg_path, 0, _winreg.KEY_WRITE)
                 except WindowsError as ex:
-                    _log.error("Error setting (%s) %s\key: %s to value: %s.  Error=%s." % (arch, root, key, value, str(ex)))
+                    _log.error(r"Error setting (%s) %s\key: %s to value: %s.  Error=%s." % (arch, root, key, value, str(ex)))
                     _log.error("You many need to adjust permissions on the %s\\%s key." % (reg_path, key))
                     return False
 
@@ -302,7 +302,7 @@
                 if rc == 0:
                     rc = self._executive.run_command(set_reg_value_command, return_exit_code=True)
             if rc:
-                _log.warn("Error setting (%s) %s\key: %s to value: %s.  Error=%s." % (arch, root, key, value, str(rc)))
+                _log.warn(r"Error setting (%s) %s\key: %s to value: %s.  Error=%s." % (arch, root, key, value, str(rc)))
                 _log.warn("You many need to adjust permissions on the %s key." % registry_key)
                 return False
 

Modified: trunk/Tools/Scripts/webkitpy/pytest.ini (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/pytest.ini	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/pytest.ini	2021-05-21 10:16:11 UTC (rev 277853)
@@ -4,7 +4,6 @@
 addopts = -rfEX --strict-markers
 
 filterwarnings =
-    ignore:invalid escape sequence.*:DeprecationWarning
     ignore:Please use assert.* instead.:DeprecationWarning
     ignore:The 'warn' method is deprecated, use 'warning' instead:DeprecationWarning
     ignore:cannot collect test class 'Test[^']*' because it has a __init__ constructor:pytest.PytestCollectionWarning

Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checker.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -614,7 +614,7 @@
         return os.path.splitext(file_path)[1].lstrip(".")
 
     def _should_skip_file_path(self, file_path, skip_array_entry):
-        match = re.search("\s*png$", file_path)
+        match = re.search(r"\s*png$", file_path)
         if match:
             return False
         if isinstance(skip_array_entry, str):

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/changelog.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checkers/changelog.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/changelog.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -60,9 +60,9 @@
         for line in entry_lines:
             line_no = line_no + 1
             # filter file change descriptions
-            if not match('\s*\*\s', line):
+            if not match(r'\s*\*\s', line):
                 continue
-            if search(':\s*$', line) or search(':\s', line):
+            if search(r':\s*$', line) or search(r':\s', line):
                 continue
             self.handle_style_error(line_no,
                                     "changelog/filechangedescriptionwhitespace", 5,
@@ -72,7 +72,7 @@
         line_no = first_line_checked - 1
         for line in entry_lines:
             line_no = line_no + 1
-            if match('\s*No new tests \(OOPS!\)\.$', line):
+            if match(r'\s*No new tests \(OOPS!\)\.$', line):
                 self.handle_style_error(line_no,
                                         "changelog/nonewtests", 5,
                                         "You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.")

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cmake.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cmake.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cmake.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -95,16 +95,16 @@
         self._check_list_order(lines)
 
     def _process_line(self, line_number, line_content):
-        if match('(^|\ +)#', line_content):
+        if match(r'(^|\ +)#', line_content):
             # ignore comment line
             return
         l = line_content.expandtabs(4)
         # check command like message( "testing")
-        if search('\(\ +', l):
+        if search(r'\(\ +', l):
             self._handle_style_error(line_number, 'whitespace/parentheses', 5,
                                      'No space after "("')
         # check command like message("testing" )
-        if search('\ +\)', l) and not search('^\ +\)$', l):
+        if search(r'\ +\)', l) and not search(r'^\ +\)$', l):
             self._handle_style_error(line_number, 'whitespace/parentheses', 5,
                                      'No space before ")"')
         self._check_trailing_whitespace(line_number, l)
@@ -125,7 +125,7 @@
         # check command like "SET    (" or "Set("
         for t in self.NO_SPACE_CMDS:
             self._check_non_lowercase_cmd(line_number, line_content, t)
-            if search('(^|\ +)' + t.lower() + '\ +\(', line_content):
+            if search(r'(^|\ +)' + t.lower() + r'\ +\(', line_content):
                 msg = 'No space between command "' + t.lower() + '" and its parentheses, should be "' + t + '("'
                 self._handle_style_error(line_number, 'whitespace/parentheses', 5, msg)
 
@@ -133,13 +133,13 @@
         # check command like "IF (" or "if(" or "if   (" or "If ()"
         for t in self.ONE_SPACE_CMDS:
             self._check_non_lowercase_cmd(line_number, line_content, t)
-            if search('(^|\ +)' + t.lower() + '(\(|\ \ +\()', line_content):
+            if search(r'(^|\ +)' + t.lower() + r'(\(|\ \ +\()', line_content):
                 msg = 'One space between command "' + t.lower() + '" and its parentheses, should be "' + t + ' ("'
                 self._handle_style_error(line_number, 'whitespace/parentheses', 5, msg)
 
     def _check_non_lowercase_cmd(self, line_number, line_content, cmd):
-        if searchIgnorecase('(^|\ +)' + cmd + '\ *\(', line_content) and \
-           (not search('(^|\ +)' + cmd.lower() + '\ *\(', line_content)):
+        if searchIgnorecase(r'(^|\ +)' + cmd + r'\ *\(', line_content) and \
+           (not search(r'(^|\ +)' + cmd.lower() + r'\ *\(', line_content)):
             msg = 'Use lowercase command "' + cmd.lower() + '"'
             self._handle_style_error(line_number, 'command/lowercase', 5, msg)
 
@@ -151,13 +151,13 @@
         last_line = None
 
         for line_number, line in enumerate(lines, start=1):
-            matched = search('\$\{.*\}', line)
+            matched = search(r'\$\{.*\}', line)
             if matched:
                 continue
             line = line.strip()
 
             if last_line == None:
-                matched = match('(set\(|list\((APPEND|REMOVE_ITEM) )(?P<name>\w+)(?P<item>\s+\w+)?$', line)
+                matched = match(r'(set\(|list\((APPEND|REMOVE_ITEM) )(?P<name>\w+)(?P<item>\s+\w+)?$', line)
                 if matched:
                     # FIXME: Add handling for include directories.
                     if 'INCLUDE_DIRECTORIES' in matched.group('name'):
@@ -168,7 +168,7 @@
                         msg = 'First listitem "%s" should be in a new line.' % matched.group('item').strip()
                         self._handle_style_error(line_number, 'list/parentheses', 5, msg)
             else:
-                matched = match('(?P<item>.+)?\)$', line)
+                matched = match(r'(?P<item>.+)?\)$', line)
                 if matched:
                     last_line = None
                     if matched.group('item'):

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -685,7 +685,7 @@
         return os.path.abspath(self._filename).replace('\\', '/')
 
     def repository_name(self):
-        """Full name after removing the local path to the repository.
+        r"""Full name after removing the local path to the repository.
 
         If we have a real absolute path name here we can try to do something smart:
         detecting the root of the checkout and truncating /path/to/checkout from
@@ -1425,7 +1425,7 @@
 
 def check_for_non_standard_constructs(clean_lines, line_number,
                                       class_state, error):
-    """Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
+    r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
 
     Complain about several constructs which gcc-2 accepts, but which are
     not standard C++.  Warning about these in lint is one way to ease the
@@ -2211,7 +2211,7 @@
                   'Should have spaces around = in property synthesis.')
 
     # Don't try to do spacing checks for operator methods
-    line = sub(r'operator(==|!=|<|<<|<=|>=|>>|>|\+=|-=|\*=|/=|%=|&=|\|=|^=|<<=|>>=|/)\(', 'operator\(', line)
+    line = sub(r'operator(==|!=|<|<<|<=|>=|>>|>|\+=|-=|\*=|/=|%=|&=|\|=|^=|<<=|>>=|/)\(', r'operator\(', line)
     # Don't try to do spacing checks for #include, #import, #if, or #elif statements at
     # minimum because it messes up checks for spacing around /
     if match(r'\s*#\s*(?:include|import|if|elif)', line):
@@ -3863,7 +3863,7 @@
                   'Never soft-link frameworks in headers. Put the soft-link macros in a source file, or create {framework}SoftLink.{{cpp,mm}} instead.'.format(framework=framework_name))
 
         frameworks_with_soft_links = ['CoreMedia', 'CoreVideo', 'DataDetectorsCore', 'LocalAuthentication', 'MediaAccessibility', 'MediaRemote', 'PassKit', 'QuickLook', 'UIKit', 'VideoToolbox']
-        if framework_name in frameworks_with_soft_links and not re.compile('^\s*SOFT_LINK_(PRIVATE_)?FRAMEWORK_FOR_(HEADER|SOURCE)(_WITH_EXPORT)?\({}\)'.format(framework_name)).search(line):
+        if framework_name in frameworks_with_soft_links and not re.compile(r'^\s*SOFT_LINK_(PRIVATE_)?FRAMEWORK_FOR_(HEADER|SOURCE)(_WITH_EXPORT)?\({}\)'.format(framework_name)).search(line):
             error(line_number, 'softlink/framework', 5,
                   'Use {framework}SoftLink.{{cpp,h,mm}} to soft-link to {framework}.framework.'.format(framework=framework_name))
 

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -3123,7 +3123,7 @@
         self.assertEqual('', collapse('\\012'))            # '\012' (char)
         self.assertEqual('', collapse('\\xfF0'))           # '\xfF0' (char)
         self.assertEqual('', collapse('\\n'))              # '\n' (char)
-        self.assertEqual('\#', collapse('\\#'))            # '\#' (bad)
+        self.assertEqual(r'\#', collapse('\\#'))            # '\#' (bad)
 
         self.assertEqual('StringReplace(body, "", "");',
                           collapse('StringReplace(body, "\\\\", "\\\\\\\\");'))

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -60,8 +60,8 @@
     Args:
       content: A multi-line string containing _javascript_ source to be split into individual function definitions.
     """
-    functions = re.split('^function\s+', content, flags=re.MULTILINE)
-    function_name_regex = re.compile('^(?P<name>\w+)\s*\(', flags=re.MULTILINE)
+    functions = re.split(r'^function\s+', content, flags=re.MULTILINE)
+    function_name_regex = re.compile(r'^(?P<name>\w+)\s*\(', flags=re.MULTILINE)
     result = {}
     for f in functions:
         match = function_name_regex.match(f)
@@ -77,8 +77,8 @@
         function: A multi-line string representing the source for one _javascript_ function, less the "function" keyword.
     """
     lines = function.splitlines(True)
-    blank_line_regex = re.compile('^\s*$')
-    comment_line_regex = re.compile('^\s*//.*$')
+    blank_line_regex = re.compile(r'^\s*$')
+    comment_line_regex = re.compile(r'^\s*//.*$')
     while blank_line_regex.search(lines[-1]) or comment_line_regex.search(lines[-1]):
         del lines[-1]
     return ''.join(lines)

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/messagesin.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/checkers/messagesin.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/messagesin.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -42,7 +42,7 @@
         self.check_WTF_prefix(lines)
 
     def check_WTF_prefix(self, lines):
-        comment = re.compile('^\s*#')
+        comment = re.compile(r'^\s*#')
         for line_number, line in enumerate(lines):
             if not comment.match(line) and 'WTF::' in line:
                 self.handle_style_error(line_number + 1,

Modified: trunk/Tools/Scripts/webkitpy/style/patchreader.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/style/patchreader.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/style/patchreader.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -68,7 +68,7 @@
             _log.debug('Found %s new or modified lines in: %s' % (len(line_numbers), path))
 
             if not line_numbers:
-                match = re.search("\s*png$", path)
+                match = re.search(r"\s*png$", path)
                 if match and fs.exists(path):
                     if call_only_once:
                         self._text_file_reader.process_file(file_path=path, line_numbers=None)

Modified: trunk/Tools/Scripts/webkitpy/test/runner.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/test/runner.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/test/runner.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -28,7 +28,7 @@
 
 from webkitpy.common import message_pool
 
-_test_description = re.compile("(\w+) \(([\w.]+)\)")
+_test_description = re.compile(r"(\w+) \(([\w.]+)\)")
 
 
 def unit_test_name(test):

Modified: trunk/Tools/Scripts/webkitpy/test/runner_unittest.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/test/runner_unittest.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/test/runner_unittest.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -77,7 +77,7 @@
         self._results = {}
         for test_name, result, msg in self.triples:
             self._tests.append(test_name)
-            m = re.match("(\w+) \(([\w.]+)\)", test_name)
+            m = re.match(r"(\w+) \(([\w.]+)\)", test_name)
             self._results['%s.%s' % (m.group(2), m.group(1))] = tuple([test_name, result, msg])
 
     def top_suite(self):

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -54,7 +54,7 @@
 
     @staticmethod
     def _enumerate_changelogs(filesystem, dirname, changelog_count):
-        changelogs = [filesystem.join(dirname, filename) for filename in filesystem.listdir(dirname) if re.match('^ChangeLog(-(\d{4}-\d{2}-\d{2}))?$', filename)]
+        changelogs = [filesystem.join(dirname, filename) for filename in filesystem.listdir(dirname) if re.match(r'^ChangeLog(-(\d{4}-\d{2}-\d{2}))?$', filename)]
         # Make sure ChangeLog shows up before ChangeLog-2011-01-01
         changelogs = sorted(changelogs, key=lambda filename: filename + 'X', reverse=True)
         return changelogs[:changelog_count]

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -554,7 +554,7 @@
                         help='display the baselines for *all* tests'),
         ] + platform_options(use_globs=True)
         Command.__init__(self, options=options)
-        self._platform_regexp = re.compile('platform/([^\/]+)/(.+)')
+        self._platform_regexp = re.compile(r'platform/([^\/]+)/(.+)')
 
     def execute(self, options, args, tool):
         if not args and not options.all:
@@ -609,7 +609,7 @@
         ids = set()
         inputfile = tool.filesystem.open_text_file_for_reading(filename)
         for line in inputfile:
-            result = re.search("(https://bugs\.webkit\.org/show_bug\.cgi\?id=|webkit\.org/b/)([0-9]+)", line)
+            result = re.search(r"(https://bugs\.webkit\.org/show_bug\.cgi\?id=|webkit\.org/b/)([0-9]+)", line)
             if result:
                 ids.add(result.group(2))
         inputfile.close()

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/upload.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/tool/commands/upload.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/upload.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -406,7 +406,7 @@
             bug_id = parse_bug_id_from_changelog(commit_log)
 
         if not svn_revision:
-            match = re.search("^r(?P<svn_revision>\d+) \|", commit_log, re.MULTILINE)
+            match = re.search(r"^r(?P<svn_revision>\d+) \|", commit_log, re.MULTILINE)
             if match:
                 svn_revision = match.group('svn_revision')
 

Modified: trunk/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -63,7 +63,7 @@
                 pass
 
             if parsed_url and re.match("bugs.webkit.org", parsed_url.netloc):
-                    match = re.match("id=(?P<bug_id>\d+)", parsed_url.query)
+                    match = re.match(r"id=(?P<bug_id>\d+)", parsed_url.query)
                     if match:
                         state["bug_id"] = int(match.group("bug_id"))
                         return

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_converter.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/w3c/test_converter.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_converter.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -97,11 +97,11 @@
         self.test_harness_re = re.compile('/resources/testharness')
 
         self.prefixed_properties = self.read_webkit_prefixed_css_property_list(css_property_file)
-        prop_regex = '([\s{]|^)(' + "|".join(prop.replace('-webkit-', '') for prop in self.prefixed_properties) + ')(\s+:|:)'
+        prop_regex = r'([\s{]|^)(' + "|".join(prop.replace('-webkit-', '') for prop in self.prefixed_properties) + r')(\s+:|:)'
         self.prop_re = re.compile(prop_regex)
 
         self.prefixed_property_values = self.legacy_read_webkit_prefixed_css_property_list(css_property_value_file)
-        prop_value_regex = '(:\s*|^\s*)(' + "|".join(value.replace('-webkit-', '') for value in self.prefixed_property_values) + ')(\s*;|\s*}|\s*$)'
+        prop_value_regex = r'(:\s*|^\s*)(' + "|".join(value.replace('-webkit-', '') for value in self.prefixed_property_values) + r')(\s*;|\s*}|\s*$)'
         self.prop_value_re = re.compile(prop_value_regex)
 
     def output(self):
@@ -127,7 +127,7 @@
         unprefixed_properties = set()
         for property_name in property_names:
             # Find properties starting with the -webkit- prefix.
-            match = re.match('-webkit-([\w|-]*)', property_name)
+            match = re.match(r'-webkit-([\w|-]*)', property_name)
             if match:
                 prefixed_properties.append(match.group(1))
             else:
@@ -148,7 +148,7 @@
             # Property name is always first on the line.
             property_name = line.split(' ', 1)[0]
             # Find properties starting with the -webkit- prefix.
-            match = re.match('-webkit-([\w|-]*)', property_name)
+            match = re.match(r'-webkit-([\w|-]*)', property_name)
             if match:
                 prefixed_properties.append(match.group(1))
             else:

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_parser.py (277852 => 277853)


--- trunk/Tools/Scripts/webkitpy/w3c/test_parser.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_parser.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -183,12 +183,12 @@
         elements_with_src_attributes = doc.findAll(src=""
         elements_with_href_attributes = doc.findAll(href=""
 
-        url_pattern = re.compile('url\(.*\)')
+        url_pattern = re.compile(r'url\(.*\)')
         urls = []
         for url in doc.findAll(text=url_pattern):
             for url in re.findall(url_pattern, url):
-                url = "" '', url)
-                url = "" '', url)
+                url = "" '', url)
+                url = "" '', url)
                 urls.append(url)
 
         src_paths = [src_tag['src'] for src_tag in elements_with_src_attributes]

Modified: trunk/Tools/lldb/lldb_dump_class_layout.py (277852 => 277853)


--- trunk/Tools/lldb/lldb_dump_class_layout.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Tools/lldb/lldb_dump_class_layout.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -398,7 +398,7 @@
             lldb.SBDebugger.Destroy(self.debugger)
 
     def _get_first_file_architecture(self):
-        p = re.compile('shared library +(\w+)$')
+        p = re.compile(r'shared library +(\w+)$')
         file_result = subprocess.check_output(["file", self.binary_path], encoding='UTF-8').split('\n')
         arches = []
         for line in file_result:

Modified: trunk/Websites/browserbench.org/ChangeLog (277852 => 277853)


--- trunk/Websites/browserbench.org/ChangeLog	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Websites/browserbench.org/ChangeLog	2021-05-21 10:16:11 UTC (rev 277853)
@@ -1,3 +1,14 @@
+2021-05-21  Sam Sneddon  <gsnedd...@apple.com>
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+        https://bugs.webkit.org/show_bug.cgi?id=226018
+
+        Reviewed by Jonathan Bedard.
+
+        Fix Python 3.6+ DeprecationWarnings about unknown escapes
+
+        * JetStream2.0/RexBench/FlightPlanner/convert-nfdc.py:
+
 2021-05-12  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [MotionMark] Apply r277406 to Websites/browserbench.org/MotionMark1.2

Modified: trunk/Websites/browserbench.org/JetStream2.0/RexBench/FlightPlanner/convert-nfdc.py (277852 => 277853)


--- trunk/Websites/browserbench.org/JetStream2.0/RexBench/FlightPlanner/convert-nfdc.py	2021-05-21 09:53:36 UTC (rev 277852)
+++ trunk/Websites/browserbench.org/JetStream2.0/RexBench/FlightPlanner/convert-nfdc.py	2021-05-21 10:16:11 UTC (rev 277853)
@@ -36,7 +36,7 @@
 
 import re
 
-latLongRE = re.compile('\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([NS])\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([EW])')
+latLongRE = re.compile(r'\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([NS])\s*(\d+)-(\d{2})-(\d{2}.\d{3,8})([EW])')
 statesAbbreviationsToExclude = ['AK', 'HI']
 navaidsToInclude = ['VOR', 'NDB']
 airwayFixTypes = frozenset(['CN', 'NDB/DME', 'NDB', 'MIL-REP-PT', 'REP-PT', 'RNAV', 'VOR', 'VOR/DME', 'VORTAC'])
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to