diff -Nru qtwebengine-opensource-src-5.15.16+dfsg/debian/changelog qtwebengine-opensource-src-5.15.16+dfsg/debian/changelog --- qtwebengine-opensource-src-5.15.16+dfsg/debian/changelog 2024-03-15 14:00:35.000000000 -0600 +++ qtwebengine-opensource-src-5.15.16+dfsg/debian/changelog 2024-03-15 23:14:42.000000000 -0600 @@ -1,3 +1,10 @@ +qtwebengine-opensource-src (5.15.16+dfsg-1ubuntu2) noble; urgency=medium + + * Add another batch of patches from Chromium upstream to further fix + various Python 3.12 compatibility issues. + + -- Zixing Liu Fri, 15 Mar 2024 23:14:42 -0600 + qtwebengine-opensource-src (5.15.16+dfsg-1ubuntu1) noble; urgency=medium * Add patches from Chromium upstream to fix Python 3.12 compatibility diff -Nru qtwebengine-opensource-src-5.15.16+dfsg/debian/patches/apply_pyupgrade_to_grit.patch qtwebengine-opensource-src-5.15.16+dfsg/debian/patches/apply_pyupgrade_to_grit.patch --- qtwebengine-opensource-src-5.15.16+dfsg/debian/patches/apply_pyupgrade_to_grit.patch 1969-12-31 17:00:00.000000000 -0700 +++ qtwebengine-opensource-src-5.15.16+dfsg/debian/patches/apply_pyupgrade_to_grit.patch 2024-03-15 23:14:42.000000000 -0600 @@ -0,0 +1,6050 @@ +From 4112612ff4dc1aeb8114f3d3f3005b9ebbc866ad Mon Sep 17 00:00:00 2001 +From: Takuto Ikuta +Date: Tue, 17 Jan 2023 15:45:53 +0000 +Subject: [PATCH] grit: apply pyupgrade + +We use python3 only for build now. + +This is made via +$ git ls-files tools/grit | grep py$ | \ + xargs pyupgrade --keep-percent-format + +I'll remove dependency to six in grit completely in later CL as +pyupgrade doesn't handle some cases. + +Bug: 1406153 +Change-Id: Ic2baeaf89eeee9c23c3d6d34f3fa66a89b6847c7 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4167107 +Reviewed-by: Andrew Grieve +Auto-Submit: Takuto Ikuta +Commit-Queue: Andrew Grieve +Cr-Commit-Position: refs/heads/main@{#1093336} +--- + tools/grit/grit.py | 1 - + tools/grit/grit/__init__.py | 1 - + tools/grit/grit/clique.py | 12 +- + tools/grit/grit/clique_unittest.py | 79 +++++------ + tools/grit/grit/constants.py | 3 +- + tools/grit/grit/exception.py | 3 +- + tools/grit/grit/extern/BogoFP.py | 1 - + tools/grit/grit/extern/FP.py | 1 - + tools/grit/grit/extern/tclib.py | 5 +- + tools/grit/grit/format/android_xml.py | 3 +- + .../grit/grit/format/android_xml_unittest.py | 5 +- + tools/grit/grit/format/c_format_unittest.py | 6 +- + .../grit/grit/format/chrome_messages_json.py | 1 - + .../format/chrome_messages_json_unittest.py | 16 +-- + tools/grit/grit/format/data_pack.py | 14 +- + tools/grit/grit/format/data_pack_unittest.py | 3 +- + .../grit/grit/format/gen_predetermined_ids.py | 5 +- + tools/grit/grit/format/gzip_string.py | 1 - + .../grit/grit/format/gzip_string_unittest.py | 9 +- + tools/grit/grit/format/html_inline.py | 5 +- + .../grit/grit/format/html_inline_unittest.py | 69 +++++---- + .../grit/grit/format/policy_templates_json.py | 1 - + .../format/policy_templates_json_unittest.py | 8 +- + tools/grit/grit/format/rc_header.py | 1 - + tools/grit/grit/format/rc_header_unittest.py | 13 +- + tools/grit/grit/format/rc_unittest.py | 52 +++---- + tools/grit/grit/format/resource_map.py | 1 - + .../grit/grit/format/resource_map_unittest.py | 1 - + tools/grit/grit/gather/admin_template.py | 1 - + .../grit/gather/admin_template_unittest.py | 14 +- + tools/grit/grit/gather/chrome_html.py | 3 +- + .../grit/grit/gather/chrome_html_unittest.py | 33 +++-- + tools/grit/grit/gather/chrome_scaled_image.py | 1 - + .../gather/chrome_scaled_image_unittest.py | 23 ++- + tools/grit/grit/gather/interface.py | 2 +- + tools/grit/grit/gather/json_loader.py | 1 - + .../grit/grit/gather/policy_json_unittest.py | 72 +++++----- + tools/grit/grit/gather/rc.py | 5 +- + tools/grit/grit/gather/rc_unittest.py | 60 ++++---- + tools/grit/grit/gather/regexp.py | 1 - + tools/grit/grit/gather/skeleton_gatherer.py | 2 +- + tools/grit/grit/gather/tr_html.py | 6 +- + tools/grit/grit/gather/tr_html_unittest.py | 116 +++++++-------- + tools/grit/grit/gather/txt.py | 1 - + tools/grit/grit/gather/txt_unittest.py | 6 +- + tools/grit/grit/grd_reader.py | 5 +- + tools/grit/grit/grd_reader_unittest.py | 60 ++++---- + tools/grit/grit/grit_runner.py | 3 +- + tools/grit/grit/grit_runner_unittest.py | 6 +- + tools/grit/grit/lazy_re.py | 3 +- + tools/grit/grit/lazy_re_unittest.py | 1 - + tools/grit/grit/node/base.py | 38 +++-- + tools/grit/grit/node/base_unittest.py | 134 +++++++++--------- + tools/grit/grit/node/custom/filename.py | 1 - + .../grit/node/custom/filename_unittest.py | 3 +- + tools/grit/grit/node/empty.py | 1 - + tools/grit/grit/node/include.py | 3 +- + tools/grit/grit/node/include_unittest.py | 41 +++--- + tools/grit/grit/node/mapping.py | 1 - + tools/grit/grit/node/message.py | 12 +- + tools/grit/grit/node/message_unittest.py | 37 +++-- + tools/grit/grit/node/misc.py | 18 +-- + tools/grit/grit/node/misc_unittest.py | 44 +++--- + tools/grit/grit/node/node_io.py | 3 +- + tools/grit/grit/node/node_io_unittest.py | 28 ++-- + tools/grit/grit/node/structure.py | 7 +- + tools/grit/grit/node/structure_unittest.py | 17 ++- + tools/grit/grit/node/variant.py | 1 - + tools/grit/grit/pseudo.py | 31 ++-- + tools/grit/grit/pseudo_unittest.py | 23 ++- + tools/grit/grit/pseudolocales.py | 97 +++++++------ + tools/grit/grit/pseudolocales_unittest.py | 24 ++-- + tools/grit/grit/shortcuts.py | 3 +- + tools/grit/grit/shortcuts_unittest.py | 6 +- + tools/grit/grit/tclib.py | 13 +- + tools/grit/grit/tclib_unittest.py | 36 ++--- + tools/grit/grit/test_suite_all.py | 1 - + tools/grit/grit/tool/android2grd.py | 15 +- + tools/grit/grit/tool/android2grd_unittest.py | 1 - + tools/grit/grit/tool/build.py | 3 +- + tools/grit/grit/tool/build_unittest.py | 65 +++++---- + tools/grit/grit/tool/buildinfo.py | 1 - + tools/grit/grit/tool/buildinfo_unittest.py | 38 ++--- + tools/grit/grit/tool/count.py | 1 - + tools/grit/grit/tool/diff_structures.py | 1 - + .../grit/tool/diff_structures_unittest.py | 3 +- + tools/grit/grit/tool/interface.py | 3 +- + tools/grit/grit/tool/menu_from_parts.py | 3 +- + tools/grit/grit/tool/newgrd.py | 1 - + tools/grit/grit/tool/newgrd_unittest.py | 3 +- + tools/grit/grit/tool/postprocess_interface.py | 3 +- + tools/grit/grit/tool/postprocess_unittest.py | 7 +- + tools/grit/grit/tool/preprocess_interface.py | 3 +- + tools/grit/grit/tool/preprocess_unittest.py | 5 +- + tools/grit/grit/tool/rc2grd.py | 9 +- + tools/grit/grit/tool/rc2grd_unittest.py | 37 +++-- + tools/grit/grit/tool/resize.py | 1 - + tools/grit/grit/tool/test.py | 1 - + tools/grit/grit/tool/transl2tc.py | 1 - + tools/grit/grit/tool/transl2tc_unittest.py | 37 +++-- + tools/grit/grit/tool/unit.py | 1 - + .../grit/tool/update_resource_ids/__init__.py | 5 +- + .../grit/tool/update_resource_ids/assigner.py | 8 +- + .../update_resource_ids/assigner_unittest.py | 7 +- + .../grit/tool/update_resource_ids/parser.py | 1 - + .../grit/tool/update_resource_ids/reader.py | 5 +- + tools/grit/grit/tool/xmb.py | 15 +- + tools/grit/grit/tool/xmb_unittest.py | 27 ++-- + tools/grit/grit/util.py | 8 +- + tools/grit/grit/util_unittest.py | 33 +++-- + tools/grit/grit/xtb_reader.py | 1 - + tools/grit/grit/xtb_reader_unittest.py | 11 +- + tools/grit/grit_info.py | 5 +- + tools/grit/minify_with_uglify.py | 1 - + tools/grit/minify_with_uglify_unittest.py | 4 +- + tools/grit/minimize_css.py | 2 +- + tools/grit/minimize_css_unittest.py | 12 +- + tools/grit/pak_util.py | 3 +- + tools/grit/preprocess_if_expr.py | 8 +- + tools/grit/preprocess_if_expr_test.py | 5 +- + tools/grit/setup.py | 1 - + tools/grit/stamp_grit_sources.py | 1 - + 122 files changed, 839 insertions(+), 935 deletions(-) + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit.py +@@ -6,7 +6,6 @@ + '''Bootstrapping for GRIT. + ''' + +-from __future__ import print_function + + import os + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/__init__.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/__init__.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/__init__.py +@@ -5,7 +5,6 @@ + '''Package 'grit' + ''' + +-from __future__ import print_function + + import os + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/clique.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/clique.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/clique.py +@@ -6,7 +6,6 @@ + collections of cliques (uber-cliques). + ''' + +-from __future__ import print_function + + import re + +@@ -20,7 +19,7 @@ from grit import pseudolocales + from grit import tclib + + +-class UberClique(object): ++class UberClique: + '''A factory (NOT a singleton factory) for making cliques. It has several + methods for working with the cliques created using the factory. + ''' +@@ -195,8 +194,7 @@ class UberClique(object): + with the same ID. + ''' + for cliques in self.cliques_.values(): +- for c in cliques: +- yield c ++ yield from cliques + + def GenerateXtbParserCallback(self, lang, debug=False): + '''Creates a callback function as required by grit.xtb_reader.Parse(). +@@ -242,7 +240,7 @@ class UberClique(object): + return Callback + + +-class CustomType(object): ++class CustomType: + '''A base class you should implement if you wish to specify a custom type + for a message clique (i.e. custom validation and optional modification of + translations).''' +@@ -274,7 +272,7 @@ class CustomType(object): + ''' + contents = translation.GetContent() + for ix in range(len(contents)): +- if (isinstance(contents[ix], six.string_types)): ++ if (isinstance(contents[ix], str)): + contents[ix] = self.ModifyTextPart(lang, contents[ix]) + + +@@ -299,7 +297,7 @@ class OneOffCustomType(CustomType): + }) + + +-class MessageClique(object): ++class MessageClique: + '''A message along with all of its translations. Also code to bring + translations together with their original message.''' + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/clique_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/clique_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/clique_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.clique''' + +-from __future__ import print_function + + import os + import sys +@@ -15,7 +14,7 @@ if __name__ == '__main__': + import re + import unittest + +-from six import StringIO ++from io import StringIO + + from grit import clique + from grit import exception +@@ -32,8 +31,8 @@ class MessageCliqueUnittest(unittest.Tes + tclib.Placeholder('USERNAME', '%s', 'Joi')]) + c = factory.MakeClique(msg) + +- self.failUnless(c.GetMessage() == msg) +- self.failUnless(c.GetId() == msg.GetId()) ++ self.assertTrue(c.GetMessage() == msg) ++ self.assertTrue(c.GetId() == msg.GetId()) + + msg_fr = tclib.Translation(text='Bonjour USERNAME, comment ca va?', + id=msg.GetId(), placeholders=[ +@@ -47,9 +46,9 @@ class MessageCliqueUnittest(unittest.Tes + + # sort() sorts lists in-place and does not return them + for lang in ('en', 'fr', 'de'): +- self.failUnless(lang in c.clique) ++ self.assertTrue(lang in c.clique) + +- self.failUnless(c.MessageForLanguage('fr').GetRealContent() == ++ self.assertTrue(c.MessageForLanguage('fr').GetRealContent() == + msg_fr.GetRealContent()) + + try: +@@ -58,11 +57,11 @@ class MessageCliqueUnittest(unittest.Tes + except: + pass + +- self.failUnless(c.MessageForLanguage('zh-CN', True) != None) ++ self.assertTrue(c.MessageForLanguage('zh-CN', True) != None) + + rex = re.compile('fr|de|bingo') +- self.failUnless(len(c.AllMessagesThatMatch(rex, False)) == 2) +- self.failUnless( ++ self.assertTrue(len(c.AllMessagesThatMatch(rex, False)) == 2) ++ self.assertTrue( + c.AllMessagesThatMatch(rex, True)[pseudo.PSEUDO_LANG] is not None) + + def testBestClique(self): +@@ -84,16 +83,16 @@ class MessageCliqueUnittest(unittest.Tes + text = msg.GetRealContent() + description = msg.GetDescription() + if text == 'Alfur': +- self.failUnless(description == 'alfaholl') ++ self.assertTrue(description == 'alfaholl') + elif text == 'Gryla': +- self.failUnless(description == 'vondakerling') ++ self.assertTrue(description == 'vondakerling') + elif text == 'Leppaludi': +- self.failUnless(description == 'ID: IDS_LL') +- self.failUnless(count_best_cliques == 5) ++ self.assertTrue(description == 'ID: IDS_LL') ++ self.assertTrue(count_best_cliques == 5) + + def testAllInUberClique(self): + resources = grd_reader.Parse( +- StringIO(u''' ++ StringIO(''' + + + +@@ -113,14 +112,14 @@ class MessageCliqueUnittest(unittest.Tes + for clique_list in resources.UberClique().cliques_.values(): + for clique in clique_list: + content_list.append(clique.GetMessage().GetRealContent()) +- self.failUnless('Hello %s, how are you doing today?' in content_list) +- self.failUnless('Jack "Black" Daniels' in content_list) +- self.failUnless('Hello!' in content_list) ++ self.assertTrue('Hello %s, how are you doing today?' in content_list) ++ self.assertTrue('Jack "Black" Daniels' in content_list) ++ self.assertTrue('Hello!' in content_list) + + def testCorrectExceptionIfWrongEncodingOnResourceFile(self): + '''This doesn't really belong in this unittest file, but what the heck.''' + resources = grd_reader.Parse( +- StringIO(u''' ++ StringIO(''' + + + +@@ -137,7 +136,7 @@ class MessageCliqueUnittest(unittest.Tes + tclib.Message(text='Hello USERNAME', + placeholders=[tclib.Placeholder('USERNAME', '%s', 'Joi')]), + ] +- self.failUnless(messages[0].GetId() == messages[1].GetId()) ++ self.assertTrue(messages[0].GetId() == messages[1].GetId()) + + # Both of the above would share a translation. + translation = tclib.Translation(id=messages[0].GetId(), +@@ -151,9 +150,9 @@ class MessageCliqueUnittest(unittest.Tes + for clq in cliques: + clq.AddTranslation(translation, 'fr') + +- self.failUnless(cliques[0].MessageForLanguage('fr').GetRealContent() == ++ self.assertTrue(cliques[0].MessageForLanguage('fr').GetRealContent() == + 'Bonjour $1') +- self.failUnless(cliques[1].MessageForLanguage('fr').GetRealContent() == ++ self.assertTrue(cliques[1].MessageForLanguage('fr').GetRealContent() == + 'Bonjour %s') + + def testMissingTranslations(self): +@@ -163,17 +162,17 @@ class MessageCliqueUnittest(unittest.Tes + + cliques[1].MessageForLanguage('fr', False, True) + +- self.failUnless(not factory.HasMissingTranslations()) ++ self.assertTrue(not factory.HasMissingTranslations()) + + cliques[0].MessageForLanguage('de', False, False) + +- self.failUnless(factory.HasMissingTranslations()) ++ self.assertTrue(factory.HasMissingTranslations()) + + report = factory.MissingTranslationsReport() +- self.failUnless(report.count('WARNING') == 1) +- self.failUnless(report.count('8053599568341804890 "Goodbye" fr') == 1) +- self.failUnless(report.count('ERROR') == 1) +- self.failUnless(report.count('800120468867715734 "Hello" de') == 1) ++ self.assertTrue(report.count('WARNING') == 1) ++ self.assertTrue(report.count('8053599568341804890 "Goodbye" fr') == 1) ++ self.assertTrue(report.count('ERROR') == 1) ++ self.assertTrue(report.count('800120468867715734 "Hello" de') == 1) + + def testCustomTypes(self): + factory = clique.UberClique() +@@ -191,22 +190,22 @@ class MessageCliqueUnittest(unittest.Tes + 'grit.clique_unittest.DummyCustomType', clique.CustomType)) + translation = tclib.Translation(id=message.GetId(), text='Bilingo bolongo') + c.AddTranslation(translation, 'fr') +- self.failUnless(c.MessageForLanguage('fr').GetRealContent().startswith('jjj')) ++ self.assertTrue(c.MessageForLanguage('fr').GetRealContent().startswith('jjj')) + + def testWhitespaceMessagesAreNontranslateable(self): + factory = clique.UberClique() + + message = tclib.Message(text=' \t') + c = factory.MakeClique(message, translateable=True) +- self.failIf(c.IsTranslateable()) ++ self.assertFalse(c.IsTranslateable()) + + message = tclib.Message(text='\n \n ') + c = factory.MakeClique(message, translateable=True) +- self.failIf(c.IsTranslateable()) ++ self.assertFalse(c.IsTranslateable()) + + message = tclib.Message(text='\n hello') + c = factory.MakeClique(message, translateable=True) +- self.failUnless(c.IsTranslateable()) ++ self.assertTrue(c.IsTranslateable()) + + def testEachCliqueKeptSorted(self): + factory = clique.UberClique() +@@ -218,10 +217,10 @@ class MessageCliqueUnittest(unittest.Tes + clique_a = factory.MakeClique(msg_a, translateable=True) + clique_c = factory.MakeClique(msg_c, translateable=True) + clique_list = factory.cliques_[clique_a.GetId()] +- self.failUnless(len(clique_list) == 3) +- self.failUnless(clique_list[0] == clique_a) +- self.failUnless(clique_list[1] == clique_b) +- self.failUnless(clique_list[2] == clique_c) ++ self.assertTrue(len(clique_list) == 3) ++ self.assertTrue(clique_list[0] == clique_a) ++ self.assertTrue(clique_list[1] == clique_b) ++ self.assertTrue(clique_list[2] == clique_c) + + def testBestCliqueSortIsStable(self): + factory = clique.UberClique() +@@ -236,19 +235,19 @@ class MessageCliqueUnittest(unittest.Tes + # Insert in an order that tests all outcomes. + clique_no_description = factory.MakeClique(msg_no_description, + translateable=True) +- self.failUnless(factory.BestClique(clique_id) == clique_no_description) ++ self.assertTrue(factory.BestClique(clique_id) == clique_no_description) + clique_id_description_b = factory.MakeClique(msg_id_description_b, + translateable=True) +- self.failUnless(factory.BestClique(clique_id) == clique_id_description_b) ++ self.assertTrue(factory.BestClique(clique_id) == clique_id_description_b) + clique_id_description_a = factory.MakeClique(msg_id_description_a, + translateable=True) +- self.failUnless(factory.BestClique(clique_id) == clique_id_description_a) ++ self.assertTrue(factory.BestClique(clique_id) == clique_id_description_a) + clique_description_y = factory.MakeClique(msg_description_y, + translateable=True) +- self.failUnless(factory.BestClique(clique_id) == clique_description_y) ++ self.assertTrue(factory.BestClique(clique_id) == clique_description_y) + clique_description_x = factory.MakeClique(msg_description_x, + translateable=True) +- self.failUnless(factory.BestClique(clique_id) == clique_description_x) ++ self.assertTrue(factory.BestClique(clique_id) == clique_description_x) + + + class DummyCustomType(clique.CustomType): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/constants.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/constants.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/constants.py +@@ -5,12 +5,11 @@ + '''Constant definitions for GRIT. + ''' + +-from __future__ import print_function + + # This is the Icelandic noun meaning "grit" and is used to check that our + # input files are in the correct encoding. The middle character gets encoded + # as two bytes in UTF-8, so this is sufficient to detect incorrect encoding. +-ENCODING_CHECK = u'm\u00f6l' ++ENCODING_CHECK = 'm\u00f6l' + + # A special language, translations into which are always "TTTTTT". + CONSTANT_LANGUAGE = 'x_constant' +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/exception.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/exception.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/exception.py +@@ -5,7 +5,6 @@ + '''Exception types for GRIT. + ''' + +-from __future__ import print_function + + class Base(Exception): + '''A base exception that uses the class's docstring in addition to any +@@ -17,7 +16,7 @@ class Base(Exception): + msg = self.__doc__ + ': ' + msg + else: + msg = self.__doc__ +- super(Base, self).__init__(msg) ++ super().__init__(msg) + + + class Parsing(Base): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/extern/BogoFP.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/extern/BogoFP.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/extern/BogoFP.py +@@ -9,7 +9,6 @@ Usage: + grit.py -h grit.extern.BogoFP xmb /tmp/foo + """ + +-from __future__ import print_function + + import grit.extern.FP + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/extern/FP.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/extern/FP.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/extern/FP.py +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-from __future__ import print_function + + try: + import hashlib +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/extern/tclib.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/extern/tclib.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/extern/tclib.py +@@ -10,7 +10,6 @@ + # for creating Windows .rc and .h files. These are the only parts needed by + # the Chrome build process. + +-from __future__ import print_function + + from grit.extern import FP + +@@ -56,7 +55,7 @@ class MessageTranslationError(Exception) + # ----------------------------------------------------------- + # The Placeholder class represents a placeholder in a message. + +-class Placeholder(object): ++class Placeholder: + # String representation + def __str__(self): + return '%s, "%s", "%s"' % \ +@@ -100,7 +99,7 @@ class Placeholder(object): + # BaseMessage is the common parent class of Message and Translation. + # It is not meant for direct use. + +-class BaseMessage(object): ++class BaseMessage: + # Three types of message construction is supported. If the message text is a + # simple string with no dynamic content, you can pass it to the constructor + # as the "text" parameter. Otherwise, you can omit "text" and assemble the +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/android_xml.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/android_xml.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/android_xml.py +@@ -59,7 +59,6 @@ in the output xml file. For example: + + """ + +-from __future__ import print_function + + import os + import re +@@ -81,7 +80,7 @@ _NAME_PATTERN = lazy_re.compile(r'IDS_(? + + # Most strings are output as a element. Note the double quotes + # around the value to preserve whitespace. +-_STRING_TEMPLATE = u'"%s"\n' ++_STRING_TEMPLATE = '"%s"\n' + + # Some strings are output as a element. + _PLURALS_TEMPLATE = '\n%s\n' +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/android_xml_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/android_xml_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/android_xml_unittest.py +@@ -5,7 +5,6 @@ + + """Unittest for android_xml.py.""" + +-from __future__ import print_function + + import os + import sys +@@ -14,7 +13,7 @@ import unittest + if __name__ == '__main__': + sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) + +-from six import StringIO ++from io import StringIO + + from grit import util + from grit.format import android_xml +@@ -139,7 +138,7 @@ a sledge hammer." + self.assertTrue(android_xml.ShouldOutputNode(msg_world, tagged_only=False)) + + +-class DummyOutput(object): ++class DummyOutput: + + def __init__(self, type, language): + self.type = type +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/c_format_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/c_format_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/c_format_unittest.py +@@ -24,7 +24,7 @@ from grit.tool import build + class CFormatUnittest(unittest.TestCase): + + def testMessages(self): +- root = util.ParseGrdForUnittest(u""" ++ root = util.ParseGrdForUnittest(""" + + Do you want to play questions? + +@@ -44,7 +44,7 @@ Statement. Two all. Game point. + buf = StringIO() + build.RcBuilder.ProcessNode(root, DummyOutput('c_format', 'en'), buf) + output = util.StripBlankLinesAndComments(buf.getvalue()) +- self.assertEqual(u"""\ ++ self.assertEqual("""\ + #include "resource.h" + const char* GetString(int id) { + switch (id) { +@@ -62,7 +62,7 @@ const char* GetString(int id) { + }""", output) + + +-class DummyOutput(object): ++class DummyOutput: + + def __init__(self, type, language): + self.type = type +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/chrome_messages_json.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/chrome_messages_json.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/chrome_messages_json.py +@@ -5,7 +5,6 @@ + """Formats as a .json file that can be used to localize Google Chrome + extensions.""" + +-from __future__ import print_function + + from json import JSONEncoder + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/chrome_messages_json_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/chrome_messages_json_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/chrome_messages_json_unittest.py +@@ -29,7 +29,7 @@ class ChromeMessagesJsonFormatUnittest(u + maxDiff = None + + def testMessages(self): +- root = util.ParseGrdForUnittest(u""" ++ root = util.ParseGrdForUnittest(""" + + + Simple message. +@@ -65,7 +65,7 @@ class ChromeMessagesJsonFormatUnittest(u + build.RcBuilder.ProcessNode(root, DummyOutput('chrome_messages_json', 'en'), + buf) + output = buf.getvalue() +- test = u""" ++ test = """ + { + "SIMPLE_MESSAGE": { + "message": "Simple message." +@@ -119,7 +119,7 @@ class ChromeMessagesJsonFormatUnittest(u + build.RcBuilder.ProcessNode(root, DummyOutput('chrome_messages_json', 'fr'), + buf) + output = buf.getvalue() +- test = u""" ++ test = """ + { + "ID_HELLO": { + "message": "H\u00e9P\u00e9ll\u00f4P\u00f4!" +@@ -149,11 +149,11 @@ class ChromeMessagesJsonFormatUnittest(u + build.RcBuilder.ProcessNode(root, DummyOutput('chrome_messages_json', 'fr'), + buf) + output = buf.getvalue() +- test = u'{}' ++ test = '{}' + self.assertEqual(test, output) + + def testVerifyMinification(self): +- root = util.ParseGrdForUnittest(u""" ++ root = util.ParseGrdForUnittest(""" + + + $1atest$2b +@@ -165,12 +165,12 @@ class ChromeMessagesJsonFormatUnittest(u + build.RcBuilder.ProcessNode(root, DummyOutput('chrome_messages_json', 'en'), + buf) + output = buf.getvalue() +- test = (u'{"IDS":{"message":"$1$test$2$","placeholders":' +- u'{"1":{"content":"$1"},"2":{"content":"$2"}}}}') ++ test = ('{"IDS":{"message":"$1$test$2$","placeholders":' ++ '{"1":{"content":"$1"},"2":{"content":"$2"}}}}') + self.assertEqual(test, output) + + +-class DummyOutput(object): ++class DummyOutput: + + def __init__(self, type, language): + self.type = type +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/data_pack.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/data_pack.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/data_pack.py +@@ -40,7 +40,7 @@ class CorruptDataPack(Exception): + pass + + +-class DataPackSizes(object): ++class DataPackSizes: + def __init__(self, header, id_table, alias_table, data): + self.header = header + self.id_table = id_table +@@ -64,7 +64,7 @@ class DataPackSizes(object): + return self.__class__.__name__ + repr(self.__dict__) + + +-class DataPackContents(object): ++class DataPackContents: + def __init__(self, resources, encoding, version, aliases, sizes): + # Map of resource_id -> str. + self.resources = resources +@@ -211,7 +211,7 @@ def WriteDataPack(resources, output_file + + def ReadGrdInfo(grd_file): + info_dict = {} +- with open(grd_file + '.info', 'rt') as f: ++ with open(grd_file + '.info') as f: + for line in f: + item = GrdInfoItem._make(line.strip().split(',')) + info_dict[int(item.id)] = item +@@ -246,7 +246,7 @@ def RePack(output_file, + lines = util.ReadFile(allowlist_file, 'utf-8').strip().splitlines() + if not lines: + raise Exception('Allowlist file should not be empty') +- allowlist = set(int(x) for x in lines) ++ allowlist = {int(x) for x in lines} + inputs = [(p.resources, p.encoding) for p in input_data_packs] + resources, encoding = RePackFromDataPackStrings(inputs, allowlist, + suppress_removed_key_output) +@@ -255,7 +255,7 @@ def RePack(output_file, + output_info_filepath = output_file + '.info' + with open(output_info_filepath, 'w') as output_info_file: + for filename in input_info_files: +- with open(filename, 'r') as info_file: ++ with open(filename) as info_file: + output_info_file.writelines(info_file.readlines()) + + +@@ -296,9 +296,9 @@ def RePackFromDataPackStrings(inputs, + ' vs ' + str(input_encoding)) + + if allowlist: +- allowlisted_resources = dict([(key, input_resources[key]) ++ allowlisted_resources = {key: input_resources[key] + for key in input_resources.keys() +- if key in allowlist]) ++ if key in allowlist} + resources.update(allowlisted_resources) + removed_keys = [ + key for key in input_resources.keys() if key not in allowlist +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/data_pack_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/data_pack_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/data_pack_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.format.data_pack''' + +-from __future__ import print_function + + import os + import sys +@@ -58,7 +57,7 @@ class FormatDataPackUnittest(unittest.Te + 10: b'this is id 4', + } + data = data_pack.WriteDataPackToString(input_resources, data_pack.UTF8) +- self.assertEquals(data, expected_data) ++ self.assertEqual(data, expected_data) + + expected_data_pack = data_pack.DataPackContents({ + 1: b'', +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/gen_predetermined_ids.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/gen_predetermined_ids.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/gen_predetermined_ids.py +@@ -9,7 +9,6 @@ input to grit via the -p option. This is + a while and its output checked in. See tools/gritsettings/README.md for details. + """ + +-from __future__ import print_function + + import os + import re +@@ -55,7 +54,7 @@ def _ReadOrderedResourceIds(path): + An array of ordered resource ids. + """ + ordered_resource_ids = [] +- with open(path, "r") as f: ++ with open(path) as f: + for match in ORDERED_RESOURCE_IDS_REGEX.finditer(f.read()): + ordered_resource_ids.append(int(match.group(1))) + return ordered_resource_ids +@@ -109,7 +108,7 @@ def _ReadOriginalResourceIds(out_dir): + for root, dirnames, filenames in os.walk(out_dir + '/gen'): + for filename in filenames: + if filename.endswith(('_resources.h', '_settings.h', '_strings.h')): +- with open(os.path.join(root, filename), "r") as f: ++ with open(os.path.join(root, filename)) as f: + ReadResourceIdsFromFile(f, original_resources) + return original_resources + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/gzip_string.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/gzip_string.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/gzip_string.py +@@ -4,7 +4,6 @@ + """Provides gzip utilities for strings. + """ + +-from __future__ import print_function + + import gzip + import io +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/gzip_string_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/gzip_string_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/gzip_string_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.format.gzip_string''' + +-from __future__ import print_function + + import gzip + import io +@@ -32,7 +31,7 @@ class FormatGzipStringUnittest(unittest. + b'') + + compressed = gzip_string.GzipStringRsyncable(input) +- self.failUnless(header_begin == compressed[:2]) ++ self.assertTrue(header_begin == compressed[:2]) + + compressed_file = io.BytesIO() + compressed_file.write(compressed) +@@ -40,7 +39,7 @@ class FormatGzipStringUnittest(unittest. + + with gzip.GzipFile(mode='rb', fileobj=compressed_file) as f: + output = f.read() +- self.failUnless(output == input) ++ self.assertTrue(output == input) + + def testGzipString(self): + header_begin = b'\x1f\x8b' # gzip first two bytes +@@ -50,7 +49,7 @@ class FormatGzipStringUnittest(unittest. + b'') + + compressed = gzip_string.GzipString(input) +- self.failUnless(header_begin == compressed[:2]) ++ self.assertTrue(header_begin == compressed[:2]) + + compressed_file = io.BytesIO() + compressed_file.write(compressed) +@@ -58,7 +57,7 @@ class FormatGzipStringUnittest(unittest. + + with gzip.GzipFile(mode='rb', fileobj=compressed_file) as f: + output = f.read() +- self.failUnless(output == input) ++ self.assertTrue(output == input) + + + if __name__ == '__main__': +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/html_inline.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/html_inline.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/html_inline.py +@@ -10,7 +10,6 @@ and inlines the specified file, producin + dependencies. It recursively inlines the included files. + """ + +-from __future__ import print_function + + import os + import re +@@ -587,7 +586,7 @@ def InlineToString(input_filename, grd_n + strip_whitespace=strip_whitespace, + rewrite_function=rewrite_function, + filename_expansion_function=filename_expansion_function).inlined_data +- except IOError as e: ++ except OSError as e: + raise Exception("Failed to open %s while trying to flatten %s. (%s)" % + (e.filename, input_filename, e.strerror)) + +@@ -627,7 +626,7 @@ def GetResourceFilenames(filename, + strip_whitespace=False, + rewrite_function=rewrite_function, + filename_expansion_function=filename_expansion_function).inlined_files +- except IOError as e: ++ except OSError as e: + raise Exception("Failed to open %s while trying to flatten %s. (%s)" % + (e.filename, filename, e.strerror)) + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/html_inline_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/html_inline_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/html_inline_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.format.html_inline''' + +-from __future__ import print_function + + import os + import re +@@ -19,7 +18,7 @@ from grit import util + from grit.format import html_inline + + +-class FakeGrdNode(object): ++class FakeGrdNode: + def EvaluateCondition(self, cond): + return eval(cond) + +@@ -82,7 +81,7 @@ class HtmlInlineUnittest(unittest.TestCa + resources = html_inline.GetResourceFilenames(tmp_dir.GetPath('index.html'), + None) + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + tmp_dir.CleanUp() + + def testUnmatchedEndIfBlock(self): +@@ -107,7 +106,7 @@ class HtmlInlineUnittest(unittest.TestCa + + with self.assertRaises(Exception) as cm: + html_inline.GetResourceFilenames(tmp_dir.GetPath('index.html'), None) +- self.failUnlessEqual(str(cm.exception), 'Unmatched ') ++ self.assertEqual(str(cm.exception), 'Unmatched ') + tmp_dir.CleanUp() + + def testCompressedJavaScript(self): +@@ -127,7 +126,7 @@ class HtmlInlineUnittest(unittest.TestCa + resources = html_inline.GetResourceFilenames(tmp_dir.GetPath('index.js'), + None) + resources.add(tmp_dir.GetPath('index.js')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + tmp_dir.CleanUp() + + def testInlineCSSImports(self): +@@ -182,8 +181,8 @@ class HtmlInlineUnittest(unittest.TestCa + result = html_inline.DoInline(tmp_dir.GetPath('index.html'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + + tmp_dir.CleanUp() +@@ -262,8 +261,8 @@ class HtmlInlineUnittest(unittest.TestCa + result = html_inline.DoInline(tmp_dir.GetPath('index.html'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + + tmp_dir.CleanUp() +@@ -312,8 +311,8 @@ class HtmlInlineUnittest(unittest.TestCa + result = html_inline.DoInline(tmp_dir.GetPath('index.html'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -356,7 +355,7 @@ class HtmlInlineUnittest(unittest.TestCa + resources = html_inline.GetResourceFilenames(tmp_dir.GetPath('index.html'), + None) + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + tmp_dir.CleanUp() + + def testInlineCSSLinks(self): +@@ -402,8 +401,8 @@ class HtmlInlineUnittest(unittest.TestCa + result = html_inline.DoInline(tmp_dir.GetPath('index.html'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -453,8 +452,8 @@ class HtmlInlineUnittest(unittest.TestCa + filename_expansion_function=replacer('WHICH', '1')) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + + # Test names-only inlining. +@@ -465,7 +464,7 @@ class HtmlInlineUnittest(unittest.TestCa + filename_expansion_function=replacer('WHICH', '1')) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + tmp_dir.CleanUp() + + def testWithCloseTags(self): +@@ -530,8 +529,8 @@ class HtmlInlineUnittest(unittest.TestCa + None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -553,8 +552,8 @@ class HtmlInlineUnittest(unittest.TestCa + result = html_inline.DoInline(tmp_dir.GetPath('include.js'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('include.js')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -590,8 +589,8 @@ class HtmlInlineUnittest(unittest.TestCa + resources = result.inlined_files + + resources.add(tmp_dir.GetPath('if.js')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -821,8 +820,8 @@ L17 /*grit-removed-lines:4*/ + None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -853,8 +852,8 @@ L17 /*grit-removed-lines:4*/ + result = html_inline.DoInline(tmp_dir.GetPath('index.html'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -910,8 +909,8 @@ L17 /*grit-removed-lines:4*/ + result = html_inline.DoInline(tmp_dir.GetPath('index.html'), None) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) +- self.failUnlessEqual(expected_inlined, ++ self.assertEqual(resources, source_resources) ++ self.assertEqual(expected_inlined, + util.FixLineEnd(result.inlined_data, '\n')) + tmp_dir.CleanUp() + +@@ -980,13 +979,13 @@ L17 /*grit-removed-lines:4*/ + FakeGrdNode()) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + + # ignore whitespace + expected_inlined = re.sub(r'\s+', ' ', expected_inlined) + actually_inlined = re.sub(r'\s+', ' ', + util.FixLineEnd(result.inlined_data, '\n')) +- self.failUnlessEqual(expected_inlined, actually_inlined); ++ self.assertEqual(expected_inlined, actually_inlined); + tmp_dir.CleanUp() + + def testPreprocessOnlyEvaluatesIncludeAndIf(self): +@@ -1034,13 +1033,13 @@ L17 /*grit-removed-lines:4*/ + preprocess_only=True) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + + # Ignore whitespace + expected_inlined = re.sub(r'\s+', ' ', expected_inlined) + actually_inlined = re.sub(r'\s+', ' ', + util.FixLineEnd(result.inlined_data, '\n')) +- self.failUnlessEqual(expected_inlined, actually_inlined) ++ self.assertEqual(expected_inlined, actually_inlined) + + tmp_dir.CleanUp() + +@@ -1078,13 +1077,13 @@ L17 /*grit-removed-lines:4*/ + preprocess_only=True) + resources = result.inlined_files + resources.add(tmp_dir.GetPath('index.html')) +- self.failUnlessEqual(resources, source_resources) ++ self.assertEqual(resources, source_resources) + + # Ignore whitespace + expected_inlined = re.sub(r'\s+', ' ', expected_inlined) + actually_inlined = re.sub(r'\s+', ' ', + util.FixLineEnd(result.inlined_data, '\n')) +- self.failUnlessEqual(expected_inlined, actually_inlined) ++ self.assertEqual(expected_inlined, actually_inlined) + + tmp_dir.CleanUp() + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/policy_templates_json.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/policy_templates_json.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/policy_templates_json.py +@@ -5,7 +5,6 @@ + """Translates policy_templates.json files. + """ + +-from __future__ import print_function + + from grit.node import structure + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/policy_templates_json_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/policy_templates_json_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/policy_templates_json_unittest.py +@@ -7,7 +7,6 @@ + """Unittest for policy_templates_json.py. + """ + +-from __future__ import print_function + + import os + import sys +@@ -18,7 +17,7 @@ import grit.extern.tclib + import tempfile + import unittest + +-from six import StringIO ++from io import StringIO + + from grit import grd_reader + from grit.tool import build +@@ -148,7 +147,7 @@ class PolicyTemplatesJsonUnittest(unitte + # Caption and message texts get taken from xtb. + # desc is 'translated' to some pseudo-English + # 'ThïPïs pôPôlïPïcýPý dôéPôés stüPüff'. +- expected = u"""{ ++ expected = """{ + "policy_definitions": [ + { + "caption": "%s", +@@ -191,7 +190,7 @@ class PolicyTemplatesJsonUnittest(unitte + self.assertEqual(expected, output) + + +-class DummyOutput(object): ++class DummyOutput: + + def __init__(self, type, language): + self.type = type +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/rc_header.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/rc_header.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/rc_header.py +@@ -5,7 +5,6 @@ + '''Item formatters for RC headers. + ''' + +-from __future__ import print_function + + + def Format(root, lang='en', output_dir='.'): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/rc_header_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/rc_header_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/rc_header_unittest.py +@@ -8,7 +8,6 @@ + # GRD samples exceed the 80 character limit. + # pylint: disable-msg=C6310 + +-from __future__ import print_function + + import os + import sys +@@ -44,8 +43,8 @@ class RcHeaderFormatterUnittest(unittest + + ''') + output = self.FormatAll(grd) +- self.failUnless(output.count('IDS_GREETING10000')) +- self.failUnless(output.count('ID_LOGO300')) ++ self.assertTrue(output.count('IDS_GREETING10000')) ++ self.assertTrue(output.count('ID_LOGO300')) + + def testOnlyDefineResourcesThatSatisfyOutputCondition(self): + grd = util.ParseGrdForUnittest(''' +@@ -76,10 +75,10 @@ class RcHeaderFormatterUnittest(unittest + + ''') + output = self.FormatAll(grd) +- self.failUnless(output.count('IDS_FIRSTPRESENTSTRING10000')) +- self.failIf(output.count('IDS_MISSINGSTRING')) +- self.failUnless(output.count('IDS_LANGUAGESPECIFICSTRING10002')) +- self.failUnless(output.count('IDS_THIRDPRESENTSTRING10003')) ++ self.assertTrue(output.count('IDS_FIRSTPRESENTSTRING10000')) ++ self.assertFalse(output.count('IDS_MISSINGSTRING')) ++ self.assertTrue(output.count('IDS_LANGUAGESPECIFICSTRING10002')) ++ self.assertTrue(output.count('IDS_THIRDPRESENTSTRING10003')) + + def testEmit(self): + grd = util.ParseGrdForUnittest(''' +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/rc_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/rc_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/rc_unittest.py +@@ -34,7 +34,7 @@ _PREAMBLE = '''\ + ''' + + +-class DummyOutput(object): ++class DummyOutput: + def __init__(self, type, language, file = 'hello.gif'): + self.type = type + self.language = language +@@ -72,7 +72,7 @@ Sting sting + buf = StringIO() + build.RcBuilder.ProcessNode(root, DummyOutput('rc_all', 'en'), buf) + output = util.StripBlankLinesAndComments(buf.getvalue()) +- self.assertEqual(_PREAMBLE + u'''\ ++ self.assertEqual(_PREAMBLE + '''\ + STRINGTABLE + BEGIN + IDS_BTN_GO "Go!" +@@ -94,7 +94,7 @@ END''', output) + buf = StringIO() + build.RcBuilder.ProcessNode(root, DummyOutput('rc_all', 'en'), buf) + output = util.StripBlankLinesAndComments(buf.getvalue()) +- expected = _PREAMBLE + u'''\ ++ expected = _PREAMBLE + '''\ + IDC_KLONKMENU MENU + BEGIN + POPUP "&File" +@@ -172,8 +172,8 @@ END'''.strip() + build.RcBuilder.ProcessNode(root, DummyOutput('rc_all', 'en'), buf) + output = util.StripBlankLinesAndComments(buf.getvalue()) + expected = (_PREAMBLE + +- u'IDR_HTML HTML "%s"\n' +- u'IDR_HTML2 HTML "%s"' ++ 'IDR_HTML HTML "%s"\n' ++ 'IDR_HTML2 HTML "%s"' + % (util.normpath('/temp/bingo.html').replace('\\', '\\\\'), + util.normpath('/temp/bingo2.html').replace('\\', '\\\\'))) + # hackety hack to work on win32&lin +@@ -191,8 +191,8 @@ END'''.strip() + build.RcBuilder.ProcessNode(root, DummyOutput('rc_all', 'en'), buf) + output = util.StripBlankLinesAndComments(buf.getvalue()) + expected = (_PREAMBLE + +- u'TEXT_ONE TXT "%s"\n' +- u'TEXT_TWO TXT "%s"' ++ 'TEXT_ONE TXT "%s"\n' ++ 'TEXT_TWO TXT "%s"' + % (util.normpath('/temp/bingo.txt').replace('\\', '\\\\'), + 'bingo2.txt')) + # hackety hack to work on win32&lin +@@ -213,7 +213,7 @@ END'''.strip() + output = util.StripBlankLinesAndComments(buf.getvalue()) + + expected = (_PREAMBLE + +- u'HTML_FILE1 BINDATA "HTML_FILE1_include_test.html"') ++ 'HTML_FILE1 BINDATA "HTML_FILE1_include_test.html"') + # hackety hack to work on win32&lin + output = re.sub(r'"[c-zC-Z]:', '"', output) + self.assertEqual(expected, output) +@@ -221,19 +221,19 @@ END'''.strip() + file_contents = util.ReadFile(output_file, 'utf-8') + + # Check for the content added by the tag. +- self.failUnless(file_contents.find('Hello Include!') != -1) ++ self.assertTrue(file_contents.find('Hello Include!') != -1) + # Check for the content that was removed by if tag. +- self.failUnless(file_contents.find('should be removed') == -1) ++ self.assertTrue(file_contents.find('should be removed') == -1) + # Check for the content that was kept in place by if. +- self.failUnless(file_contents.find('should be kept') != -1) +- self.failUnless(file_contents.find('in the middle...') != -1) +- self.failUnless(file_contents.find('at the end...') != -1) ++ self.assertTrue(file_contents.find('should be kept') != -1) ++ self.assertTrue(file_contents.find('in the middle...') != -1) ++ self.assertTrue(file_contents.find('at the end...') != -1) + # Check for nested content that was kept +- self.failUnless(file_contents.find('nested true should be kept') != -1) +- self.failUnless(file_contents.find('silbing true should be kept') != -1) ++ self.assertTrue(file_contents.find('nested true should be kept') != -1) ++ self.assertTrue(file_contents.find('silbing true should be kept') != -1) + # Check for removed "" and "" tags. +- self.failUnless(file_contents.find('') == -1) ++ self.assertTrue(file_contents.find('') == -1) + os.remove(output_file) + + def testStructureNodeOutputfile(self): +@@ -250,14 +250,14 @@ END'''.strip() + + output_dir = tempfile.gettempdir() + en_file = struct.FileForLanguage('en', output_dir) +- self.failUnless(en_file == input_file) ++ self.assertTrue(en_file == input_file) + fr_file = struct.FileForLanguage('fr', output_dir) +- self.failUnless(fr_file == os.path.join(output_dir, 'fr_simple.html')) ++ self.assertTrue(fr_file == os.path.join(output_dir, 'fr_simple.html')) + + contents = util.ReadFile(fr_file, 'utf-8') + +- self.failUnless(contents.find('

') != -1) # should contain the markup +- self.failUnless(contents.find('Hello!') == -1) # should be translated ++ self.assertTrue(contents.find('

') != -1) # should contain the markup ++ self.assertTrue(contents.find('Hello!') == -1) # should be translated + os.remove(fr_file) + + def testChromeHtmlNodeOutputfile(self): +@@ -279,7 +279,7 @@ END'''.strip() + buf) + output = util.StripBlankLinesAndComments(buf.getvalue()) + expected = (_PREAMBLE + +- u'HTML_FILE1 BINDATA "HTML_FILE1_chrome_html.html"') ++ 'HTML_FILE1 BINDATA "HTML_FILE1_chrome_html.html"') + # hackety hack to work on win32&lin + output = re.sub(r'"[c-zC-Z]:', '"', output) + self.assertEqual(expected, output) +@@ -287,9 +287,9 @@ END'''.strip() + file_contents = util.ReadFile(output_file, 'utf-8') + + # Check for the content added by the tag. +- self.failUnless(file_contents.find('Hello Include!') != -1) ++ self.assertTrue(file_contents.find('Hello Include!') != -1) + # Check for inserted -webkit-image-set. +- self.failUnless(file_contents.find('content: -webkit-image-set') != -1) ++ self.assertTrue(file_contents.find('content: -webkit-image-set') != -1) + os.remove(output_file) + + def testSubstitutionHtml(self): +@@ -311,12 +311,12 @@ END'''.strip() + output_dir = tempfile.gettempdir() + struct, = root.GetChildrenOfType(structure.StructureNode) + ar_file = struct.FileForLanguage('ar', output_dir) +- self.failUnless(ar_file == os.path.join(output_dir, ++ self.assertTrue(ar_file == os.path.join(output_dir, + 'ar_toolbar_about.html')) + + contents = util.ReadFile(ar_file, 'utf-8') + +- self.failUnless(contents.find('dir="RTL"') != -1) ++ self.assertTrue(contents.find('dir="RTL"') != -1) + os.remove(ar_file) + + def testFallbackToEnglish(self): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/resource_map.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/resource_map.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/resource_map.py +@@ -6,7 +6,6 @@ + resource_map_source files. A resource map is a mapping between resource names + (string) and the internal resource ID.''' + +-from __future__ import print_function + + import os + from functools import partial +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/resource_map_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/format/resource_map_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/format/resource_map_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.format.resource_map''' + +-from __future__ import print_function + + import os + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/admin_template.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/admin_template.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/admin_template.py +@@ -5,7 +5,6 @@ + '''Gatherer for administrative template files. + ''' + +-from __future__ import print_function + + import re + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/admin_template_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/admin_template_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/admin_template_unittest.py +@@ -33,12 +33,12 @@ class AdmGathererUnittest(unittest.TestC + 'gotcha = "bingolabongola "the wise" fingulafongula" \n') + gatherer = admin_template.AdmGatherer(pseudofile) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 2) +- self.failUnless(gatherer.GetCliques()[1].GetMessage().GetRealContent() == ++ self.assertTrue(len(gatherer.GetCliques()) == 2) ++ self.assertTrue(gatherer.GetCliques()[1].GetMessage().GetRealContent() == + 'bingolabongola "the wise" fingulafongula') + + translation = gatherer.Translate('en') +- self.failUnless(translation == gatherer.GetText().strip()) ++ self.assertTrue(translation == gatherer.GetText().strip()) + + def testErrorHandling(self): + pseudofile = StringIO( +@@ -60,10 +60,10 @@ class AdmGathererUnittest(unittest.TestC + ) + + def VerifyCliquesFromAdmFile(self, cliques): +- self.failUnless(len(cliques) > 20) ++ self.assertTrue(len(cliques) > 20) + for clique, expected in zip(cliques, self._TRANSLATABLES_FROM_FILE): + text = clique.GetMessage().GetRealContent() +- self.failUnless(text == expected) ++ self.assertTrue(text == expected) + + def testFromFile(self): + fname = util.PathFromRoot('grit/testdata/GoogleDesktop.adm') +@@ -106,8 +106,8 @@ class AdmGathererUnittest(unittest.TestC + tool.res = grd + tool.Process() + +- self.failUnless(os.path.isfile(dirname.GetPath('de_GoogleDesktop.adm'))) +- self.failUnless(os.path.isfile(dirname.GetPath('de_README.txt'))) ++ self.assertTrue(os.path.isfile(dirname.GetPath('de_GoogleDesktop.adm'))) ++ self.assertTrue(os.path.isfile(dirname.GetPath('de_README.txt'))) + finally: + dirname.CleanUp() + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_html.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/chrome_html.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_html.py +@@ -14,7 +14,6 @@ factors are also removed from existing i + referencing all available images. + """ + +-from __future__ import print_function + + import os + import re +@@ -287,7 +286,7 @@ class ChromeHtml(interface.GathererBase) + """ + + def __init__(self, *args, **kwargs): +- super(ChromeHtml, self).__init__(*args, **kwargs) ++ super().__init__(*args, **kwargs) + self.allow_external_script_ = False + self.flatten_html_ = False + self.preprocess_only_ = False +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_html_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/chrome_html_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_html_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.gather.chrome_html''' + +-from __future__ import print_function + + import os + import re +@@ -65,7 +64,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '1.4x,1.8x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + + +@@ -106,7 +105,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + + +@@ -138,7 +137,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '1.4x,1.8x'}) + html.SetAttributes({'flattenhtml': 'false'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url('test.png') 1x, url('1.4x/test.png') 1.4x, url('1.8x/test.png') 1.8x); +@@ -167,7 +166,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '1.4x,1.8x'}) + html.SetAttributes({'flattenhtml': 'false'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url('sub/test.png') 1x, url('sub/1.4x/test.png') 1.4x, url('sub/1.8x/test.png') 1.8x); +@@ -197,7 +196,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '1.4x,1.8x'}) + html.SetAttributes({'flattenhtml': 'false', 'preprocess': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url('test.png') 1x, url('1.4x/test.png') 1.4x, url('1.8x/test.png') 1.8x); +@@ -224,7 +223,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url("data:image/png;base64,UE5HIERBVEE=") 1x, url("data:image/png;base64,MnggUE5HIERBVEE=") 2x); +@@ -251,7 +250,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url(data:image/png;base64,UE5HIERBVEE=) 1x, url(data:image/png;base64,MnggUE5HIERBVEE=) 2x); +@@ -278,7 +277,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url('data:image/png;base64,UE5HIERBVEE=') 1x, url('data:image/png;base64,MnggUE5HIERBVEE=') 2x); +@@ -315,7 +314,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + + +@@ -352,7 +351,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url(data:image/png;base64,UE5HIERBVEE=) 1x, url(data:image/png;base64,MnggUE5HIERBVEE=) 2x), -webkit-image-set(url(data:image/png;base64,UE5HIERBVEE=) 1x, url(data:image/png;base64,MnggUE5HIERBVEE=) 2x); +@@ -380,7 +379,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url(data:image/png;base64,UE5HIERBVEE=) 1x, url(data:image/png;base64,MnggUE5HIERBVEE=) 2x), +@@ -411,7 +410,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url(data:image/png;base64,UE5HIERBVEE=) 1x, url(data:image/png;base64,MnggUE5HIERBVEE=) 2x), +@@ -440,7 +439,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + .image { + background: -webkit-image-set(url(data:image/png;base64,UE5HIERBVEE=) 1x, url(data:image/png;base64,MnggUE5HIERBVEE=) 2x); +@@ -476,7 +475,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '2x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + + +@@ -530,7 +529,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetDefines({'scale_factors': '1.8x'}) + html.SetAttributes({'flattenhtml': 'true'}) + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + + +@@ -587,7 +586,7 @@ class ChromeHtmlUnittest(unittest.TestCa + html.SetAttributes({'flattenhtml': 'true'}) + html.SetFilenameExpansionFunction(replacer('WHICH', '1')); + html.Parse() +- self.failUnlessEqual(StandardizeHtml(html.GetData('en', 'utf-8')), ++ self.assertEqual(StandardizeHtml(html.GetData('en', 'utf-8')), + StandardizeHtml(''' + + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_scaled_image.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/chrome_scaled_image.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_scaled_image.py +@@ -5,7 +5,6 @@ + '''Gatherer for . + ''' + +-from __future__ import print_function + + import os + import struct +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_scaled_image_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/chrome_scaled_image_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/chrome_scaled_image_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for ChromeScaledImage.''' + +-from __future__ import print_function + + import os + import sys +@@ -63,9 +62,9 @@ def _GetFilesInRc(rcname, tmp_dir, conte + '''Get a set of the files that were actually included in the .rc output. + ''' + data = util.ReadFile(rcname, util.BINARY).decode('utf-16') +- contents = dict((tmp_dir.GetPath(k), v) for k, v in contents.items()) +- return set(contents[os.path.normpath(m.group(1))] +- for m in re.finditer(r'(?m)^\w+\s+BINDATA\s+"([^"]+)"$', data)) ++ contents = {tmp_dir.GetPath(k): v for k, v in contents.items()} ++ return {contents[os.path.normpath(m.group(1))] ++ for m in re.finditer(r'(?m)^\w+\s+BINDATA\s+"([^"]+)"$', data)} + + + def _MakeFallbackAttr(fallback): +@@ -111,7 +110,7 @@ def _RunBuildTest(self, structures, inpu + for pngpath, pngdata in inputs.items(): + normpath = os.path.normpath('in/' + pngpath) + infiles[normpath] = pngdata +- class Options(object): ++ class Options: + pass + + with util.TempDir(infiles, mode='wb') as tmp_dir: +@@ -122,10 +121,10 @@ def _RunBuildTest(self, structures, inpu + options.extra_verbose = False + build.RcBuilder().Run(options, []) + for context, expected_data in expected_outputs.items(): +- self.assertEquals(expected_data, ++ self.assertEqual(expected_data, + _GetFilesInPak(tmp_dir.GetPath('out/%s.pak' % context))) + if not skip_rc: +- self.assertEquals(expected_data, ++ self.assertEqual(expected_data, + _GetFilesInRc(tmp_dir.GetPath('out/%s.rc' % context), + tmp_dir, infiles)) + +@@ -144,8 +143,8 @@ class ChromeScaledImageUnittest(unittest + 'tactile_123_percent/a.png': t123a, + 'default_123_percent/b.png': d123b, + }, +- {'default_123_percent': set([d123a, d123b]), +- 'tactile_123_percent': set([t123a, d123b]), ++ {'default_123_percent': {d123a, d123b}, ++ 'tactile_123_percent': {t123a, d123b}, + }) + + def testNormalFallbackFailure(self): +@@ -170,7 +169,7 @@ class ChromeScaledImageUnittest(unittest + _Structure('IDR_A', 'a.png', inner), + ), + {'default_100_percent/a.png': png}, +- {'tactile_200_percent': set([png_with_csCl])}) ++ {'tactile_200_percent': {png_with_csCl}}) + if inner or (inner is None and outer): + # should fall back to 100% + _RunBuildTest(*args, skip_rc=True) +@@ -200,8 +199,8 @@ class ChromeScaledImageUnittest(unittest + 'tactile_123_percent/a.png': t123a, + 'default_123_percent/b.png': d123b, + }, +- {'default_123_percent': set([d123a, d123b]), +- 'tactile_123_percent': set([t123a]), ++ {'default_123_percent': {d123a, d123b}, ++ 'tactile_123_percent': {t123a}, + }, + layout_fallback=' fallback_to_default_layout="false"') + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/interface.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/interface.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/interface.py +@@ -15,7 +15,7 @@ from grit import clique + from grit import util + + +-class GathererBase(object): ++class GathererBase: + '''Interface for all gatherer implementations. Subclasses must implement + all methods that raise NotImplemented.''' + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/json_loader.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/json_loader.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/json_loader.py +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-from __future__ import print_function + + from grit.gather import interface + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/policy_json_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/policy_json_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/policy_json_unittest.py +@@ -36,8 +36,8 @@ class PolicyJsonUnittest(unittest.TestCa + }""" + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 0) +- self.failUnless(eval(original) == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(len(gatherer.GetCliques()) == 0) ++ self.assertTrue(eval(original) == json.loads(gatherer.Translate('en'))) + + def testGeneralPolicy(self): + original = ( +@@ -65,9 +65,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 4) ++ self.assertTrue(len(gatherer.GetCliques()) == 4) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testEnum(self): + original = ( +@@ -89,9 +89,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testSchema(self): + original = ("{" +@@ -126,9 +126,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 4) ++ self.assertTrue(len(gatherer.GetCliques()) == 4) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testValidationSchema(self): + original = ("{" +@@ -150,9 +150,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testDescriptionSchema(self): + original = ("{" +@@ -174,9 +174,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + # Keeping for backwards compatibility. + def testSubPolicyOldFormat(self): +@@ -199,9 +199,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testSubPolicyNewFormat(self): + original = ( +@@ -222,9 +222,9 @@ class PolicyJsonUnittest(unittest.TestCa + "}") + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testEscapingAndLineBreaks(self): + original = """{ +@@ -266,9 +266,9 @@ with a newline?''', + }""" + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 6) ++ self.assertTrue(len(gatherer.GetCliques()) == 6) + expected = self.GetExpectedOutput(original) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) + + def testPlaceholdersChromium(self): + original = """{ +@@ -285,16 +285,16 @@ with a newline?''', + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.SetDefines({'_chromium': True}) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = json.loads(re.sub('', 'Chromium', original)) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) +- self.failUnless(gatherer.GetCliques()[0].translateable) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(gatherer.GetCliques()[0].translateable) + msg = gatherer.GetCliques()[0].GetMessage() +- self.failUnless(len(msg.GetPlaceholders()) == 1) ++ self.assertTrue(len(msg.GetPlaceholders()) == 1) + ph = msg.GetPlaceholders()[0] +- self.failUnless(ph.GetOriginal() == 'Chromium') +- self.failUnless(ph.GetPresentation() == 'PRODUCT_NAME') +- self.failUnless(ph.GetExample() == 'Google Chrome') ++ self.assertTrue(ph.GetOriginal() == 'Chromium') ++ self.assertTrue(ph.GetPresentation() == 'PRODUCT_NAME') ++ self.assertTrue(ph.GetExample() == 'Google Chrome') + + def testPlaceholdersChrome(self): + original = """{ +@@ -311,33 +311,33 @@ with a newline?''', + gatherer = policy_json.PolicyJson(StringIO(original)) + gatherer.SetDefines({'_google_chrome': True}) + gatherer.Parse() +- self.failUnless(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) + expected = json.loads(re.sub('', 'Google Chrome', original)) +- self.failUnless(expected == json.loads(gatherer.Translate('en'))) +- self.failUnless(gatherer.GetCliques()[0].translateable) ++ self.assertTrue(expected == json.loads(gatherer.Translate('en'))) ++ self.assertTrue(gatherer.GetCliques()[0].translateable) + msg = gatherer.GetCliques()[0].GetMessage() +- self.failUnless(len(msg.GetPlaceholders()) == 1) ++ self.assertTrue(len(msg.GetPlaceholders()) == 1) + ph = msg.GetPlaceholders()[0] +- self.failUnless(ph.GetOriginal() == 'Google Chrome') +- self.failUnless(ph.GetPresentation() == 'PRODUCT_NAME') +- self.failUnless(ph.GetExample() == 'Google Chrome') ++ self.assertTrue(ph.GetOriginal() == 'Google Chrome') ++ self.assertTrue(ph.GetPresentation() == 'PRODUCT_NAME') ++ self.assertTrue(ph.GetExample() == 'Google Chrome') + + def testGetDescription(self): + gatherer = policy_json.PolicyJson({}) + gatherer.SetDefines({'_google_chrome': True}) +- self.assertEquals( ++ self.assertEqual( + gatherer._GetDescription({'name': 'Policy1', 'owners': ['a@b']}, + 'policy', None, 'desc'), + 'Description of the policy named Policy1 [owner(s): a@b]') +- self.assertEquals( ++ self.assertEqual( + gatherer._GetDescription({'name': 'Plcy2', 'owners': ['a@b', 'c@d']}, + 'policy', None, 'caption'), + 'Caption of the policy named Plcy2 [owner(s): a@b,c@d]') +- self.assertEquals( ++ self.assertEqual( + gatherer._GetDescription({'name': 'Plcy3', 'owners': ['a@b']}, + 'policy', None, 'label'), + 'Label of the policy named Plcy3 [owner(s): a@b]') +- self.assertEquals( ++ self.assertEqual( + gatherer._GetDescription({'name': 'Item'}, 'enum_item', + {'name': 'Plcy', 'owners': ['a@b']}, 'caption'), + 'Caption of the option named Item in policy Plcy [owner(s): a@b]') +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/rc.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/rc.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/rc.py +@@ -5,7 +5,6 @@ + '''Support for gathering resources from RC files. + ''' + +-from __future__ import print_function + + import re + +@@ -36,7 +35,7 @@ _ESCAPE_CHARS = { + } + + # How to unescape certain strings +-_UNESCAPE_CHARS = dict([[value, key] for key, value in _ESCAPE_CHARS.items()]) ++_UNESCAPE_CHARS = {value: key for key, value in _ESCAPE_CHARS.items()} + + + +@@ -62,7 +61,7 @@ class Section(regexp.RegexpGatherer): + '''Overrides _RegExpParse to add shortcut group handling. Otherwise + the same. + ''' +- super(Section, self)._RegExpParse(rexp, text_to_parse) ++ super()._RegExpParse(rexp, text_to_parse) + + if not self.is_skeleton and len(self.GetTextualIds()) > 0: + group_name = self.GetTextualIds()[0] +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/rc_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/rc_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/rc_unittest.py +@@ -46,7 +46,7 @@ END + + out = rc.Section(f, 'IDC_KLONKACC') + out.ReadSection() +- self.failUnless(out.GetText() == self.part_we_want) ++ self.assertTrue(out.GetText() == self.part_we_want) + + out = rc.Section(util.PathFromRoot(r'grit/testdata/klonk.rc'), + 'IDC_KLONKACC', +@@ -55,7 +55,7 @@ END + out_text = out.GetText().replace('\t', '') + out_text = out_text.replace(' ', '') + self.part_we_want = self.part_we_want.replace(' ', '') +- self.failUnless(out_text.strip() == self.part_we_want.strip()) ++ self.assertTrue(out_text.strip() == self.part_we_want.strip()) + + + def testDialog(self): +@@ -77,13 +77,13 @@ BEGIN + END + '''), 'IDD_ABOUTBOX') + dlg.Parse() +- self.failUnless(len(dlg.GetTextualIds()) == 7) +- self.failUnless(len(dlg.GetCliques()) == 6) +- self.failUnless(dlg.GetCliques()[1].GetMessage().GetRealContent() == ++ self.assertTrue(len(dlg.GetTextualIds()) == 7) ++ self.assertTrue(len(dlg.GetCliques()) == 6) ++ self.assertTrue(dlg.GetCliques()[1].GetMessage().GetRealContent() == + 'klonk Version "yibbee" 1.0') + + transl = dlg.Translate('en') +- self.failUnless(transl.strip() == dlg.GetText().strip()) ++ self.assertTrue(transl.strip() == dlg.GetText().strip()) + + def testAlternateSkeleton(self): + dlg = rc.Dialog(StringIO('''IDD_ABOUTBOX DIALOGEX 22, 17, 230, 75 +@@ -109,9 +109,9 @@ END + alt_dlg.Parse() + + transl = dlg.Translate('en', skeleton_gatherer=alt_dlg) +- self.failUnless(transl.count('040704') and ++ self.assertTrue(transl.count('040704') and + transl.count('110978')) +- self.failUnless(transl.count('Yipee skippy')) ++ self.assertTrue(transl.count('Yipee skippy')) + + def testMenu(self): + menu = rc.Menu(StringIO('''IDC_KLONK MENU +@@ -134,13 +134,13 @@ BEGIN + END'''), 'IDC_KLONK') + + menu.Parse() +- self.failUnless(len(menu.GetTextualIds()) == 6) +- self.failUnless(len(menu.GetCliques()) == 1) +- self.failUnless(len(menu.GetCliques()[0].GetMessage().GetPlaceholders()) == ++ self.assertTrue(len(menu.GetTextualIds()) == 6) ++ self.assertTrue(len(menu.GetCliques()) == 1) ++ self.assertTrue(len(menu.GetCliques()[0].GetMessage().GetPlaceholders()) == + 9) + + transl = menu.Translate('en') +- self.failUnless(transl.strip() == menu.GetText().strip()) ++ self.assertTrue(transl.strip() == menu.GetText().strip()) + + def testVersion(self): + version = rc.Version(StringIO(''' +@@ -178,11 +178,11 @@ BEGIN + END + '''.strip()), 'VS_VERSION_INFO') + version.Parse() +- self.failUnless(len(version.GetTextualIds()) == 1) +- self.failUnless(len(version.GetCliques()) == 4) ++ self.assertTrue(len(version.GetTextualIds()) == 1) ++ self.assertTrue(len(version.GetCliques()) == 4) + + transl = version.Translate('en') +- self.failUnless(transl.strip() == version.GetText().strip()) ++ self.assertTrue(transl.strip() == version.GetText().strip()) + + + def testRegressionDialogBox(self): +@@ -206,7 +206,7 @@ BEGIN + BS_AUTORADIOBUTTON,57,144,38,10 + END'''.strip()), 'IDD_SIDEBAR_WEATHER_PANEL_PROPPAGE') + dialog.Parse() +- self.failUnless(len(dialog.GetTextualIds()) == 10) ++ self.assertTrue(len(dialog.GetTextualIds()) == 10) + + + def testRegressionDialogBox2(self): +@@ -226,7 +226,7 @@ BEGIN + IDC_STATIC,16,18,234,18 + END'''.strip()), 'IDD_SIDEBAR_EMAIL_PANEL_PROPPAGE') + dialog.Parse() +- self.failUnless('IDC_SIDEBAR_EMAIL_HIDDEN' in dialog.GetTextualIds()) ++ self.assertTrue('IDC_SIDEBAR_EMAIL_HIDDEN' in dialog.GetTextualIds()) + + + def testRegressionMenuId(self): +@@ -239,7 +239,7 @@ BEGIN + END + END'''.strip()), 'IDR_HYPERMENU_FOLDER') + menu.Parse() +- self.failUnless(len(menu.GetTextualIds()) == 2) ++ self.assertTrue(len(menu.GetTextualIds()) == 2) + + def testRegressionNewlines(self): + menu = rc.Menu(StringIO(''' +@@ -253,7 +253,7 @@ END'''.strip()), 'IDR_HYPERMENU_FOLDER') + menu.Parse() + transl = menu.Translate('en') + # Shouldn't find \\n (the \n shouldn't be changed to \\n) +- self.failUnless(transl.find('\\\\n') == -1) ++ self.assertTrue(transl.find('\\\\n') == -1) + + def testRegressionTabs(self): + menu = rc.Menu(StringIO(''' +@@ -267,19 +267,19 @@ END'''.strip()), 'IDR_HYPERMENU_FOLDER') + menu.Parse() + transl = menu.Translate('en') + # Shouldn't find \\t (the \t shouldn't be changed to \\t) +- self.failUnless(transl.find('\\\\t') == -1) ++ self.assertTrue(transl.find('\\\\t') == -1) + + def testEscapeUnescape(self): + original = 'Hello "bingo"\n How\\are\\you\\n?' + escaped = rc.Section.Escape(original) +- self.failUnless(escaped == 'Hello ""bingo""\\n How\\\\are\\\\you\\\\n?') ++ self.assertTrue(escaped == 'Hello ""bingo""\\n How\\\\are\\\\you\\\\n?') + unescaped = rc.Section.UnEscape(escaped) +- self.failUnless(unescaped == original) ++ self.assertTrue(unescaped == original) + + def testRegressionPathsWithSlashN(self): + original = '..\\\\..\\\\trs\\\\res\\\\nav_first.gif' + unescaped = rc.Section.UnEscape(original) +- self.failUnless(unescaped == '..\\..\\trs\\res\\nav_first.gif') ++ self.assertTrue(unescaped == '..\\..\\trs\\res\\nav_first.gif') + + def testRegressionDialogItemsTextOnly(self): + dialog = rc.Dialog(StringIO('''IDD_OPTIONS_SEARCH DIALOGEX 0, 0, 280, 292 +@@ -299,8 +299,8 @@ END'''), 'IDD_OPTIONS_SEARCH') + dialog.Parse() + translateables = [c.GetMessage().GetRealContent() + for c in dialog.GetCliques()] +- self.failUnless('Select search buttons and options' in translateables) +- self.failUnless('Use Google site:' in translateables) ++ self.assertTrue('Select search buttons and options' in translateables) ++ self.assertTrue('Use Google site:' in translateables) + + def testAccelerators(self): + acc = rc.Accelerators(StringIO('''\ +@@ -312,11 +312,11 @@ BEGIN + END + '''), 'IDR_ACCELERATOR1') + acc.Parse() +- self.failUnless(len(acc.GetTextualIds()) == 4) +- self.failUnless(len(acc.GetCliques()) == 0) ++ self.assertTrue(len(acc.GetTextualIds()) == 4) ++ self.assertTrue(len(acc.GetCliques()) == 0) + + transl = acc.Translate('en') +- self.failUnless(transl.strip() == acc.GetText().strip()) ++ self.assertTrue(transl.strip() == acc.GetText().strip()) + + + def testRegressionEmptyString(self): +@@ -339,8 +339,8 @@ END'''), 'IDD_CONFIRM_QUIT_GD_DLG') + dlg.Parse() + + def Check(): +- self.failUnless(transl.count('IDC_ENABLE_GD_AUTOSTART')) +- self.failUnless(transl.count('END')) ++ self.assertTrue(transl.count('IDC_ENABLE_GD_AUTOSTART')) ++ self.assertTrue(transl.count('END')) + + transl = dlg.Translate('de', pseudo_if_not_available=True, + fallback_to_english=True) +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/regexp.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/regexp.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/regexp.py +@@ -5,7 +5,6 @@ + '''A baseclass for simple gatherers based on regular expressions. + ''' + +-from __future__ import print_function + + from grit.gather import skeleton_gatherer + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/skeleton_gatherer.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/skeleton_gatherer.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/skeleton_gatherer.py +@@ -22,7 +22,7 @@ class SkeletonGatherer(interface.Gathere + ''' + + def __init__(self, *args, **kwargs): +- super(SkeletonGatherer, self).__init__(*args, **kwargs) ++ super().__init__(*args, **kwargs) + # List of parts of the document. Translateable parts are + # clique.MessageClique objects, nontranslateable parts are plain strings. + # Translated messages are inserted back into the skeleton using the quoting +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/tr_html.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/tr_html.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/tr_html.py +@@ -214,7 +214,7 @@ def _DebugPrint(text): + print(text.encode('utf-8')) + + +-class HtmlChunks(object): ++class HtmlChunks: + '''A parser that knows how to break an HTML-like document into a list of + chunks, where each chunk is either translateable or non-translateable. + The chunks are unmodified sections of the original document, so concatenating +@@ -603,7 +603,7 @@ class TrHtml(interface.GathererBase): + Total Recall for HTML documents.''' + + def __init__(self, *args, **kwargs): +- super(TrHtml, self).__init__(*args, **kwargs) ++ super().__init__(*args, **kwargs) + self.have_parsed_ = False + self.skeleton_ = [] # list of strings and MessageClique objects + self.fold_whitespace_ = False +@@ -680,7 +680,7 @@ class TrHtml(interface.GathererBase): + text = self._LoadInputFile() + + # Ignore the BOM character if the document starts with one. +- if text.startswith(u'\ufeff'): ++ if text.startswith('\ufeff'): + text = text[1:] + + self.text_ = text +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/tr_html_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/tr_html_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/tr_html_unittest.py +@@ -50,19 +50,19 @@ class ParserUnittest(unittest.TestCase): + p = tr_html.HtmlChunks() + chunks = p.Parse('

Hello dear how areyou?

Fine!', + fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (False, '

', ''), (True, 'Hello dear how areyou?', ''), + (False, '

', ''), (True, 'Fine!', '')]) + + chunks = p.Parse('

Hello dear how areyou?

Fine!', + fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (False, '

', ''), (True, 'Hello dear how areyou?', ''), + (False, '

', ''), (True, 'Fine!', '')]) + + chunks = p.Parse('

Hello dear how are you?

Fine!', + fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (False, '

', ''), (True, 'Hello dear how are you?', ''), + (False, '

', ''), (True, 'Fine!', '')]) + +@@ -70,7 +70,7 @@ class ParserUnittest(unittest.TestCase): + # the starting inline tag. + chunks = p.Parse('Hello! how are you?

I am fine.', + fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! how are you?', ''), (False, '

', ''), + (True, 'I am fine.', '')]) + +@@ -78,7 +78,7 @@ class ParserUnittest(unittest.TestCase): + # the ending inline tag. + chunks = p.Parse("Hello! How are you?

I'm fine!", + fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! How are you?', ''), (False, '

', ''), + (True, "I'm fine!", '')]) + +@@ -87,18 +87,18 @@ class ParserUnittest(unittest.TestCase): + # Check capitals and explicit descriptions + chunks = p.Parse('Hello! how are you?

' + 'I am fine.', fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! how are you?', 'bingo!'), (False, '

', ''), + (True, 'I am fine.', '')]) + chunks = p.Parse('Hello! how are you?

' + 'I am fine.', fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! how are you?', 'bingo!'), (False, '

', ''), + (True, 'I am fine.', '')]) + # Linebreaks get handled by the tclib message. + chunks = p.Parse('Hello! how are you?

' + 'I am fine.', fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! how are you?', 'bi\nngo\n!'), (False, '

', ''), + (True, 'I am fine.', '')]) + +@@ -106,7 +106,7 @@ class ParserUnittest(unittest.TestCase): + # translateable, it will actually apply to the second translateable. + chunks = p.Parse('Hello! how are you?

' + 'I am fine.', fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! how are you?', ''), (False, '

', ''), + (True, 'I am fine.', 'bingo!')]) + +@@ -116,7 +116,7 @@ class ParserUnittest(unittest.TestCase): + p = tr_html.HtmlChunks() + chunks = p.Parse('Hello! how are you?

' + 'I am fine.', fold_whitespace) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (True, 'Hello! how are you?', ''), + (False, '

', ''), + (True, 'I am fine.', '')]) +@@ -126,12 +126,12 @@ class ParserUnittest(unittest.TestCase): + p = tr_html.HtmlChunks() + chunks = p.Parse('', + fold_whitespace) +- self.failUnlessEqual(chunks, [(False, '', '')]) + + # ...and that other tags' line breaks are converted to spaces + chunks = p.Parse('

Hello\nthere\nhow\nare\nyou?

', fold_whitespace) +- self.failUnlessEqual(chunks, [(False, '

', ''), ++ self.assertEqual(chunks, [(False, '

', ''), + (True, 'Hello there how are you?', ''), (False, '

', '')]) + + def VerifyChunkingMessageBreak(self, fold_whitespace): +@@ -139,7 +139,7 @@ class ParserUnittest(unittest.TestCase): + # Make sure that message-break comments work properly. + chunks = p.Parse('Break apart ' + 'messages', fold_whitespace) +- self.failUnlessEqual(chunks, [(True, 'Break', ''), ++ self.assertEqual(chunks, [(True, 'Break', ''), + (False, ' ', ''), + (True, 'apart', ''), + (False, ' ', ''), +@@ -148,7 +148,7 @@ class ParserUnittest(unittest.TestCase): + # Make sure message-break comments work in an inline tag. + chunks = p.Parse('Google' + '', fold_whitespace) +- self.failUnlessEqual(chunks, [(False, '', ''), ++ self.assertEqual(chunks, [(False, '', ''), + (True, 'Google', ''), + (False, '', '')]) + +@@ -157,12 +157,12 @@ class ParserUnittest(unittest.TestCase): + # Make sure that message-no-break comments work properly. + chunks = p.Parse('Please
don\'t break', + fold_whitespace) +- self.failUnlessEqual(chunks, [(True, 'Please ' ++ self.assertEqual(chunks, [(True, 'Please ' + '
don\'t break', '')]) + + chunks = p.Parse('Please
break.
' + 'But not this time.', fold_whitespace) +- self.failUnlessEqual(chunks, [(True, 'Please', ''), ++ self.assertEqual(chunks, [(True, 'Please', ''), + (False, '
', ''), + (True, 'break. ' + '
But not this time.', '')]) +@@ -176,7 +176,7 @@ class ParserUnittest(unittest.TestCase): + '' + '' + '', False) +- self.failUnlessEqual(chunks, [ ++ self.assertEqual(chunks, [ + (False, '', ''), (True, 'hello there', ''),
+       (False, 'Go!')) + html.Parse() + msg = html.GetCliques()[1].GetMessage() +- self.failUnlessEqual(msg.GetDescription(), 'explicit') +- self.failUnlessEqual(msg.GetRealContent(), 'Go!') ++ self.assertEqual(msg.GetDescription(), 'explicit') ++ self.assertEqual(msg.GetRealContent(), 'Go!') + + html = tr_html.TrHtml( + StringIO('Hello [USER]
' + 'Go!')) + html.Parse() + msg = html.GetCliques()[1].GetMessage() +- self.failUnlessEqual(msg.GetDescription(), 'explicit multiline') +- self.failUnlessEqual(msg.GetRealContent(), 'Go!') ++ self.assertEqual(msg.GetDescription(), 'explicit multiline') ++ self.assertEqual(msg.GetRealContent(), 'Go!') + + + def testRegressionInToolbarAbout(self): +@@ -359,7 +359,7 @@ bla + for cl in cliques: + content = cl.GetMessage().GetRealContent() + if content.count('De parvis grandis acervus erit'): +- self.failIf(content.count('$/translate')) ++ self.assertFalse(content.count('$/translate')) + + + def HtmlFromFileWithManualCheck(self, f): +@@ -381,10 +381,10 @@ bla + html = self.HtmlFromFileWithManualCheck( + util.PathFromRoot(r'grit/testdata/privacy.html')) + +- self.failUnless(html.skeleton_[1].GetMessage().GetRealContent() == ++ self.assertTrue(html.skeleton_[1].GetMessage().GetRealContent() == + 'Privacy and Google Desktop Search') +- self.failUnless(html.skeleton_[3].startswith('<')) +- self.failUnless(len(html.skeleton_) > 10) ++ self.assertTrue(html.skeleton_[3].startswith('<')) ++ self.assertTrue(len(html.skeleton_) > 10) + + + def testPreferencesHtml(self): +@@ -401,7 +401,7 @@ bla + item.GetMessage().GetRealContent() == '[ADDIN-DO] [ADDIN-OPTIONS]'): + self.fail() + +- self.failUnless(len(html.skeleton_) > 100) ++ self.assertTrue(len(html.skeleton_) > 100) + + def AssertNumberOfTranslateables(self, files, num): + '''Fails if any of the files in files don't have exactly +@@ -414,7 +414,7 @@ bla + for f in files: + f = util.PathFromRoot(r'grit/testdata/%s' % f) + html = self.HtmlFromFileWithManualCheck(f) +- self.failUnless(len(html.GetCliques()) == num) ++ self.assertTrue(len(html.GetCliques()) == num) + + def testFewTranslateables(self): + self.AssertNumberOfTranslateables(['browser.html', 'email_thread.html', +@@ -481,29 +481,29 @@ bla + msg = tr_html.HtmlToMessage( + 'Hello

Howdiebingo', True) + result = msg.GetPresentableContent() +- self.failUnless( ++ self.assertTrue( + result == 'HelloBEGIN_PARAGRAPHHowdieBEGIN_BLOCKbingoEND_BLOCK') + + msg = tr_html.HtmlToMessage( + 'Hello

Howdie', True) + result = msg.GetPresentableContent() +- self.failUnless( ++ self.assertTrue( + result == 'HelloBEGIN_PARAGRAPHHowdieBEGIN_BLOCKbingoEND_BLOCK') + + + def testHtmlToMessageRegressions(self): + msg = tr_html.HtmlToMessage(' - ', True) + result = msg.GetPresentableContent() +- self.failUnless(result == ' - ') ++ self.assertTrue(result == ' - ') + + + def testEscapeUnescaped(self): + text = '©  & "<hello>"' + unescaped = util.UnescapeHtml(text) +- self.failUnless(unescaped == u'\u00a9\u00a0 & ""') ++ self.assertTrue(unescaped == '\u00a9\u00a0 & ""') + escaped_unescaped = util.EscapeHtml(unescaped, True) +- self.failUnless(escaped_unescaped == +- u'\u00a9\u00a0 & "<hello>"') ++ self.assertTrue(escaped_unescaped == ++ '\u00a9\u00a0 & "<hello>"') + + def testRegressionCjkHtmlFile(self): + # TODO(joi) Fix this problem where unquoted attributes that +@@ -512,7 +512,7 @@ bla + if False: + html = self.HtmlFromFileWithManualCheck(util.PathFromRoot( + r'grit/testdata/ko_oem_enable_bug.html')) +- self.failUnless(True) ++ self.assertTrue(True) + + def testRegressionCpuHang(self): + # If this regression occurs, the unit test will never return +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/txt.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/txt.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/txt.py +@@ -5,7 +5,6 @@ + '''Supports making amessage from a text file. + ''' + +-from __future__ import print_function + + from grit.gather import interface + from grit import tclib +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/txt_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/gather/txt_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/gather/txt_unittest.py +@@ -25,9 +25,9 @@ class TxtUnittest(unittest.TestCase): + input = StringIO('Hello there\nHow are you?') + gatherer = txt.TxtFile(input) + gatherer.Parse() +- self.failUnless(gatherer.GetText() == input.getvalue()) +- self.failUnless(len(gatherer.GetCliques()) == 1) +- self.failUnless(gatherer.GetCliques()[0].GetMessage().GetRealContent() == ++ self.assertTrue(gatherer.GetText() == input.getvalue()) ++ self.assertTrue(len(gatherer.GetCliques()) == 1) ++ self.assertTrue(gatherer.GetCliques()[0].GetMessage().GetRealContent() == + input.getvalue()) + + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grd_reader.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/grd_reader.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grd_reader.py +@@ -6,7 +6,6 @@ + '''Class for reading GRD files into memory, without processing them. + ''' + +-from __future__ import print_function + + import os.path + import sys +@@ -188,7 +187,7 @@ def Parse(filename_or_stream, dir=None, + grit.exception.Parsing + ''' + +- if isinstance(filename_or_stream, six.string_types): ++ if isinstance(filename_or_stream, str): + source = filename_or_stream + if dir is None: + dir = util.dirname(filename_or_stream) +@@ -235,4 +234,4 @@ def Parse(filename_or_stream, dir=None, + + if __name__ == '__main__': + util.ChangeStdoutEncoding() +- print(six.text_type(Parse(sys.argv[1]))) ++ print(str(Parse(sys.argv[1]))) +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grd_reader_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/grd_reader_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grd_reader_unittest.py +@@ -26,7 +26,7 @@ from grit.node import message + + class GrdReaderUnittest(unittest.TestCase): + def testParsingAndXmlOutput(self): +- input = u''' ++ input = ''' + + + +@@ -59,7 +59,7 @@ class GrdReaderUnittest(unittest.TestCas + output = six.text_type(tree) + expected_output = input.replace(u' base_dir="."', u'') + self.assertEqual(expected_output, output) +- self.failUnless(tree.GetNodeById('IDS_GREETING')) ++ self.assertTrue(tree.GetNodeById('IDS_GREETING')) + + + def testStopAfter(self): +@@ -78,11 +78,11 @@ class GrdReaderUnittest(unittest.TestCas + pseudo_file = StringIO(input) + tree = grd_reader.Parse(pseudo_file, '.', stop_after='outputs') + # only an child +- self.failUnless(len(tree.children) == 1) +- self.failUnless(tree.children[0].name == 'outputs') ++ self.assertTrue(len(tree.children) == 1) ++ self.assertTrue(tree.children[0].name == 'outputs') + + def testLongLinesWithComments(self): +- input = u''' ++ input = ''' + + + +@@ -98,12 +98,12 @@ class GrdReaderUnittest(unittest.TestCas + tree = grd_reader.Parse(pseudo_file, '.') + + greeting = tree.GetNodeById('IDS_GREETING') +- self.failUnless(greeting.GetCliques()[0].GetMessage().GetRealContent() == ++ self.assertTrue(greeting.GetCliques()[0].GetMessage().GetRealContent() == + 'This is a very long line with no linebreaks yes yes it ' + 'stretches on and on and on!') + + def doTestAssignFirstIds(self, first_ids_path): +- input = u''' ++ input = ''' + + +@@ -122,8 +122,8 @@ class GrdReaderUnittest(unittest.TestCas + root = grd_reader.Parse(pseudo_file, os.path.split(fake_input_path)[0]) + root.AssignFirstIds(fake_input_path, {}) + messages_node = root.children[0].children[0] +- self.failUnless(isinstance(messages_node, empty.MessagesNode)) +- self.failUnless(messages_node.attrs["first_id"] != ++ self.assertTrue(isinstance(messages_node, empty.MessagesNode)) ++ self.assertTrue(messages_node.attrs["first_id"] != + empty.MessagesNode().DefaultAttributes()["first_id"]) + + def testAssignFirstIds(self): +@@ -135,7 +135,7 @@ class GrdReaderUnittest(unittest.TestCas + def testAssignFirstIdsMultipleMessages(self): + """If there are multiple messages sections, the resource_ids file + needs to list multiple first_id values.""" +- input = u''' ++ input = ''' + + +@@ -166,7 +166,7 @@ class GrdReaderUnittest(unittest.TestCas + self.assertEqual('10000', messages_node.attrs["first_id"]) + + def testUseNameForIdAndPpIfdef(self): +- input = u''' ++ input = ''' + + + +@@ -184,10 +184,10 @@ class GrdReaderUnittest(unittest.TestCas + # Check if the ID is set to the name. In the past, there was a bug + # that caused the ID to be a generated number. + hello = root.GetNodeById('IDS_HELLO') +- self.failUnless(hello.GetCliques()[0].GetId() == 'IDS_HELLO') ++ self.assertTrue(hello.GetCliques()[0].GetId() == 'IDS_HELLO') + + def testUseNameForIdWithIfElse(self): +- input = u''' ++ input = ''' + + + +@@ -212,16 +212,16 @@ class GrdReaderUnittest(unittest.TestCas + # Check if the ID is set to the name. In the past, there was a bug + # that caused the ID to be a generated number. + hello = root.GetNodeById('IDS_HELLO') +- self.failUnless(hello.GetCliques()[0].GetId() == 'IDS_HELLO') ++ self.assertTrue(hello.GetCliques()[0].GetId() == 'IDS_HELLO') + + def testPartInclusionAndCorrectSource(self): +- arbitrary_path_grd = u'''\ ++ arbitrary_path_grd = '''\ + + test5 + ''' + tmp_dir = util.TempDir({'arbitrary_path.grp': arbitrary_path_grd}) + arbitrary_path_grd_file = tmp_dir.GetPath('arbitrary_path.grp') +- top_grd = u'''\ ++ top_grd = '''\ + + + +@@ -233,17 +233,17 @@ class GrdReaderUnittest(unittest.TestCas + + + ''' % arbitrary_path_grd_file +- sub_grd = u'''\ ++ sub_grd = '''\ + + test2 + + test3 + ''' +- subsub_grd = u'''\ ++ subsub_grd = '''\ + + test4 + ''' +- expected_output = u'''\ ++ expected_output = '''\ + + + +@@ -292,7 +292,7 @@ class GrdReaderUnittest(unittest.TestCas + tmp_dir.CleanUp() + + def testPartInclusionFailure(self): +- template = u''' ++ template = ''' + + + %s +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grit_runner.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/grit_runner.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grit_runner.py +@@ -7,7 +7,6 @@ + GRIT tools. + """ + +-from __future__ import print_function + + import os + import sys +@@ -196,7 +195,7 @@ Tools: + """ % (tool_list)) + + +-class Options(object): ++class Options: + """Option storage and parsing.""" + + def __init__(self): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grit_runner_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/grit_runner_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/grit_runner_unittest.py +@@ -33,9 +33,9 @@ class OptionArgsUnittest(unittest.TestCa + util.PathFromRoot('grit/testdata/simple-input.xml'), + 'test', 'bla', 'voff', 'ga']) + output = self.buf.getvalue() +- self.failUnless(output.count("'test'") == 0) # tool name doesn't occur +- self.failUnless(output.count('bla')) +- self.failUnless(output.count('simple-input.xml')) ++ self.assertTrue(output.count("'test'") == 0) # tool name doesn't occur ++ self.assertTrue(output.count('bla')) ++ self.assertTrue(output.count('simple-input.xml')) + + + if __name__ == '__main__': +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/lazy_re.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/lazy_re.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/lazy_re.py +@@ -8,12 +8,11 @@ them on demand the first time they are u + time in some cases. + ''' + +-from __future__ import print_function + + import re + + +-class LazyRegexObject(object): ++class LazyRegexObject: + '''This object creates a RegexObject with the arguments passed in + its constructor, the first time any attribute except the several on + the class itself is accessed. This accomplishes lazy compilation of +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/lazy_re_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/lazy_re_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/lazy_re_unittest.py +@@ -6,7 +6,6 @@ + '''Unit test for lazy_re. + ''' + +-from __future__ import print_function + + import os + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/base.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/base.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/base.py +@@ -23,7 +23,7 @@ from grit.node import brotli_util + import grit.format.gzip_string + + +-class Node(object): ++class Node: + '''An item in the tree that has children.''' + + # Valid content types that can be returned by _ContentType() +@@ -53,7 +53,7 @@ class Node(object): + self.mixed_content = [] # A list of u'' and/or child elements (this + # duplicates 'children' but + # is needed to preserve markup-type content). +- self.name = u'' # The name of this element ++ self.name = '' # The name of this element + self.attrs = {} # The set of attributes (keys to values) + self.parent = None # Our parent unless we are the root element. + self.uberclique = None # Allows overriding uberclique for parts of tree +@@ -78,8 +78,7 @@ class Node(object): + any child nodes.''' + yield self + for child in self.children: +- for iterchild in child.Preorder(): +- yield iterchild ++ yield from child.Preorder() + + def ActiveChildren(self): + '''Returns the children of this node that should be included in the current +@@ -91,8 +90,7 @@ class Node(object): + the current configuration, in preorder.''' + yield self + for child in self.ActiveChildren(): +- for descendant in child.ActiveDescendants(): +- yield descendant ++ yield from child.ActiveDescendants() + + def GetRoot(self): + '''Returns the root Node in the tree this Node belongs to.''' +@@ -265,13 +263,13 @@ class Node(object): + def __str__(self): + '''Returns this node and all nodes below it as an XML document in a Unicode + string.''' +- header = u'\n' ++ header = '\n' + return header + self.FormatXml() + + # Some Python 2 glue. + __unicode__ = __str__ + +- def FormatXml(self, indent = u'', one_line = False): ++ def FormatXml(self, indent = '', one_line = False): + '''Returns this node and all nodes below it as an XML + element in a Unicode string. This differs from __unicode__ in that it does + not include the stuff at the top of the string. If one_line is true, +@@ -285,30 +283,30 @@ class Node(object): + inside_content = self.ContentsAsXml(indent, content_one_line) + + # Then the attributes for this node. +- attribs = u'' ++ attribs = '' + default_attribs = self.DefaultAttributes() + for attrib, value in sorted(self.attrs.items()): + # Only print an attribute if it is other than the default value. + if attrib not in default_attribs or value != default_attribs[attrib]: +- attribs += u' %s=%s' % (attrib, saxutils.quoteattr(value)) ++ attribs += ' %s=%s' % (attrib, saxutils.quoteattr(value)) + + # Finally build the XML for our node and return it + if len(inside_content) > 0: + if one_line: +- return u'<%s%s>%s' % (self.name, attribs, inside_content, ++ return '<%s%s>%s' % (self.name, attribs, inside_content, + self.name) + elif content_one_line: +- return u'%s<%s%s>\n%s %s\n%s' % ( ++ return '%s<%s%s>\n%s %s\n%s' % ( + indent, self.name, attribs, + indent, inside_content, + indent, self.name) + else: +- return u'%s<%s%s>\n%s\n%s' % ( ++ return '%s<%s%s>\n%s\n%s' % ( + indent, self.name, attribs, + inside_content, + indent, self.name) + else: +- return u'%s<%s%s />' % (indent, self.name, attribs) ++ return '%s<%s%s />' % (indent, self.name, attribs) + + def ContentsAsXml(self, indent, one_line): + '''Returns the contents of this node (CDATA and child elements) in XML +@@ -320,15 +318,15 @@ class Node(object): + last_item = None + for mixed_item in self.mixed_content: + if isinstance(mixed_item, Node): +- inside_parts.append(mixed_item.FormatXml(indent + u' ', one_line)) ++ inside_parts.append(mixed_item.FormatXml(indent + ' ', one_line)) + if not one_line: +- inside_parts.append(u'\n') ++ inside_parts.append('\n') + else: + message = mixed_item + # If this is the first item and it starts with whitespace, we add + # the ''' delimiter. + if not last_item and message.lstrip() != message: +- message = u"'''" + message ++ message = "'''" + message + inside_parts.append(util.EncodeCdata(message)) + last_item = mixed_item + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/base_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/base_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/base_unittest.py +@@ -24,9 +24,9 @@ from grit.node import message + + def MakePlaceholder(phname='BINGO'): + ph = message.PhNode() +- ph.StartParsing(u'ph', None) +- ph.HandleAttribute(u'name', phname) +- ph.AppendContent(u'bongo') ++ ph.StartParsing('ph', None) ++ ph.HandleAttribute('name', phname) ++ ph.AppendContent('bongo') + ph.EndParsing() + return ph + +@@ -35,49 +35,49 @@ class NodeUnittest(unittest.TestCase): + def testWhitespaceHandling(self): + # We test using the Message node type. + node = message.MessageNode() +- node.StartParsing(u'hello', None) +- node.HandleAttribute(u'name', u'bla') +- node.AppendContent(u" ''' two spaces ") ++ node.StartParsing('hello', None) ++ node.HandleAttribute('name', 'bla') ++ node.AppendContent(" ''' two spaces ") + node.EndParsing() +- self.failUnless(node.GetCdata() == u' two spaces') ++ self.assertTrue(node.GetCdata() == ' two spaces') + + node = message.MessageNode() +- node.StartParsing(u'message', None) +- node.HandleAttribute(u'name', u'bla') +- node.AppendContent(u" two spaces ''' ") ++ node.StartParsing('message', None) ++ node.HandleAttribute('name', 'bla') ++ node.AppendContent(" two spaces ''' ") + node.EndParsing() +- self.failUnless(node.GetCdata() == u'two spaces ') ++ self.assertTrue(node.GetCdata() == 'two spaces ') + + def testWhitespaceHandlingWithChildren(self): + # We test using the Message node type. + node = message.MessageNode() +- node.StartParsing(u'message', None) +- node.HandleAttribute(u'name', u'bla') +- node.AppendContent(u" ''' two spaces ") ++ node.StartParsing('message', None) ++ node.HandleAttribute('name', 'bla') ++ node.AppendContent(" ''' two spaces ") + node.AddChild(MakePlaceholder()) +- node.AppendContent(u' space before and after ') ++ node.AppendContent(' space before and after ') + node.AddChild(MakePlaceholder('BONGO')) +- node.AppendContent(u" space before two after '''") ++ node.AppendContent(" space before two after '''") + node.EndParsing() +- self.failUnless(node.mixed_content[0] == u' two spaces ') +- self.failUnless(node.mixed_content[2] == u' space before and after ') +- self.failUnless(node.mixed_content[-1] == u' space before two after ') ++ self.assertTrue(node.mixed_content[0] == ' two spaces ') ++ self.assertTrue(node.mixed_content[2] == ' space before and after ') ++ self.assertTrue(node.mixed_content[-1] == ' space before two after ') + + def testXmlFormatMixedContent(self): + # Again test using the Message node type, because it is the only mixed + # content node. + node = message.MessageNode() +- node.StartParsing(u'message', None) +- node.HandleAttribute(u'name', u'name') +- node.AppendContent(u'Hello ') ++ node.StartParsing('message', None) ++ node.HandleAttribute('name', 'name') ++ node.AppendContent('Hello ') + + ph = message.PhNode() +- ph.StartParsing(u'ph', None) +- ph.HandleAttribute(u'name', u'USERNAME') +- ph.AppendContent(u'$1') ++ ph.StartParsing('ph', None) ++ ph.HandleAttribute('name', 'USERNAME') ++ ph.AppendContent('$1') + ex = message.ExNode() +- ex.StartParsing(u'ex', None) +- ex.AppendContent(u'Joi') ++ ex.StartParsing('ex', None) ++ ex.AppendContent('Joi') + ex.EndParsing() + ph.AddChild(ex) + ph.EndParsing() +@@ -86,51 +86,51 @@ class NodeUnittest(unittest.TestCase): + node.EndParsing() + + non_indented_xml = node.FormatXml() +- self.failUnless(non_indented_xml == u'\n Hello ' +- u'<young> $1Joi' +- u'\n') +- +- indented_xml = node.FormatXml(u' ') +- self.failUnless(indented_xml == u' \n Hello ' +- u'<young> $1Joi' +- u'\n ') ++ self.assertTrue(non_indented_xml == '\n Hello ' ++ '<young> $1Joi' ++ '\n') ++ ++ indented_xml = node.FormatXml(' ') ++ self.assertTrue(indented_xml == ' \n Hello ' ++ '<young> $1Joi' ++ '\n ') + + def testXmlFormatMixedContentWithLeadingWhitespace(self): + # Again test using the Message node type, because it is the only mixed + # content node. + node = message.MessageNode() +- node.StartParsing(u'message', None) +- node.HandleAttribute(u'name', u'name') +- node.AppendContent(u"''' Hello ") ++ node.StartParsing('message', None) ++ node.HandleAttribute('name', 'name') ++ node.AppendContent("''' Hello ") + + ph = message.PhNode() +- ph.StartParsing(u'ph', None) +- ph.HandleAttribute(u'name', u'USERNAME') +- ph.AppendContent(u'$1') ++ ph.StartParsing('ph', None) ++ ph.HandleAttribute('name', 'USERNAME') ++ ph.AppendContent('$1') + ex = message.ExNode() +- ex.StartParsing(u'ex', None) +- ex.AppendContent(u'Joi') ++ ex.StartParsing('ex', None) ++ ex.AppendContent('Joi') + ex.EndParsing() + ph.AddChild(ex) + ph.EndParsing() + + node.AddChild(ph) +- node.AppendContent(u" yessiree '''") ++ node.AppendContent(" yessiree '''") + node.EndParsing() + + non_indented_xml = node.FormatXml() +- self.failUnless(non_indented_xml == +- u"\n ''' Hello" +- u' <young> $1Joi' +- u" yessiree '''\n") +- +- indented_xml = node.FormatXml(u' ') +- self.failUnless(indented_xml == +- u" \n ''' Hello" +- u' <young> $1Joi' +- u" yessiree '''\n ") ++ self.assertTrue(non_indented_xml == ++ "\n ''' Hello" ++ ' <young> $1Joi' ++ " yessiree '''\n") ++ ++ indented_xml = node.FormatXml(' ') ++ self.assertTrue(indented_xml == ++ " \n ''' Hello" ++ ' <young> $1Joi' ++ " yessiree '''\n ") + +- self.failUnless(node.GetNodeById('name')) ++ self.assertTrue(node.GetNodeById('name')) + + def testXmlFormatContentWithEntities(self): + '''Tests a bug where   would not be escaped correctly.''' +@@ -143,7 +143,7 @@ class NodeUnittest(unittest.TestCase): + tclib.Placeholder('END_BOLD', '', 'bla')]), + 'BINGOBONGO') + xml = msg_node.FormatXml() +- self.failUnless(xml.find(' ') == -1, 'should have no entities') ++ self.assertTrue(xml.find(' ') == -1, 'should have no entities') + + def testIter(self): + # First build a little tree of message and ph nodes. +@@ -163,9 +163,9 @@ class NodeUnittest(unittest.TestCase): + + order = [message.MessageNode, message.PhNode, message.ExNode, message.PhNode] + for n in node: +- self.failUnless(type(n) == order[0]) ++ self.assertTrue(type(n) == order[0]) + order = order[1:] +- self.failUnless(len(order) == 0) ++ self.assertTrue(len(order) == 0) + + def testGetChildrenOfType(self): + xml = ''' +@@ -190,14 +190,14 @@ class NodeUnittest(unittest.TestCase): + util.PathFromRoot('grit/test/data')) + from grit.node import node_io + output_nodes = grd.GetChildrenOfType(node_io.OutputNode) +- self.failUnlessEqual(len(output_nodes), 3) +- self.failUnlessEqual(output_nodes[2].attrs['filename'], ++ self.assertEqual(len(output_nodes), 3) ++ self.assertEqual(output_nodes[2].attrs['filename'], + 'de/generated_resources.rc') + + def testEvaluateExpression(self): + def AssertExpr(expected_value, expr, defs, target_platform, + extra_variables): +- self.failUnlessEqual(expected_value, base.Node.EvaluateExpression( ++ self.assertEqual(expected_value, base.Node.EvaluateExpression( + expr, defs, target_platform, extra_variables)) + + AssertExpr(True, "True", {}, 'linux', {}) +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/custom/filename.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/custom/filename.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/custom/filename.py +@@ -4,7 +4,6 @@ + + '''A CustomType for filenames.''' + +-from __future__ import print_function + + from grit import clique + from grit import lazy_re +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/custom/filename_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/custom/filename_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/custom/filename_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.node.custom.filename''' + +-from __future__ import print_function + + import os + import sys +@@ -27,7 +26,7 @@ class WindowsFilenameUnittest(unittest.T + c.SetCustomType(filename.WindowsFilename()) + translation = tclib.Translation(id=msg.GetId(), text='Bilingo bolongo:') + c.AddTranslation(translation, 'fr') +- self.failUnless(c.MessageForLanguage('fr').GetRealContent() == 'Bilingo bolongo ') ++ self.assertTrue(c.MessageForLanguage('fr').GetRealContent() == 'Bilingo bolongo ') + + + if __name__ == '__main__': +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/empty.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/empty.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/empty.py +@@ -5,7 +5,6 @@ + '''Container nodes that don't have any logic. + ''' + +-from __future__ import print_function + + from grit.node import base + from grit.node import include +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/include.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/include.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/include.py +@@ -5,7 +5,6 @@ + """Handling of the element. + """ + +-from __future__ import print_function + + import os + +@@ -19,7 +18,7 @@ class IncludeNode(base.Node): + """An element.""" + + def __init__(self): +- super(IncludeNode, self).__init__() ++ super().__init__() + + # Cache flattened data so that we don't flatten the same file + # multiple times. +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/include_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/include_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/include_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for include.IncludeNode''' + +-from __future__ import print_function + + import os + import sys +@@ -41,20 +40,20 @@ def checkIsGzipped(filename, compress_at + class IncludeNodeUnittest(unittest.TestCase): + def testGetPath(self): + root = misc.GritNode() +- root.StartParsing(u'grit', None) +- root.HandleAttribute(u'latest_public_release', u'0') +- root.HandleAttribute(u'current_release', u'1') +- root.HandleAttribute(u'base_dir', r'..\resource') ++ root.StartParsing('grit', None) ++ root.HandleAttribute('latest_public_release', '0') ++ root.HandleAttribute('current_release', '1') ++ root.HandleAttribute('base_dir', r'..\resource') + release = misc.ReleaseNode() +- release.StartParsing(u'release', root) +- release.HandleAttribute(u'seq', u'1') ++ release.StartParsing('release', root) ++ release.HandleAttribute('seq', '1') + root.AddChild(release) + includes = empty.IncludesNode() +- includes.StartParsing(u'includes', release) ++ includes.StartParsing('includes', release) + release.AddChild(includes) + include_node = include.IncludeNode() +- include_node.StartParsing(u'include', includes) +- include_node.HandleAttribute(u'file', r'flugel\kugel.pdf') ++ include_node.StartParsing('include', includes) ++ include_node.HandleAttribute('file', r'flugel\kugel.pdf') + includes.AddChild(include_node) + root.EndParsing() + +@@ -64,27 +63,27 @@ class IncludeNodeUnittest(unittest.TestC + + def testGetPathNoBasedir(self): + root = misc.GritNode() +- root.StartParsing(u'grit', None) +- root.HandleAttribute(u'latest_public_release', u'0') +- root.HandleAttribute(u'current_release', u'1') +- root.HandleAttribute(u'base_dir', r'..\resource') ++ root.StartParsing('grit', None) ++ root.HandleAttribute('latest_public_release', '0') ++ root.HandleAttribute('current_release', '1') ++ root.HandleAttribute('base_dir', r'..\resource') + release = misc.ReleaseNode() +- release.StartParsing(u'release', root) +- release.HandleAttribute(u'seq', u'1') ++ release.StartParsing('release', root) ++ release.HandleAttribute('seq', '1') + root.AddChild(release) + includes = empty.IncludesNode() +- includes.StartParsing(u'includes', release) ++ includes.StartParsing('includes', release) + release.AddChild(includes) + include_node = include.IncludeNode() +- include_node.StartParsing(u'include', includes) +- include_node.HandleAttribute(u'file', r'flugel\kugel.pdf') +- include_node.HandleAttribute(u'use_base_dir', u'false') ++ include_node.StartParsing('include', includes) ++ include_node.HandleAttribute('file', r'flugel\kugel.pdf') ++ include_node.HandleAttribute('use_base_dir', 'false') + includes.AddChild(include_node) + root.EndParsing() + + last_dir = os.path.basename(os.getcwd()) + expected_path = util.normpath(os.path.join( +- u'..', last_dir, u'flugel/kugel.pdf')) ++ '..', last_dir, 'flugel/kugel.pdf')) + self.assertEqual(root.ToRealPath(include_node.GetInputPath()), + expected_path) + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/mapping.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/mapping.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/mapping.py +@@ -6,7 +6,6 @@ + When adding a new node type, you add to this mapping. + ''' + +-from __future__ import print_function + + from grit import exception + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/message.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/message.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/message.py +@@ -22,7 +22,7 @@ from grit import util + + # Matches exactly three dots ending a line or followed by whitespace. + _ELLIPSIS_PATTERN = lazy_re.compile(r'(?\s*)(?P.+?)(?P\s*)\Z', +@@ -62,7 +62,7 @@ class MessageNode(base.ContentNode): + _SPLIT_RE = lazy_re.compile(r'\s*,\s*|\s+') + + def __init__(self): +- super(MessageNode, self).__init__() ++ super().__init__() + # Valid after EndParsing, this is the MessageClique that contains the + # source message and any translations of it that have been loaded. + self.clique = None +@@ -143,7 +143,7 @@ class MessageNode(base.ContentNode): + superclass' implementation + ''' + if 'offset' not in self.attrs: +- return super(MessageNode, self).GetTextualIds() ++ return super().GetTextualIds() + + # we search for the first grouping node in the parents' list + # to take care of the case where the first parent is an node +@@ -160,7 +160,7 @@ class MessageNode(base.ContentNode): + return self.attrs['translateable'] == 'true' + + def EndParsing(self): +- super(MessageNode, self).EndParsing() ++ super().EndParsing() + + # Make the text (including placeholder references) and list of placeholders, + # verify placeholder formats, then strip and store leading and trailing +@@ -272,7 +272,7 @@ class MessageNode(base.ContentNode): + if self._replace_ellipsis: + msg = _ELLIPSIS_PATTERN.sub(_ELLIPSIS_SYMBOL, msg) + # Always remove all byte order marks (\uFEFF) https://crbug.com/1033305 +- msg = msg.replace(u'\uFEFF','') ++ msg = msg.replace('\uFEFF','') + return msg.replace('[GRITLANGCODE]', lang) + + def NameOrOffset(self): +@@ -347,7 +347,7 @@ class PhNode(base.ContentNode): + return ['name'] + + def EndParsing(self): +- super(PhNode, self).EndParsing() ++ super().EndParsing() + # We only allow a single example for each placeholder + if len(self.children) > 1: + raise exception.TooManyExamples() +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/message_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/message_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/message_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.node.message''' + +-from __future__ import print_function + + import os + import sys +@@ -31,7 +30,7 @@ class MessageUnittest(unittest.TestCase) + msg, = root.GetChildrenOfType(message.MessageNode) + cliques = msg.GetCliques() + content = cliques[0].GetMessage().GetPresentableContent() +- self.failUnless(content == 'Hello USERNAME, how are you doing today?') ++ self.assertTrue(content == 'Hello USERNAME, how are you doing today?') + + def testMessageWithWhitespace(self): + root = util.ParseGrdForUnittest("""\ +@@ -42,28 +41,28 @@ class MessageUnittest(unittest.TestCase) + """) + msg, = root.GetChildrenOfType(message.MessageNode) + content = msg.GetCliques()[0].GetMessage().GetPresentableContent() +- self.failUnless(content == 'Hello there USERNAME') +- self.failUnless(msg.ws_at_start == ' ') +- self.failUnless(msg.ws_at_end == ' ') ++ self.assertTrue(content == 'Hello there USERNAME') ++ self.assertTrue(msg.ws_at_start == ' ') ++ self.assertTrue(msg.ws_at_end == ' ') + + def testConstruct(self): + msg = tclib.Message(text=" Hello USERNAME, how are you? BINGO\t\t", + placeholders=[tclib.Placeholder('USERNAME', '%s', 'Joi'), + tclib.Placeholder('BINGO', '%d', '11')]) + msg_node = message.MessageNode.Construct(None, msg, 'BINGOBONGO') +- self.failUnless(msg_node.children[0].name == 'ph') +- self.failUnless(msg_node.children[0].children[0].name == 'ex') +- self.failUnless(msg_node.children[0].children[0].GetCdata() == 'Joi') +- self.failUnless(msg_node.children[1].children[0].GetCdata() == '11') +- self.failUnless(msg_node.ws_at_start == ' ') +- self.failUnless(msg_node.ws_at_end == '\t\t') ++ self.assertTrue(msg_node.children[0].name == 'ph') ++ self.assertTrue(msg_node.children[0].children[0].name == 'ex') ++ self.assertTrue(msg_node.children[0].children[0].GetCdata() == 'Joi') ++ self.assertTrue(msg_node.children[1].children[0].GetCdata() == '11') ++ self.assertTrue(msg_node.ws_at_start == ' ') ++ self.assertTrue(msg_node.ws_at_end == '\t\t') + + def testUnicodeConstruct(self): +- text = u'Howdie \u00fe' ++ text = 'Howdie \u00fe' + msg = tclib.Message(text=text) + msg_node = message.MessageNode.Construct(None, msg, 'BINGOBONGO') + msg_from_node = msg_node.GetCdata() +- self.failUnless(msg_from_node == text) ++ self.assertTrue(msg_from_node == text) + + def testFormatterData(self): + root = util.ParseGrdForUnittest("""\ +@@ -80,10 +79,10 @@ class MessageUnittest(unittest.TestCase) + + # Can't use assertDictEqual, not available in Python 2.6, so do it + # by hand. +- self.failUnlessEqual(len(expected_formatter_data), ++ self.assertEqual(len(expected_formatter_data), + len(msg.formatter_data)) + for key in expected_formatter_data: +- self.failUnlessEqual(expected_formatter_data[key], ++ self.assertEqual(expected_formatter_data[key], + msg.formatter_data[key]) + + def testReplaceEllipsis(self): +@@ -96,10 +95,10 @@ class MessageUnittest(unittest.TestCase) + msg, = root.GetChildrenOfType(message.MessageNode) + msg.SetReplaceEllipsis(True) + content = msg.Translate('en') +- self.failUnlessEqual(u'A...B.... %s\u2026 B\u2026 C\u2026', content) ++ self.assertEqual('A...B.... %s\u2026 B\u2026 C\u2026', content) + + def testRemoveByteOrderMark(self): +- root = util.ParseGrdForUnittest(u''' ++ root = util.ParseGrdForUnittest(''' + + + \uFEFFThis\uFEFF i\uFEFFs OK\uFEFF +@@ -107,7 +106,7 @@ class MessageUnittest(unittest.TestCase) + ''') + msg, = root.GetChildrenOfType(message.MessageNode) + content = msg.Translate('en') +- self.failUnlessEqual(u'This is OK', content) ++ self.assertEqual('This is OK', content) + + def testPlaceholderHasTooManyExamples(self): + try: +@@ -250,7 +249,7 @@ class MessageUnittest(unittest.TestCase) + msg, = root.GetChildrenOfType(message.MessageNode) + cliques = msg.GetCliques() + content = cliques[0].GetMessage().GetPresentableContent() +- self.failUnless(content == 'ERROR_COUNT error, WARNING_COUNT warning') ++ self.assertTrue(content == 'ERROR_COUNT error, WARNING_COUNT warning') + + def testMultipleFormattersAreInsidePhNodes(self): + failed = True +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/misc.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/misc.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/misc.py +@@ -256,7 +256,7 @@ class IfNode(SplicingNode): + + def _IsValidChild(self, child): + return (isinstance(child, (ThenNode, ElseNode)) or +- super(IfNode, self)._IsValidChild(child)) ++ super()._IsValidChild(child)) + + def EndParsing(self): + children = self.children +@@ -274,7 +274,7 @@ class IfNode(SplicingNode): + return self.children[0 if cond else 1].ActiveChildren() + else: + # Equivalent to having all children inside with an empty +- return super(IfNode, self).ActiveChildren() if cond else [] ++ return super().ActiveChildren() if cond else [] + + + class ThenNode(SplicingNode): +@@ -292,14 +292,14 @@ class PartNode(SplicingNode): + """ + + def __init__(self): +- super(PartNode, self).__init__() ++ super().__init__() + self.started_inclusion = False + + def MandatoryAttributes(self): + return ['file'] + + def _IsValidChild(self, child): +- return self.started_inclusion and super(PartNode, self)._IsValidChild(child) ++ return self.started_inclusion and super()._IsValidChild(child) + + + class ReleaseNode(base.Node): +@@ -327,7 +327,7 @@ class GritNode(base.Node): + """The root element.""" + + def __init__(self): +- super(GritNode, self).__init__() ++ super().__init__() + self.output_language = '' + self.defines = {} + self.substituter = None +@@ -366,7 +366,7 @@ class GritNode(base.Node): + } + + def EndParsing(self): +- super(GritNode, self).EndParsing() ++ super().EndParsing() + if (int(self.attrs['latest_public_release']) + > int(self.attrs['current_release'])): + raise exception.Parsing('latest_public_release cannot have a greater ' +@@ -533,8 +533,8 @@ class GritNode(base.Node): + """Returns the distinct (language, context, fallback_to_default_layout) + triples from the output nodes. + """ +- return set((n.GetLanguage(), n.GetContext(), n.GetFallbackToDefaultLayout()) +- for n in self.GetOutputFiles()) ++ return {(n.GetLanguage(), n.GetContext(), n.GetFallbackToDefaultLayout()) ++ for n in self.GetOutputFiles()} + + def GetSubstitutionMessages(self): + """Returns the list of nodes.""" +@@ -703,7 +703,7 @@ class IdentifierNode(base.Node): + + def EndParsing(self): + """Handles system identifiers.""" +- super(IdentifierNode, self).EndParsing() ++ super().EndParsing() + if self.attrs['systemid'] == 'true': + util.SetupSystemIdentifiers((self.attrs['name'],)) + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/misc_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/misc_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/misc_unittest.py +@@ -113,7 +113,7 @@ class GritNodeUnittest(unittest.TestCase + path in grd.GetInputFiles()] + # Convert path separator for Windows paths. + actual = [path.replace('\\', '/') for path in actual] +- self.assertEquals(expected, actual) ++ self.assertEqual(expected, actual) + + # Verifies that GetInputFiles() returns the correct list of files + # when files include other files. +@@ -139,7 +139,7 @@ class GritNodeUnittest(unittest.TestCase + path in grd.GetInputFiles()] + # Convert path separator for Windows paths. + actual = [path.replace('\\', '/') for path in actual] +- self.assertEquals(expected, actual) ++ self.assertEqual(expected, actual) + + def testNonDefaultEntry(self): + grd = util.ParseGrdForUnittest(''' +@@ -262,33 +262,33 @@ class IfNodeUnittest(unittest.TestCase): + grd.SetOutputLanguage('fr') + grd.SetDefines({'hello': '1'}) + active = set(grd.ActiveDescendants()) +- self.failUnless(bingo_message not in active) +- self.failUnless(hello_message in active) +- self.failUnless(french_message in active) ++ self.assertTrue(bingo_message not in active) ++ self.assertTrue(hello_message in active) ++ self.assertTrue(french_message in active) + + grd.SetOutputLanguage('en') + grd.SetDefines({'bingo': 1}) + active = set(grd.ActiveDescendants()) +- self.failUnless(bingo_message in active) +- self.failUnless(hello_message not in active) +- self.failUnless(french_message not in active) ++ self.assertTrue(bingo_message in active) ++ self.assertTrue(hello_message not in active) ++ self.assertTrue(french_message not in active) + + grd.SetOutputLanguage('en') + grd.SetDefines({'FORCE_FRENCH': '1', 'bingo': '1'}) + active = set(grd.ActiveDescendants()) +- self.failUnless(bingo_message in active) +- self.failUnless(hello_message not in active) +- self.failUnless(french_message in active) ++ self.assertTrue(bingo_message in active) ++ self.assertTrue(hello_message not in active) ++ self.assertTrue(french_message in active) + + grd.SetOutputLanguage('en') + grd.SetDefines({}) +- self.failUnless(grd.target_platform == sys.platform) ++ self.assertTrue(grd.target_platform == sys.platform) + grd.SetTargetPlatform('darwin') + active = set(grd.ActiveDescendants()) +- self.failUnless(is_win_message not in active) ++ self.assertTrue(is_win_message not in active) + grd.SetTargetPlatform('win32') + active = set(grd.ActiveDescendants()) +- self.failUnless(is_win_message in active) ++ self.assertTrue(is_win_message in active) + + def testElsiness(self): + grd = util.ParseGrdForUnittest(''' +@@ -364,7 +364,7 @@ class IfNodeUnittest(unittest.TestCase): + grd.SetOutputLanguage('ru') + grd.SetDefines({'hello': '1'}) + outputs = [output.GetFilename() for output in grd.GetOutputFiles()] +- self.assertEquals( ++ self.assertEqual( + outputs, + ['uncond1.rc', 'only_fr.adm', 'only_fr.plist', 'doc.html', + 'uncond2.adm', 'iftest.h']) +@@ -372,14 +372,14 @@ class IfNodeUnittest(unittest.TestCase): + grd.SetOutputLanguage('ru') + grd.SetDefines({'bingo': '2'}) + outputs = [output.GetFilename() for output in grd.GetOutputFiles()] +- self.assertEquals( ++ self.assertEqual( + outputs, + ['uncond1.rc', 'doc.html', 'uncond2.adm', 'iftest.h']) + + grd.SetOutputLanguage('fr') + grd.SetDefines({'hello': '1'}) + outputs = [output.GetFilename() for output in grd.GetOutputFiles()] +- self.assertEquals( ++ self.assertEqual( + outputs, + ['uncond1.rc', 'only_fr.adm', 'only_fr.plist', 'uncond2.adm', + 'iftest.h']) +@@ -387,12 +387,12 @@ class IfNodeUnittest(unittest.TestCase): + grd.SetOutputLanguage('en') + grd.SetDefines({'bingo': '1'}) + outputs = [output.GetFilename() for output in grd.GetOutputFiles()] +- self.assertEquals(outputs, ['uncond1.rc', 'uncond2.adm', 'iftest.h']) ++ self.assertEqual(outputs, ['uncond1.rc', 'uncond2.adm', 'iftest.h']) + + grd.SetOutputLanguage('fr') + grd.SetDefines({'bingo': '1'}) + outputs = [output.GetFilename() for output in grd.GetOutputFiles()] +- self.assertNotEquals(outputs, ['uncond1.rc', 'uncond2.adm', 'iftest.h']) ++ self.assertNotEqual(outputs, ['uncond1.rc', 'uncond2.adm', 'iftest.h']) + + def testChildrenAccepted(self): + grd_reader.Parse(StringIO(r''' +@@ -575,10 +575,10 @@ class ReleaseNodeUnittest(unittest.TestC + menu = grd.GetNodeById('IDC_KLONKMENU') + + for node in [hello, aboutbox]: +- self.failUnless(not node.PseudoIsAllowed()) ++ self.assertTrue(not node.PseudoIsAllowed()) + + for node in [bingo, menu]: +- self.failUnless(node.PseudoIsAllowed()) ++ self.assertTrue(node.PseudoIsAllowed()) + + # TODO(benrg): There was a test here that formatting hello and aboutbox with + # a pseudo language should fail, but they do not fail and the test was +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/node_io.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/node_io.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/node_io.py +@@ -5,7 +5,6 @@ + '''The and elements. + ''' + +-from __future__ import print_function + + import os + +@@ -17,7 +16,7 @@ class FileNode(base.Node): + '''A element.''' + + def __init__(self): +- super(FileNode, self).__init__() ++ super().__init__() + self.re = None + self.should_load_ = True + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/node_io_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/node_io_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/node_io_unittest.py +@@ -34,20 +34,20 @@ def _GetAllCliques(root_node): + class FileNodeUnittest(unittest.TestCase): + def testGetPath(self): + root = misc.GritNode() +- root.StartParsing(u'grit', None) +- root.HandleAttribute(u'latest_public_release', u'0') +- root.HandleAttribute(u'current_release', u'1') +- root.HandleAttribute(u'base_dir', r'..\resource') ++ root.StartParsing('grit', None) ++ root.HandleAttribute('latest_public_release', '0') ++ root.HandleAttribute('current_release', '1') ++ root.HandleAttribute('base_dir', r'..\resource') + translations = empty.TranslationsNode() +- translations.StartParsing(u'translations', root) ++ translations.StartParsing('translations', root) + root.AddChild(translations) + file_node = node_io.FileNode() +- file_node.StartParsing(u'file', translations) +- file_node.HandleAttribute(u'path', r'flugel\kugel.pdf') ++ file_node.StartParsing('file', translations) ++ file_node.HandleAttribute('path', r'flugel\kugel.pdf') + translations.AddChild(file_node) + root.EndParsing() + +- self.failUnless(root.ToRealPath(file_node.GetInputPath()) == ++ self.assertTrue(root.ToRealPath(file_node.GetInputPath()) == + util.normpath( + os.path.join(r'../resource', r'flugel/kugel.pdf'))) + +@@ -153,12 +153,12 @@ class FileNodeUnittest(unittest.TestCase + grd.RunGatherers() + outputs = grd.GetChildrenOfType(node_io.OutputNode) + active = set(grd.ActiveDescendants()) +- self.failUnless(outputs[0] in active) +- self.failUnless(outputs[0].GetType() == 'rc_header') +- self.failUnless(outputs[1] in active) +- self.failUnless(outputs[1].GetType() == 'rc_all') +- self.failUnless(outputs[2] not in active) +- self.failUnless(outputs[2].GetType() == 'rc_all') ++ self.assertTrue(outputs[0] in active) ++ self.assertTrue(outputs[0].GetType() == 'rc_header') ++ self.assertTrue(outputs[1] in active) ++ self.assertTrue(outputs[1].GetType() == 'rc_all') ++ self.assertTrue(outputs[2] not in active) ++ self.assertTrue(outputs[2].GetType() == 'rc_all') + + # Verify that 'iw' and 'no' language codes in xtb files are mapped to 'he' and + # 'nb'. +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/structure.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/structure.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/structure.py +@@ -5,7 +5,6 @@ + '''The element. + ''' + +-from __future__ import print_function + + import os + import platform +@@ -58,7 +57,7 @@ class StructureNode(base.Node): + variable_pattern = re.compile(r'([^,=\s]+)=((?:,,|[^,])*)') + + def __init__(self): +- super(StructureNode, self).__init__() ++ super().__init__() + + # Keep track of the last filename we flattened to, so we can + # avoid doing it more than once. +@@ -74,10 +73,10 @@ class StructureNode(base.Node): + def _ParseVariables(self, variables): + '''Parse a variable string into a dictionary.''' + matches = StructureNode.variable_pattern.findall(variables) +- return dict((name, value.replace(',,', ',')) for name, value in matches) ++ return {name: value.replace(',,', ',') for name, value in matches} + + def EndParsing(self): +- super(StructureNode, self).EndParsing() ++ super().EndParsing() + + # Now that we have attributes and children, instantiate the gatherers. + gathertype = _GATHERERS[self.attrs['type']] +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/structure_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/structure_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/structure_unittest.py +@@ -6,7 +6,6 @@ + '''Unit tests for nodes. + ''' + +-from __future__ import print_function + + import os + import os.path +@@ -55,18 +54,18 @@ class StructureUnittest(unittest.TestCas + grd.SetOutputLanguage('fr') + grd.RunGatherers() + transl = ''.join(rc.Format(grd, 'fr', '.')) +- self.failUnless(transl.count('040704') and transl.count('110978')) +- self.failUnless(transl.count('2005",IDC_STATIC')) ++ self.assertTrue(transl.count('040704') and transl.count('110978')) ++ self.assertTrue(transl.count('2005",IDC_STATIC')) + + def testRunCommandOnCurrentPlatform(self): + node = structure.StructureNode() + node.attrs = node.DefaultAttributes() +- self.failUnless(node.RunCommandOnCurrentPlatform()) ++ self.assertTrue(node.RunCommandOnCurrentPlatform()) + node.attrs['run_command_on_platforms'] = 'Nosuch' +- self.failIf(node.RunCommandOnCurrentPlatform()) ++ self.assertFalse(node.RunCommandOnCurrentPlatform()) + node.attrs['run_command_on_platforms'] = ( + 'Nosuch,%s,Othernot' % platform.system()) +- self.failUnless(node.RunCommandOnCurrentPlatform()) ++ self.assertTrue(node.RunCommandOnCurrentPlatform()) + + def testVariables(self): + grd = util.ParseGrdForUnittest(''' +@@ -80,7 +79,7 @@ class StructureUnittest(unittest.TestCas + filepath = os.path.join(tempfile.gettempdir(), filename) + with open(filepath) as f: + result = f.read() +- self.failUnlessEqual(('

Hello!

\n' ++ self.assertEqual(('

Hello!

\n' + 'Some cool things are foo, bar, baz.\n' + 'Did you know that 2+2==4?\n' + '

\n' +@@ -199,7 +198,7 @@ class StructureUnittest(unittest.TestCas + node.RunPreSubstitutionGatherer() + data = node.GetDataPackValue(lang='en', encoding=util.BINARY) + +- self.assertEqual('LOTTIE'.encode('utf-8'), data[0:6]) ++ self.assertEqual(b'LOTTIE', data[0:6]) + self.assertEqual( + util.ReadFile(os.path.join(test_data_root, 'test_json.json'), + util.BINARY), +@@ -221,7 +220,7 @@ class StructureUnittest(unittest.TestCas + ]) + data = node.GetDataPackValue(lang='en', encoding=util.BINARY) + +- self.assertEqual('LOTTIE'.encode('utf-8'), data[0:6]) ++ self.assertEqual(b'LOTTIE', data[0:6]) + self.assertEqual(constants.BROTLI_CONST, data[6:8]) + self.assertEqual( + len( +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/variant.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/node/variant.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/node/variant.py +@@ -5,7 +5,6 @@ + '''The element. + ''' + +-from __future__ import print_function + + from grit.node import base + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudo.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/pseudo.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudo.py +@@ -21,7 +21,6 @@ character Qof. It looks sort of like a + the latin-1 character set which will stress character encoding bugs. + ''' + +-from __future__ import print_function + + from grit import lazy_re + from grit import tclib +@@ -36,22 +35,22 @@ PSEUDO_LANG = 'x-P-pseudo' + # a better solution, i.e. one that introduces a non-latin1 character into the + # pseudotranslation. + #_QOF = u'\u05e7' +-_QOF = u'P' ++_QOF = 'P' + + # How we map each vowel. + _VOWELS = { +- u'a' : u'\u00e5', # a with ring +- u'e' : u'\u00e9', # e acute +- u'i' : u'\u00ef', # i diaresis +- u'o' : u'\u00f4', # o circumflex +- u'u' : u'\u00fc', # u diaresis +- u'y' : u'\u00fd', # y acute +- u'A' : u'\u00c5', # A with ring +- u'E' : u'\u00c9', # E acute +- u'I' : u'\u00cf', # I diaresis +- u'O' : u'\u00d4', # O circumflex +- u'U' : u'\u00dc', # U diaresis +- u'Y' : u'\u00dd', # Y acute ++ 'a' : '\u00e5', # a with ring ++ 'e' : '\u00e9', # e acute ++ 'i' : '\u00ef', # i diaresis ++ 'o' : '\u00f4', # o circumflex ++ 'u' : '\u00fc', # u diaresis ++ 'y' : '\u00fd', # y acute ++ 'A' : '\u00c5', # A with ring ++ 'E' : '\u00c9', # E acute ++ 'I' : '\u00cf', # I diaresis ++ 'O' : '\u00d4', # O circumflex ++ 'U' : '\u00dc', # U diaresis ++ 'Y' : '\u00dd', # Y acute + } + _VOWELS_KEYS = set(_VOWELS.keys()) + +@@ -87,7 +86,7 @@ def PseudoString(str): + if str in _existing_translations: + return _existing_translations[str] + +- outstr = u'' ++ outstr = '' + ix = 0 + while ix < len(str): + if str[ix] not in _VOWELS_KEYS: +@@ -96,7 +95,7 @@ def PseudoString(str): + else: + # We want to treat consecutive vowels as one composite vowel. This is not + # always accurate e.g. in composite words but good enough. +- consecutive_vowels = u'' ++ consecutive_vowels = '' + while ix < len(str) and str[ix] in _VOWELS_KEYS: + consecutive_vowels += str[ix] + ix += 1 +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudo_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/pseudo_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudo_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.pseudo''' + +-from __future__ import print_function + + import os + import sys +@@ -20,24 +19,24 @@ from grit import tclib + + class PseudoUnittest(unittest.TestCase): + def testVowelMapping(self): +- self.failUnless(pseudo.MapVowels('abebibobuby') == +- u'\u00e5b\u00e9b\u00efb\u00f4b\u00fcb\u00fd') +- self.failUnless(pseudo.MapVowels('ABEBIBOBUBY') == +- u'\u00c5B\u00c9B\u00cfB\u00d4B\u00dcB\u00dd') ++ self.assertTrue(pseudo.MapVowels('abebibobuby') == ++ '\u00e5b\u00e9b\u00efb\u00f4b\u00fcb\u00fd') ++ self.assertTrue(pseudo.MapVowels('ABEBIBOBUBY') == ++ '\u00c5B\u00c9B\u00cfB\u00d4B\u00dcB\u00dd') + + def testPseudoString(self): + out = pseudo.PseudoString('hello') +- self.failUnless(out == pseudo.MapVowels(u'hePelloPo', True)) ++ self.assertTrue(out == pseudo.MapVowels('hePelloPo', True)) + + def testConsecutiveVowels(self): + out = pseudo.PseudoString("beautiful weather, ain't it?") +- self.failUnless(out == pseudo.MapVowels( +- u"beauPeautiPifuPul weaPeathePer, aiPain't iPit?", 1)) ++ self.assertTrue(out == pseudo.MapVowels( ++ "beauPeautiPifuPul weaPeathePer, aiPain't iPit?", 1)) + + def testCapitals(self): + out = pseudo.PseudoString("HOWDIE DOODIE, DR. JONES") +- self.failUnless(out == pseudo.MapVowels( +- u"HOPOWDIEPIE DOOPOODIEPIE, DR. JOPONEPES", 1)) ++ self.assertTrue(out == pseudo.MapVowels( ++ "HOPOWDIEPIE DOOPOODIEPIE, DR. JOPONEPES", 1)) + + def testPseudoMessage(self): + msg = tclib.Message(text='Hello USERNAME, how are you?', +@@ -46,9 +45,9 @@ class PseudoUnittest(unittest.TestCase): + trans = pseudo.PseudoMessage(msg) + # TODO(joi) It would be nicer if 'you' -> 'youPou' instead of + # 'you' -> 'youPyou' and if we handled the silent e in 'are' +- self.failUnless(trans.GetPresentableContent() == ++ self.assertTrue(trans.GetPresentableContent() == + pseudo.MapVowels( +- u'HePelloPo USERNAME, hoPow aParePe youPyou?', 1)) ++ 'HePelloPo USERNAME, hoPow aParePe youPyou?', 1)) + + + if __name__ == '__main__': +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudolocales.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/pseudolocales.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudolocales.py +@@ -3,7 +3,6 @@ + # found in the LICENSE file. + """Pseudolocale translations for chrome.""" + +-from __future__ import print_function + + import re + import string +@@ -13,49 +12,49 @@ from grit import lazy_re + from grit import tclib + + ACCENTED_STRINGS = { +- '!': u'\u00a1', +- '$': u'\u20ac', +- '?': u'\u00bf', +- 'A': u'\u00c5', +- 'C': u'\u00c7', +- 'D': u'\u00d0', +- 'E': u'\u00c9', +- 'G': u'\u011c', +- 'H': u'\u0124', +- 'I': u'\u00ce', +- 'J': u'\u0134', +- 'K': u'\u0136', +- 'L': u'\u013b', +- 'N': u'\u00d1', +- 'O': u'\u00d6', +- 'P': u'\u00de', +- 'R': u'\u00ae', +- 'S': u'\u0160', +- 'T': u'\u0162', +- 'U': u'\u00db', +- 'W': u'\u0174', +- 'Y': u'\u00dd', +- 'Z': u'\u017d', +- 'a': u'\u00e5', +- 'c': u'\u00e7', +- 'd': u'\u00f0', +- 'e': u'\u00e9', +- 'f': u'\u0192', +- 'g': u'\u011d', +- 'h': u'\u0125', +- 'i': u'\u00ee', +- 'j': u'\u0135', +- 'k': u'\u0137', +- 'l': u'\u013c', +- 'n': u'\u00f1', +- 'o': u'\u00f6', +- 'p': u'\u00fe', +- 's': u'\u0161', +- 't': u'\u0163', +- 'u': u'\u00fb', +- 'w': u'\u0175', +- 'y': u'\u00fd', +- 'z': u'\u017e', ++ '!': '\u00a1', ++ '$': '\u20ac', ++ '?': '\u00bf', ++ 'A': '\u00c5', ++ 'C': '\u00c7', ++ 'D': '\u00d0', ++ 'E': '\u00c9', ++ 'G': '\u011c', ++ 'H': '\u0124', ++ 'I': '\u00ce', ++ 'J': '\u0134', ++ 'K': '\u0136', ++ 'L': '\u013b', ++ 'N': '\u00d1', ++ 'O': '\u00d6', ++ 'P': '\u00de', ++ 'R': '\u00ae', ++ 'S': '\u0160', ++ 'T': '\u0162', ++ 'U': '\u00db', ++ 'W': '\u0174', ++ 'Y': '\u00dd', ++ 'Z': '\u017d', ++ 'a': '\u00e5', ++ 'c': '\u00e7', ++ 'd': '\u00f0', ++ 'e': '\u00e9', ++ 'f': '\u0192', ++ 'g': '\u011d', ++ 'h': '\u0125', ++ 'i': '\u00ee', ++ 'j': '\u0135', ++ 'k': '\u0137', ++ 'l': '\u013c', ++ 'n': '\u00f1', ++ 'o': '\u00f6', ++ 'p': '\u00fe', ++ 's': '\u0161', ++ 't': '\u0163', ++ 'u': '\u00fb', ++ 'w': '\u0175', ++ 'y': '\u00fd', ++ 'z': '\u017e', + } + + NUMBERS = [ +@@ -67,11 +66,11 @@ ALPHABETIC_RUN = lazy_re.compile(r'([^\W + WORD = lazy_re.compile(r'\b\S+\b') + + # RTL modifiers for letters +-RLO = u'\u202e' +-PDF = u'\u202c' ++RLO = '\u202e' ++PDF = '\u202c' + + +-class Node(object): ++class Node: + """A node in the syntax tree representing a message to be translated.""" + + translatable = False +@@ -100,7 +99,7 @@ class Node(object): + translation from. + """ + children = ''.join(c.ToString() for c in self.children) +- return u'%s%s%s' % (self.text, children, self.after) ++ return '%s%s%s' % (self.text, children, self.after) + + def __repr__(self): + # For debugging +@@ -231,7 +230,7 @@ class NodeSequence(Node): + child_types = [HtmlTag, BasicVariable, Plural, RawText] + + def __init__(self, children): +- super(NodeSequence, self).__init__('', children) ++ super().__init__('', children) + + @classmethod + def Parse(cls, text): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudolocales_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/pseudolocales_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/pseudolocales_unittest.py +@@ -181,8 +181,8 @@ class TclibUnittest(unittest.TestCase): + '{ATTEMPTS_LEFT, plural,\n =1 {hello}\nother {world}\n}') + + def testBuildAndUnbuildTree(self): +- p1 = tclib.Placeholder(u'USERNAME', '%s', 'foo') +- p2 = tclib.Placeholder(u'EMAIL', '%s', 'bar') ++ p1 = tclib.Placeholder('USERNAME', '%s', 'foo') ++ p2 = tclib.Placeholder('EMAIL', '%s', 'bar') + + msg = tclib.Message() + msg.AppendText('hello') +@@ -203,8 +203,8 @@ class TclibUnittest(unittest.TestCase): + self.assertEqual(transl.GetContent(), ['hello', p1, p2, 'world']) + + def testPseudolocales(self): +- p1 = tclib.Placeholder(u'USERNAME', '%s', 'foo') +- p2 = tclib.Placeholder(u'EMAIL', '%s', 'bar') ++ p1 = tclib.Placeholder('USERNAME', '%s', 'foo') ++ p2 = tclib.Placeholder('EMAIL', '%s', 'bar') + msg = tclib.Message() + msg.AppendText('h_') + msg.AppendPlaceholder(p1) +@@ -213,23 +213,23 @@ class TclibUnittest(unittest.TestCase): + + self.assertEqual( + pl.PseudoLongStringMessage(msg).GetContent(), +- [u'\u0125_', p1, p2, u'\u0175', ' - one two three four']) ++ ['\u0125_', p1, p2, '\u0175', ' - one two three four']) + + msg.AppendText('hello world') + self.assertEqual( + pl.PseudoRTLMessage(msg).GetContent(), +- [u'\u202eh\u202c_', p1, p2, u'\u202ewhello\u202c \u202eworld\u202c']) ++ ['\u202eh\u202c_', p1, p2, '\u202ewhello\u202c \u202eworld\u202c']) + + # If it fails to translate with prod messages, add the failure to here to + # make sure it doesn't happen again. + def testProdFailures(self): +- p1 = tclib.Placeholder(u'USERNAME', '%s', 'foo') ++ p1 = tclib.Placeholder('USERNAME', '%s', 'foo') + + msg = tclib.Message() +- msg.AppendText(u'{LINE_COUNT, plural,\n =1 {<1 line not shown>}\n' ++ msg.AppendText('{LINE_COUNT, plural,\n =1 {<1 line not shown>}\n' + ' other {<') + msg.AppendPlaceholder(p1) +- msg.AppendText(u' lines not shown>}\n}') ++ msg.AppendText(' lines not shown>}\n}') + tree, _ = pl.BuildTreeFromMessage(msg) + self.assertTreesEqual( + tree, +@@ -242,11 +242,11 @@ class TclibUnittest(unittest.TestCase): + ])) + + msg = tclib.Message() +- msg.AppendText(u'{1, plural,\n \n =1 {Rated ') ++ msg.AppendText('{1, plural,\n \n =1 {Rated ') + msg.AppendPlaceholder(p1) +- msg.AppendText(u' by one user.}\n other{Rated ') ++ msg.AppendText(' by one user.}\n other{Rated ') + msg.AppendPlaceholder(p1) +- msg.AppendText(u' by # users.}}') ++ msg.AppendText(' by # users.}}') + tree, _ = pl.BuildTreeFromMessage(msg) + self.assertTreesEqual( + tree, +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/shortcuts.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/shortcuts.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/shortcuts.py +@@ -5,12 +5,11 @@ + '''Stuff to prevent conflicting shortcuts. + ''' + +-from __future__ import print_function + + from grit import lazy_re + + +-class ShortcutGroup(object): ++class ShortcutGroup: + '''Manages a list of cliques that belong together in a single shortcut + group. Knows how to detect conflicting shortcut keys. + ''' +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/shortcuts_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/shortcuts_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/shortcuts_unittest.py +@@ -34,7 +34,7 @@ class ShortcutsUnittest(unittest.TestCas + c.AddToShortcutGroup('group_name') + + warnings = shortcuts.GenerateDuplicateShortcutsWarnings(self.uq, 'PROJECT') +- self.failUnless(warnings) ++ self.assertTrue(warnings) + + def testAmpersandEscaping(self): + c = self.uq.MakeClique(tclib.Message(text="Hello &there")) +@@ -43,7 +43,7 @@ class ShortcutsUnittest(unittest.TestCas + c.AddToShortcutGroup('group_name') + + warnings = shortcuts.GenerateDuplicateShortcutsWarnings(self.uq, 'PROJECT') +- self.failUnless(len(warnings) == 0) ++ self.assertTrue(len(warnings) == 0) + + def testDialog(self): + dlg = rc.Dialog(StringIO('''\ +@@ -76,4 +76,4 @@ END'''), 'IDD_SIDEBAR_RSS_PANEL_PROPPAGE + dlg.Parse() + + warnings = shortcuts.GenerateDuplicateShortcutsWarnings(self.uq, 'PROJECT') +- self.failUnless(len(warnings) == 0) ++ self.assertTrue(len(warnings) == 0) +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tclib.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tclib.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tclib.py +@@ -5,7 +5,6 @@ + '''Adaptation of the extern.tclib classes for our needs. + ''' + +-from __future__ import print_function + + import functools + import re +@@ -29,7 +28,7 @@ def Identity(i): + return i + + +-class BaseMessage(object): ++class BaseMessage: + '''Base class with methods shared by Message and Translation. + ''' + +@@ -87,7 +86,7 @@ class BaseMessage(object): + ''' + bits = [] + for item in self.parts: +- if isinstance(item, six.string_types): ++ if isinstance(item, str): + bits.append(escaping_function(item)) + else: + bits.append(item.GetOriginal()) +@@ -116,7 +115,7 @@ class BaseMessage(object): + self.dirty = True + + def AppendText(self, text): +- assert isinstance(text, six.string_types) ++ assert isinstance(text, str) + assert text != '' + + self.parts.append(text) +@@ -171,7 +170,7 @@ class Message(BaseMessage): + + def __init__(self, text='', placeholders=[], description='', meaning='', + assigned_id=None): +- super(Message, self).__init__(text, placeholders, description, meaning) ++ super().__init__(text, placeholders, description, meaning) + self.assigned_id = assigned_id + + def ToTclibMessage(self): +@@ -184,7 +183,7 @@ class Message(BaseMessage): + if self.assigned_id: + return self.assigned_id + +- return super(Message, self).GetId() ++ return super().GetId() + + def HasAssignedId(self): + '''Returns True if this message has an assigned id.''' +@@ -195,7 +194,7 @@ class Translation(BaseMessage): + '''A translation.''' + + def __init__(self, text='', id='', placeholders=[], description='', meaning=''): +- super(Translation, self).__init__(text, placeholders, description, meaning) ++ super().__init__(text, placeholders, description, meaning) + self.id = id + + def GetId(self): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tclib_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tclib_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tclib_unittest.py +@@ -26,32 +26,32 @@ class TclibUnittest(unittest.TestCase): + def testInit(self): + msg = tclib.Message(text=u'Hello Earthlings', + description='Greetings\n\t message') +- self.failUnlessEqual(msg.GetPresentableContent(), 'Hello Earthlings') +- self.failUnless(isinstance(msg.GetPresentableContent(), six.string_types)) +- self.failUnlessEqual(msg.GetDescription(), 'Greetings message') ++ self.assertEqual(msg.GetPresentableContent(), 'Hello Earthlings') ++ self.assertTrue(isinstance(msg.GetPresentableContent(), six.string_types)) ++ self.assertEqual(msg.GetDescription(), 'Greetings message') + + def testGetAttr(self): + msg = tclib.Message() + msg.AppendText(u'Hello') # Tests __getattr__ +- self.failUnless(msg.GetPresentableContent() == 'Hello') +- self.failUnless(isinstance(msg.GetPresentableContent(), six.string_types)) ++ self.assertTrue(msg.GetPresentableContent() == 'Hello') ++ self.assertTrue(isinstance(msg.GetPresentableContent(), six.string_types)) + + def testAll(self): + text = u'Howdie USERNAME' + phs = [tclib.Placeholder(u'USERNAME', u'%s', 'Joi')] + msg = tclib.Message(text=text, placeholders=phs) +- self.failUnless(msg.GetPresentableContent() == 'Howdie USERNAME') ++ self.assertTrue(msg.GetPresentableContent() == 'Howdie USERNAME') + + trans = tclib.Translation(text=text, placeholders=phs) +- self.failUnless(trans.GetPresentableContent() == 'Howdie USERNAME') +- self.failUnless(isinstance(trans.GetPresentableContent(), six.string_types)) ++ self.assertTrue(trans.GetPresentableContent() == 'Howdie USERNAME') ++ self.assertTrue(isinstance(trans.GetPresentableContent(), six.string_types)) + + def testUnicodeReturn(self): + text = u'\u00fe' + msg = tclib.Message(text=text) +- self.failUnless(msg.GetPresentableContent() == text) ++ self.assertTrue(msg.GetPresentableContent() == text) + from_list = msg.GetContent()[0] +- self.failUnless(from_list == text) ++ self.assertTrue(from_list == text) + + def testRegressionTranslationInherited(self): + '''Regression tests a bug that was caused by grit.tclib.Translation +@@ -66,7 +66,7 @@ class TclibUnittest(unittest.TestCase): + transl = tclib.Translation(text=msg.GetPresentableContent(), + placeholders=msg.GetPlaceholders()) + content = transl.GetContent() +- self.failUnless(isinstance(content[3], six.string_types)) ++ self.assertTrue(isinstance(content[3], six.string_types)) + + def testFingerprint(self): + # This has Windows line endings. That is on purpose. +@@ -171,7 +171,7 @@ class TclibUnittest(unittest.TestCase): + phs = [tclib.Placeholder(word[:i], str(i), str(i)) for i in range(1, 11)] + try: + msg = tclib.Message(text=text, placeholders=phs) +- self.failUnless(msg.GetRealContent() == '1 2 3 4 5 6 7 8 9 10') ++ self.assertTrue(msg.GetRealContent() == '1 2 3 4 5 6 7 8 9 10') + except: + self.fail('tclib.Message() should handle placeholders that are ' + 'substrings of each other') +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/test_suite_all.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/test_suite_all.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/test_suite_all.py +@@ -5,7 +5,6 @@ + + '''Unit test suite that collects all test cases for GRIT.''' + +-from __future__ import print_function + + import os + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/android2grd.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/android2grd.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/android2grd.py +@@ -4,7 +4,6 @@ + + """The 'grit android2grd' tool.""" + +-from __future__ import print_function + + import getopt + import os.path +@@ -13,7 +12,7 @@ from xml.dom import Node + import xml.dom.minidom + + import six +-from six import StringIO ++from io import StringIO + + import grit.node.empty + from grit.node import node_io +@@ -176,7 +175,7 @@ OPTIONS may be any of the following: + + # Do the hard work -- convert the Android dom to grd file contents. + grd_dom = self.AndroidDomToGrdDom(android_dom) +- grd_string = six.text_type(grd_dom) ++ grd_string = str(grd_dom) + + # Write the grd string to a file in grd_dir. + grd_filename = self.name + '.grd' +@@ -406,7 +405,7 @@ OPTIONS may be any of the following: + xtb_file = os.path.normpath(os.path.join( + self.xtb_dir, '%s_%s.xtb' % (self.name, lang))) + fnode = node_io.FileNode() +- fnode.StartParsing(u'file', translations_node) ++ fnode.StartParsing('file', translations_node) + fnode.HandleAttribute('path', xtb_file) + fnode.HandleAttribute('lang', lang) + fnode.EndParsing() +@@ -417,11 +416,11 @@ OPTIONS may be any of the following: + """Creates the element corresponding to the generated c header.""" + header_file_name = os.path.join(header_dir, self.name + '.h') + header_node = node_io.OutputNode() +- header_node.StartParsing(u'output', outputs_node) ++ header_node.StartParsing('output', outputs_node) + header_node.HandleAttribute('filename', header_file_name) + header_node.HandleAttribute('type', 'rc_header') + emit_node = node_io.EmitNode() +- emit_node.StartParsing(u'emit', header_node) ++ emit_node.StartParsing('emit', header_node) + emit_node.HandleAttribute('emit_type', 'prepend') + emit_node.EndParsing() + header_node.AddChild(emit_node) +@@ -434,7 +433,7 @@ OPTIONS may be any of the following: + rc_file_name = self.name + '_' + lang + ".rc" + rc_path = os.path.join(rc_dir, rc_file_name) + node = node_io.OutputNode() +- node.StartParsing(u'output', outputs_node) ++ node.StartParsing('output', outputs_node) + node.HandleAttribute('filename', rc_path) + node.HandleAttribute('lang', lang) + node.HandleAttribute('type', 'rc_all') +@@ -462,7 +461,7 @@ OPTIONS may be any of the following: + xml_res_dir, values, 'strings.xml')) + + node = node_io.OutputNode() +- node.StartParsing(u'output', outputs_node) ++ node.StartParsing('output', outputs_node) + node.HandleAttribute('filename', xml_path) + node.HandleAttribute('lang', locale) + node.HandleAttribute('type', 'android') +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/android2grd_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/android2grd_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/android2grd_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.tool.android2grd''' + +-from __future__ import print_function + + import os + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/build.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/build.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/build.py +@@ -5,7 +5,6 @@ + '''The 'grit build' tool. + ''' + +-from __future__ import print_function + + import collections + import codecs +@@ -340,7 +339,7 @@ are exported to translation interchange + # inefficient to call write once per character/byte. Handle all of this + # ourselves by calling write directly on strings/bytes before falling back + # to writelines. +- if isinstance(formatted, (six.string_types, six.binary_type)): ++ if isinstance(formatted, ((str,), bytes)): + outfile.write(formatted) + else: + outfile.writelines(formatted) +@@ -463,11 +462,11 @@ are exported to translation interchange + False and prints the failure. + ''' + # Compare the absolute path names, sorted. +- asserted = sorted([os.path.abspath(i) for i in assert_output_files]) +- actual = sorted([ ++ asserted = sorted(os.path.abspath(i) for i in assert_output_files) ++ actual = sorted( + os.path.abspath(os.path.join(self.output_directory, + i.GetOutputFilename())) +- for i in self.res.GetOutputFiles()]) ++ for i in self.res.GetOutputFiles()) + + if asserted != actual: + missing = list(set(asserted) - set(actual)) +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/build_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/build_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/build_unittest.py +@@ -6,7 +6,6 @@ + '''Unit tests for the 'grit build' tool. + ''' + +-from __future__ import print_function + + import codecs + import os +@@ -37,7 +36,7 @@ class BuildUnittest(unittest.TestCase): + # another . + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute.grd') + self.verbose = False +@@ -48,7 +47,7 @@ class BuildUnittest(unittest.TestCase): + def testGenerateDepFile(self): + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/depfile.grd') + self.verbose = False +@@ -58,14 +57,14 @@ class BuildUnittest(unittest.TestCase): + '--depdir', output_dir.GetPath(), + '--depfile', expected_dep_file]) + +- self.failUnless(os.path.isfile(expected_dep_file)) ++ self.assertTrue(os.path.isfile(expected_dep_file)) + with open(expected_dep_file) as f: + line = f.readline() + (dep_output_file, deps_string) = line.split(': ') + deps = deps_string.split(' ') + +- self.failUnlessEqual("default_100_percent.pak", dep_output_file) +- self.failUnlessEqual(deps, [ ++ self.assertEqual("default_100_percent.pak", dep_output_file) ++ self.assertEqual(deps, [ + util.PathFromRoot('grit/testdata/default_100_percent/a.png'), + util.PathFromRoot('grit/testdata/grit_part.grdp'), + util.PathFromRoot('grit/testdata/special_100_percent/a.png'), +@@ -75,7 +74,7 @@ class BuildUnittest(unittest.TestCase): + def testGenerateDepFileWithResourceIds(self): + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute_no_ids.grd') + self.verbose = False +@@ -87,23 +86,23 @@ class BuildUnittest(unittest.TestCase): + '--depdir', output_dir.GetPath(), + '--depfile', expected_dep_file]) + +- self.failUnless(os.path.isfile(expected_dep_file)) ++ self.assertTrue(os.path.isfile(expected_dep_file)) + with open(expected_dep_file) as f: + line = f.readline() + (dep_output_file, deps_string) = line.split(': ') + deps = deps_string.split(' ') + +- self.failUnlessEqual("resource.h", dep_output_file) +- self.failUnlessEqual(2, len(deps)) +- self.failUnlessEqual(deps[0], ++ self.assertEqual("resource.h", dep_output_file) ++ self.assertEqual(2, len(deps)) ++ self.assertEqual(deps[0], + util.PathFromRoot('grit/testdata/substitute.xmb')) +- self.failUnlessEqual(deps[1], ++ self.assertEqual(deps[1], + util.PathFromRoot('grit/testdata/resource_ids')) + output_dir.CleanUp() + + def testAssertOutputs(self): + output_dir = util.TempDir({}) +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute.grd') + self.verbose = False +@@ -111,7 +110,7 @@ class BuildUnittest(unittest.TestCase): + + # Incomplete output file list should fail. + builder_fail = build.RcBuilder() +- self.failUnlessEqual(2, ++ self.assertEqual(2, + builder_fail.Run(DummyOpts(), [ + '-o', output_dir.GetPath(), + '-a', os.path.abspath( +@@ -119,7 +118,7 @@ class BuildUnittest(unittest.TestCase): + + # Complete output file list should succeed. + builder_ok = build.RcBuilder() +- self.failUnlessEqual(0, ++ self.assertEqual(0, + builder_ok.Run(DummyOpts(), [ + '-o', output_dir.GetPath(), + '-a', os.path.abspath( +@@ -131,7 +130,7 @@ class BuildUnittest(unittest.TestCase): + + def testAssertTemplateOutputs(self): + output_dir = util.TempDir({}) +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute_tmpl.grd') + self.verbose = False +@@ -139,7 +138,7 @@ class BuildUnittest(unittest.TestCase): + + # Incomplete output file list should fail. + builder_fail = build.RcBuilder() +- self.failUnlessEqual(2, ++ self.assertEqual(2, + builder_fail.Run(DummyOpts(), [ + '-o', output_dir.GetPath(), + '-E', 'name=foo', +@@ -147,7 +146,7 @@ class BuildUnittest(unittest.TestCase): + + # Complete output file list should succeed. + builder_ok = build.RcBuilder() +- self.failUnlessEqual(0, ++ self.assertEqual(0, + builder_ok.Run(DummyOpts(), [ + '-o', output_dir.GetPath(), + '-E', 'name=foo', +@@ -161,7 +160,7 @@ class BuildUnittest(unittest.TestCase): + allowlisted_ids, + non_allowlisted_ids, + encoding='utf8'): +- self.failUnless(os.path.exists(filename)) ++ self.assertTrue(os.path.exists(filename)) + allowlisted_ids_found = [] + non_allowlisted_ids_found = [] + with codecs.open(filename, encoding=encoding) as f: +@@ -189,7 +188,7 @@ class BuildUnittest(unittest.TestCase): + def testAllowlistStrings(self): + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/allowlist_strings.grd') + self.verbose = False +@@ -216,7 +215,7 @@ class BuildUnittest(unittest.TestCase): + def testAllowlistResources(self): + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/allowlist_resources.grd') + self.verbose = False +@@ -231,8 +230,8 @@ class BuildUnittest(unittest.TestCase): + + # Ensure the resource map header and .pak files exist, but don't verify + # their content. +- self.failUnless(os.path.exists(map_h)) +- self.failUnless(os.path.exists(pak)) ++ self.assertTrue(os.path.exists(map_h)) ++ self.assertTrue(os.path.exists(pak)) + + allowlisted_ids = [ + 'IDR_STRUCTURE_ALLOWLISTED', +@@ -257,7 +256,7 @@ class BuildUnittest(unittest.TestCase): + def testWriteOnlyNew(self): + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute.grd') + self.verbose = False +@@ -266,19 +265,19 @@ class BuildUnittest(unittest.TestCase): + header = output_dir.GetPath('resource.h') + + builder.Run(DummyOpts(), ['-o', output_dir.GetPath()]) +- self.failUnless(os.path.exists(header)) ++ self.assertTrue(os.path.exists(header)) + first_mtime = os.stat(header).st_mtime + + os.utime(header, (UNCHANGED, UNCHANGED)) + builder.Run(DummyOpts(), + ['-o', output_dir.GetPath(), '--write-only-new', '0']) +- self.failUnless(os.path.exists(header)) ++ self.assertTrue(os.path.exists(header)) + second_mtime = os.stat(header).st_mtime + + os.utime(header, (UNCHANGED, UNCHANGED)) + builder.Run(DummyOpts(), + ['-o', output_dir.GetPath(), '--write-only-new', '1']) +- self.failUnless(os.path.exists(header)) ++ self.assertTrue(os.path.exists(header)) + third_mtime = os.stat(header).st_mtime + + self.assertTrue(abs(second_mtime - UNCHANGED) > 5) +@@ -288,7 +287,7 @@ class BuildUnittest(unittest.TestCase): + def testGenerateDepFileWithDependOnStamp(self): + output_dir = util.TempDir({}) + builder = build.RcBuilder() +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = util.PathFromRoot('grit/testdata/substitute.grd') + self.verbose = False +@@ -303,7 +302,7 @@ class BuildUnittest(unittest.TestCase): + '--depdir', output_dir.GetPath(), + '--depfile', expected_dep_file, + '--depend-on-stamp']) +- self.failUnless(os.path.isfile(expected_stamp_file)) ++ self.assertTrue(os.path.isfile(expected_stamp_file)) + first_mtime = os.stat(expected_stamp_file).st_mtime + + # Reset mtime to very old. +@@ -314,21 +313,21 @@ class BuildUnittest(unittest.TestCase): + '--depdir', output_dir.GetPath(), + '--depfile', expected_dep_file, + '--depend-on-stamp']) +- self.failUnless(os.path.isfile(expected_stamp_file)) ++ self.assertTrue(os.path.isfile(expected_stamp_file)) + second_mtime = os.stat(expected_stamp_file).st_mtime + + # Some OS have a 2s stat resolution window, so can't do a direct comparison. + self.assertTrue((second_mtime - OLDTIME) > 5) + self.assertTrue(abs(second_mtime - first_mtime) < 5) + +- self.failUnless(os.path.isfile(expected_dep_file)) ++ self.assertTrue(os.path.isfile(expected_dep_file)) + with open(expected_dep_file) as f: + line = f.readline() + (dep_output_file, deps_string) = line.split(': ') + deps = deps_string.split(' ') + +- self.failUnlessEqual(expected_stamp_file_name, dep_output_file) +- self.failUnlessEqual(deps, [ ++ self.assertEqual(expected_stamp_file_name, dep_output_file) ++ self.assertEqual(deps, [ + util.PathFromRoot('grit/testdata/substitute.xmb'), + ]) + output_dir.CleanUp() +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/buildinfo.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/buildinfo.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/buildinfo.py +@@ -5,7 +5,6 @@ + """Output the list of files to be generated by GRIT from an input. + """ + +-from __future__ import print_function + + import getopt + import os +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/buildinfo_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/buildinfo_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/buildinfo_unittest.py +@@ -40,7 +40,7 @@ class BuildInfoUnittest(unittest.TestCas + """Find all of the inputs and outputs for a GRD file.""" + info_object = buildinfo.DetermineBuildInfo() + +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = '../grit/testdata/buildinfo.grd' + self.print_header = False +@@ -48,23 +48,23 @@ class BuildInfoUnittest(unittest.TestCas + self.extra_verbose = False + info_object.Run(DummyOpts(), []) + output = self.buf.getvalue().replace('\\', '/') +- self.failUnless(output.count(r'rc_all|sv_sidebar_loading.html')) +- self.failUnless(output.count(r'rc_header|resource.h')) +- self.failUnless(output.count(r'rc_all|en_generated_resources.rc')) +- self.failUnless(output.count(r'rc_all|sv_generated_resources.rc')) +- self.failUnless(output.count(r'input|../grit/testdata/substitute.xmb')) +- self.failUnless(output.count(r'input|../grit/testdata/pr.bmp')) +- self.failUnless(output.count(r'input|../grit/testdata/pr2.bmp')) +- self.failUnless( ++ self.assertTrue(output.count(r'rc_all|sv_sidebar_loading.html')) ++ self.assertTrue(output.count(r'rc_header|resource.h')) ++ self.assertTrue(output.count(r'rc_all|en_generated_resources.rc')) ++ self.assertTrue(output.count(r'rc_all|sv_generated_resources.rc')) ++ self.assertTrue(output.count(r'input|../grit/testdata/substitute.xmb')) ++ self.assertTrue(output.count(r'input|../grit/testdata/pr.bmp')) ++ self.assertTrue(output.count(r'input|../grit/testdata/pr2.bmp')) ++ self.assertTrue( + output.count(r'input|../grit/testdata/sidebar_loading.html')) +- self.failUnless(output.count(r'input|../grit/testdata/transl.rc')) +- self.failUnless(output.count(r'input|../grit/testdata/transl1.rc')) ++ self.assertTrue(output.count(r'input|../grit/testdata/transl.rc')) ++ self.assertTrue(output.count(r'input|../grit/testdata/transl1.rc')) + + def testBuildOutputWithDir(self): + """Find all the inputs and outputs for a GRD file with an output dir.""" + info_object = buildinfo.DetermineBuildInfo() + +- class DummyOpts(object): ++ class DummyOpts: + def __init__(self): + self.input = '../grit/testdata/buildinfo.grd' + self.print_header = False +@@ -72,17 +72,17 @@ class BuildInfoUnittest(unittest.TestCas + self.extra_verbose = False + info_object.Run(DummyOpts(), ['-o', '../grit/testdata']) + output = self.buf.getvalue().replace('\\', '/') +- self.failUnless( ++ self.assertTrue( + output.count(r'rc_all|../grit/testdata/sv_sidebar_loading.html')) +- self.failUnless(output.count(r'rc_header|../grit/testdata/resource.h')) +- self.failUnless( ++ self.assertTrue(output.count(r'rc_header|../grit/testdata/resource.h')) ++ self.assertTrue( + output.count(r'rc_all|../grit/testdata/en_generated_resources.rc')) +- self.failUnless( ++ self.assertTrue( + output.count(r'rc_all|../grit/testdata/sv_generated_resources.rc')) +- self.failUnless(output.count(r'input|../grit/testdata/substitute.xmb')) +- self.failUnlessEqual(0, ++ self.assertTrue(output.count(r'input|../grit/testdata/substitute.xmb')) ++ self.assertEqual(0, + output.count(r'rc_all|../grit/testdata/sv_welcome_toast.html')) +- self.failUnless( ++ self.assertTrue( + output.count(r'rc_all|../grit/testdata/en_welcome_toast.html')) + + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/count.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/count.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/count.py +@@ -4,7 +4,6 @@ + + '''Count number of occurrences of a given message ID.''' + +-from __future__ import print_function + + import getopt + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/diff_structures.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/diff_structures.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/diff_structures.py +@@ -5,7 +5,6 @@ + '''The 'grit sdiff' tool. + ''' + +-from __future__ import print_function + + import os + import getopt +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/diff_structures_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/diff_structures_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/diff_structures_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for the 'grit newgrd' tool.''' + +-from __future__ import print_function + + import os + import sys +@@ -17,7 +16,7 @@ import unittest + from grit.tool import diff_structures + + +-class DummyOpts(object): ++class DummyOpts: + """Options needed by NewGrd.""" + + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/interface.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/interface.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/interface.py +@@ -5,9 +5,8 @@ + '''Base class and interface for tools. + ''' + +-from __future__ import print_function + +-class Tool(object): ++class Tool: + '''Base class for all tools. Tools should use their docstring (i.e. the + class-level docstring) for the help they want to have printed when they + are invoked.''' +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/menu_from_parts.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/menu_from_parts.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/menu_from_parts.py +@@ -4,7 +4,6 @@ + + '''The 'grit menufromparts' tool.''' + +-from __future__ import print_function + + import six + +@@ -61,7 +60,7 @@ to being one message for the whole menu. + + contents = message.GetContent() + for part in contents: +- if isinstance(part, six.string_types): ++ if isinstance(part, str): + id = grit.extern.tclib.GenerateMessageId(part) + if id not in xtb: + print("WARNING didn't find all translations for menu %s" % +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/newgrd.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/newgrd.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/newgrd.py +@@ -5,7 +5,6 @@ + '''Tool to create a new, empty .grd file with all the basic sections. + ''' + +-from __future__ import print_function + + import getopt + import sys +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/newgrd_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/newgrd_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/newgrd_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for the 'grit newgrd' tool.''' + +-from __future__ import print_function + + import os + import sys +@@ -18,7 +17,7 @@ from grit import util + from grit.tool import newgrd + + +-class DummyOpts(object): ++class DummyOpts: + """Options needed by NewGrd.""" + + +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/postprocess_interface.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/postprocess_interface.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/postprocess_interface.py +@@ -5,9 +5,8 @@ + ''' Base class for postprocessing of RC files. + ''' + +-from __future__ import print_function + +-class PostProcessor(object): ++class PostProcessor: + ''' Base class for postprocessing of the RC file data before being + output through the RC2GRD tool. You should implement this class if + you want GRIT to do specific things to the RC files after it has +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/postprocess_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/postprocess_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/postprocess_unittest.py +@@ -8,7 +8,6 @@ + modify the grd data tree, changing the message name attributes. + ''' + +-from __future__ import print_function + + import os + import re +@@ -33,16 +32,16 @@ BEGIN + END + ''' + tool = rc2grd.Rc2Grd() +- class DummyOpts(object): ++ class DummyOpts: + verbose = False + extra_verbose = False + tool.o = DummyOpts() + tool.post_process = 'grit.tool.postprocess_unittest.DummyPostProcessor' + result = tool.Process(rctext, '.\resource.rc') + +- self.failUnless( ++ self.assertTrue( + result.children[2].children[2].children[0].attrs['name'] == 'SMART_STRING_1') +- self.failUnless( ++ self.assertTrue( + result.children[2].children[2].children[1].attrs['name'] == 'SMART_STRING_2') + + class DummyPostProcessor(grit.tool.postprocess_interface.PostProcessor): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/preprocess_interface.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/preprocess_interface.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/preprocess_interface.py +@@ -5,9 +5,8 @@ + ''' Base class for preprocessing of RC files. + ''' + +-from __future__ import print_function + +-class PreProcessor(object): ++class PreProcessor: + ''' Base class for preprocessing of the RC file data before being + output through the RC2GRD tool. You should implement this class if + you have specific constructs in your RC files that GRIT cannot handle.''' +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/preprocess_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/preprocess_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/preprocess_unittest.py +@@ -8,7 +8,6 @@ + provide the actual rctext data. + ''' + +-from __future__ import print_function + + import os + import sys +@@ -25,14 +24,14 @@ class PreProcessingUnittest(unittest.Tes + + def testPreProcessing(self): + tool = rc2grd.Rc2Grd() +- class DummyOpts(object): ++ class DummyOpts: + verbose = False + extra_verbose = False + tool.o = DummyOpts() + tool.pre_process = 'grit.tool.preprocess_unittest.DummyPreProcessor' + result = tool.Process('', '.\resource.rc') + +- self.failUnless( ++ self.assertTrue( + result.children[2].children[2].children[0].attrs['name'] == 'DUMMY_STRING_1') + + class DummyPreProcessor(grit.tool.preprocess_interface.PreProcessor): +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/rc2grd.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/rc2grd.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/rc2grd.py +@@ -4,7 +4,6 @@ + + '''The 'grit rc2grd' tool.''' + +-from __future__ import print_function + + import os.path + import getopt +@@ -12,7 +11,7 @@ import re + import sys + + import six +-from six import StringIO ++from io import StringIO + + import grit.node.empty + from grit.node import include +@@ -201,7 +200,7 @@ C preprocessor on the .rc file or manual + os.path.splitext(os.path.basename(path))[0] + '.grd') + + rctext = util.ReadFile(path, self.input_encoding) +- grd_text = six.text_type(self.Process(rctext, path)) ++ grd_text = str(self.Process(rctext, path)) + with util.WrapOutputStream(open(out_path, 'wb'), 'utf-8') as outfile: + outfile.write(grd_text) + +@@ -341,7 +340,7 @@ C preprocessor on the .rc file or manual + # Messages that contain only placeholders do not need translation. + is_translateable = False + for item in msg_obj.GetContent(): +- if isinstance(item, six.string_types): ++ if isinstance(item, str): + if not _WHITESPACE_ONLY.match(item): + is_translateable = True + +@@ -389,7 +388,7 @@ C preprocessor on the .rc file or manual + # TODO(joi) Allow use of non-TotalRecall flavors of HTML placeholderizing + msg = tr_html.HtmlToMessage(text, True) + for item in msg.GetContent(): +- if not isinstance(item, six.string_types): ++ if not isinstance(item, str): + return msg # Contained at least one placeholder, so we're done + + # HTML placeholderization didn't do anything, so try to find printf or +Index: qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/rc2grd_unittest.py +=================================================================== +--- qt6-webengine.orig/src/3rdparty/chromium/tools/grit/grit/tool/rc2grd_unittest.py ++++ qt6-webengine/src/3rdparty/chromium/tools/grit/grit/tool/rc2grd_unittest.py +@@ -5,7 +5,6 @@ + + '''Unit tests for grit.tool.rc2grd''' + +-from __future__ import print_function + + import os + import sys +@@ -15,7 +14,7 @@ if __name__ == '__main__': + import re + import unittest + +-from six import StringIO ++from io import StringIO + + from grit import grd_reader + from grit import util +@@ -28,16 +27,16 @@ class Rc2GrdUnittest(unittest.TestCase): + tool = rc2grd.Rc2Grd() + original = "Hello %s, how are you? I'm $1 years old!" + msg = tool.Placeholderize(original) +- self.failUnless(msg.GetPresentableContent() == "Hello TODO_0001, how are you? I'm TODO_0002 years old!") +- self.failUnless(msg.GetRealContent() == original) ++ self.assertTrue(msg.GetPresentableContent() == "Hello TODO_0001, how are you? I'm TODO_0002 years old!") ++ self.assertTrue(msg.GetRealContent() == original) + + def testHtmlPlaceholderize(self): + tool = rc2grd.Rc2Grd() + original = "Hello [USERNAME], how are you? I'm [AGE] years old!" + msg = tool.Placeholderize(original) +- self.failUnless(msg.GetPresentableContent() == ++ self.assertTrue(msg.GetPresentableContent() == + "Hello BEGIN_BOLDX_USERNAME_XEND_BOLD, how are you? I'm X_AGE_X years old!") +- self.failUnless(msg.GetRealContent() == original) ++ self.assertTrue(msg.GetRealContent() == original) + + def testMenuWithoutWhitespaceRegression(self): + # There was a problem in the original regular expression for parsing out +@@ -62,7 +61,7 @@ BEGIN + END + + ''' +- self.failUnless(len(rc2grd._MENU.findall(two_menus)) == 2) ++ self.assertTrue(len(rc2grd._MENU.findall(two_menus)) == 2) + + def testRegressionScriptWithTranslateable(self): + tool = rc2grd.Rc2Grd() +@@ -78,11 +77,11 @@ END + + rc_text = '''STRINGTABLE\nBEGIN\nID_BINGO ""\nEND\n''' + tool.AddMessages(rc_text, tool.o) +- self.failUnless(tool.o.node.GetCdata().find('Set As Homepage') != -1) ++ self.assertTrue(tool.o.node.GetCdata().find('Set As Homepage') != -1) + + # TODO(joi) Improve the HTML parser to support translateables inside + #