5a3ba38
--- a/dom/base/usecounters.py.python-open-U	2022-06-28 04:37:00.000000000 +0200
5a3ba38
+++ b/dom/base/usecounters.py	2022-07-11 19:17:46.266517761 +0200
5a3ba38
@@ -8,7 +8,7 @@ import re
5a3ba38
 
5a3ba38
 def read_conf(conf_filename):
5a3ba38
     # Can't read/write from a single StringIO, so make a new one for reading.
5a3ba38
-    stream = open(conf_filename, "rU")
5a3ba38
+    stream = open(conf_filename, "r")
5a3ba38
 
5a3ba38
     def parse_counters(stream):
5a3ba38
         for line_num, line in enumerate(stream):
5a3ba38
--- a/python/mozbuild/mozbuild/action/process_define_files.py.python-open-U	2022-06-28 04:37:39.000000000 +0200
5a3ba38
+++ b/python/mozbuild/mozbuild/action/process_define_files.py	2022-07-11 19:18:24.056417112 +0200
5a3ba38
@@ -36,7 +36,7 @@ def process_define_file(output, input):
5a3ba38
     ) and not config.substs.get("JS_STANDALONE"):
5a3ba38
         config = PartialConfigEnvironment(mozpath.join(topobjdir, "js", "src"))
5a3ba38
 
5a3ba38
-    with open(path, "rU") as input:
5a3ba38
+    with open(path, "r") as input:
5a3ba38
         r = re.compile(
5a3ba38
             "^\s*#\s*(?P<cmd>[a-z]+)(?:\s+(?P<name>\S+)(?:\s+(?P<value>\S+))?)?", re.U
5a3ba38
         )
5a3ba38
--- a/python/mozbuild/mozbuild/backend/base.py.python-open-U	2022-06-28 04:37:39.000000000 +0200
5a3ba38
+++ b/python/mozbuild/mozbuild/backend/base.py	2022-07-11 19:18:34.165390187 +0200
5a3ba38
@@ -272,7 +272,7 @@ class BuildBackend(LoggingMixin):
5a3ba38
         return status
5a3ba38
 
5a3ba38
     @contextmanager
5a3ba38
-    def _write_file(self, path=None, fh=None, readmode="rU"):
5a3ba38
+    def _write_file(self, path=None, fh=None, readmode="r"):
5a3ba38
         """Context manager to write a file.
5a3ba38
 
5a3ba38
         This is a glorified wrapper around FileAvoidWrite with integration to
5a3ba38
--- a/python/mozbuild/mozbuild/preprocessor.py.python-open-U	2022-06-28 04:37:20.000000000 +0200
5a3ba38
+++ b/python/mozbuild/mozbuild/preprocessor.py	2022-07-11 19:19:30.677239685 +0200
5a3ba38
@@ -531,7 +531,7 @@ class Preprocessor:
5a3ba38
 
5a3ba38
         if args:
5a3ba38
             for f in args:
5a3ba38
-                with io.open(f, "rU", encoding="utf-8") as input:
5a3ba38
+                with io.open(f, "r", encoding="utf-8") as input:
5a3ba38
                     self.processFile(input=input, output=out)
5a3ba38
             if depfile:
5a3ba38
                 mk = Makefile()
5a3ba38
@@ -860,7 +860,7 @@ class Preprocessor:
5a3ba38
                     args = self.applyFilters(args)
5a3ba38
                 if not os.path.isabs(args):
5a3ba38
                     args = os.path.join(self.curdir, args)
5a3ba38
-                args = io.open(args, "rU", encoding="utf-8")
5a3ba38
+                args = io.open(args, "r", encoding="utf-8")
5a3ba38
             except Preprocessor.Error:
5a3ba38
                 raise
5a3ba38
             except Exception:
5a3ba38
@@ -914,7 +914,7 @@ class Preprocessor:
5a3ba38
 def preprocess(includes=[sys.stdin], defines={}, output=sys.stdout, marker="#"):
5a3ba38
     pp = Preprocessor(defines=defines, marker=marker)
5a3ba38
     for f in includes:
5a3ba38
-        with io.open(f, "rU", encoding="utf-8") as input:
5a3ba38
+        with io.open(f, "r", encoding="utf-8") as input:
5a3ba38
             pp.processFile(input=input, output=output)
5a3ba38
     return pp.includes
5a3ba38
 
5a3ba38
--- a/python/mozbuild/mozbuild/util.py.python-open-U	2022-06-28 04:37:40.000000000 +0200
5a3ba38
+++ b/python/mozbuild/mozbuild/util.py	2022-07-11 19:19:19.903268374 +0200
5a3ba38
@@ -225,7 +225,7 @@ class FileAvoidWrite(BytesIO):
5a3ba38
     still occur, as well as diff capture if requested.
5a3ba38
     """
5a3ba38
 
5a3ba38
-    def __init__(self, filename, capture_diff=False, dry_run=False, readmode="rU"):
5a3ba38
+    def __init__(self, filename, capture_diff=False, dry_run=False, readmode="r"):
5a3ba38
         BytesIO.__init__(self)
5a3ba38
         self.name = filename
5a3ba38
         assert type(capture_diff) == bool
5a3ba38
--- a/python/mozbuild/mozpack/files.py.python-open-U	2022-06-28 04:37:40.000000000 +0200
5a3ba38
+++ b/python/mozbuild/mozpack/files.py	2022-07-11 19:19:40.372213866 +0200
5a3ba38
@@ -574,7 +574,7 @@ class PreprocessedFile(BaseFile):
5a3ba38
         pp = Preprocessor(defines=self.defines, marker=self.marker)
5a3ba38
         pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings)
5a3ba38
 
5a3ba38
-        with _open(self.path, "rU") as input:
5a3ba38
+        with _open(self.path, "r") as input:
5a3ba38
             with _open(os.devnull, "w") as output:
5a3ba38
                 pp.processFile(input=input, output=output)
5a3ba38
 
5a3ba38
@@ -631,7 +631,7 @@ class PreprocessedFile(BaseFile):
5a3ba38
         pp = Preprocessor(defines=self.defines, marker=self.marker)
5a3ba38
         pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings)
5a3ba38
 
5a3ba38
-        with _open(self.path, "rU") as input:
5a3ba38
+        with _open(self.path, "r") as input:
5a3ba38
             pp.processFile(input=input, output=dest, depfile=deps_out)
5a3ba38
 
5a3ba38
         dest.close()