summaryrefslogtreecommitdiff
path: root/user/firefox-esr/python3.11-open-U.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-11-28 11:31:15 -0600
committerZach van Rijn <me@zv.io>2022-11-28 11:31:15 -0600
commitc96819aba9bf7406b3b62579844e0551b7e9a0ba (patch)
tree2b7f579fb65f86248fc70c4d1f03c62ae9a48e9e /user/firefox-esr/python3.11-open-U.patch
parentc8e268a63882a9cdeb48d5e2f0e030e14a50e57d (diff)
downloadpackages-c96819aba9bf7406b3b62579844e0551b7e9a0ba.tar.gz
packages-c96819aba9bf7406b3b62579844e0551b7e9a0ba.tar.bz2
packages-c96819aba9bf7406b3b62579844e0551b7e9a0ba.tar.xz
packages-c96819aba9bf7406b3b62579844e0551b7e9a0ba.zip
user/firefox-esr: add patches for python 3.11. fixes #901.
Diffstat (limited to 'user/firefox-esr/python3.11-open-U.patch')
-rw-r--r--user/firefox-esr/python3.11-open-U.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/user/firefox-esr/python3.11-open-U.patch b/user/firefox-esr/python3.11-open-U.patch
new file mode 100644
index 000000000..8cbab9c0a
--- /dev/null
+++ b/user/firefox-esr/python3.11-open-U.patch
@@ -0,0 +1,102 @@
+--- thunderbird-91.11.0/dom/base/usecounters.py.python-open-U 2022-06-28 04:37:00.000000000 +0200
++++ thunderbird-91.11.0/dom/base/usecounters.py 2022-07-11 19:17:46.266517761 +0200
+@@ -8,7 +8,7 @@ import re
+
+ def read_conf(conf_filename):
+ # Can't read/write from a single StringIO, so make a new one for reading.
+- stream = open(conf_filename, "rU")
++ stream = open(conf_filename, "r")
+
+ def parse_counters(stream):
+ for line_num, line in enumerate(stream):
+--- thunderbird-91.11.0/python/mozbuild/mozbuild/action/process_define_files.py.python-open-U 2022-06-28 04:37:39.000000000 +0200
++++ thunderbird-91.11.0/python/mozbuild/mozbuild/action/process_define_files.py 2022-07-11 19:18:24.056417112 +0200
+@@ -36,7 +36,7 @@ def process_define_file(output, input):
+ ) and not config.substs.get("JS_STANDALONE"):
+ config = PartialConfigEnvironment(mozpath.join(topobjdir, "js", "src"))
+
+- with open(path, "rU") as input:
++ with open(path, "r") as input:
+ r = re.compile(
+ "^\s*#\s*(?P<cmd>[a-z]+)(?:\s+(?P<name>\S+)(?:\s+(?P<value>\S+))?)?", re.U
+ )
+--- thunderbird-91.11.0/python/mozbuild/mozbuild/backend/base.py.python-open-U 2022-06-28 04:37:39.000000000 +0200
++++ thunderbird-91.11.0/python/mozbuild/mozbuild/backend/base.py 2022-07-11 19:18:34.165390187 +0200
+@@ -272,7 +272,7 @@ class BuildBackend(LoggingMixin):
+ return status
+
+ @contextmanager
+- def _write_file(self, path=None, fh=None, readmode="rU"):
++ def _write_file(self, path=None, fh=None, readmode="r"):
+ """Context manager to write a file.
+
+ This is a glorified wrapper around FileAvoidWrite with integration to
+--- thunderbird-91.11.0/python/mozbuild/mozbuild/preprocessor.py.python-open-U 2022-06-28 04:37:20.000000000 +0200
++++ thunderbird-91.11.0/python/mozbuild/mozbuild/preprocessor.py 2022-07-11 19:19:30.677239685 +0200
+@@ -531,7 +531,7 @@ class Preprocessor:
+
+ if args:
+ for f in args:
+- with io.open(f, "rU", encoding="utf-8") as input:
++ with io.open(f, "r", encoding="utf-8") as input:
+ self.processFile(input=input, output=out)
+ if depfile:
+ mk = Makefile()
+@@ -860,7 +860,7 @@ class Preprocessor:
+ args = self.applyFilters(args)
+ if not os.path.isabs(args):
+ args = os.path.join(self.curdir, args)
+- args = io.open(args, "rU", encoding="utf-8")
++ args = io.open(args, "r", encoding="utf-8")
+ except Preprocessor.Error:
+ raise
+ except Exception:
+@@ -914,7 +914,7 @@ class Preprocessor:
+ def preprocess(includes=[sys.stdin], defines={}, output=sys.stdout, marker="#"):
+ pp = Preprocessor(defines=defines, marker=marker)
+ for f in includes:
+- with io.open(f, "rU", encoding="utf-8") as input:
++ with io.open(f, "r", encoding="utf-8") as input:
+ pp.processFile(input=input, output=output)
+ return pp.includes
+
+--- thunderbird-91.11.0/python/mozbuild/mozbuild/util.py.python-open-U 2022-06-28 04:37:40.000000000 +0200
++++ thunderbird-91.11.0/python/mozbuild/mozbuild/util.py 2022-07-11 19:19:19.903268374 +0200
+@@ -225,7 +225,7 @@ class FileAvoidWrite(BytesIO):
+ still occur, as well as diff capture if requested.
+ """
+
+- def __init__(self, filename, capture_diff=False, dry_run=False, readmode="rU"):
++ def __init__(self, filename, capture_diff=False, dry_run=False, readmode="r"):
+ BytesIO.__init__(self)
+ self.name = filename
+ assert type(capture_diff) == bool
+@@ -1447,7 +1447,7 @@ def patch_main():
+
+ def my_get_command_line():
+ with open(
+- os.path.join(os.path.dirname(__file__), "fork_interpose.py"), "rU"
++ os.path.join(os.path.dirname(__file__), "fork_interpose.py"), "r"
+ ) as fork_file:
+ fork_code = fork_file.read()
+ # Add our relevant globals.
+--- thunderbird-91.11.0/python/mozbuild/mozpack/files.py.python-open-U 2022-06-28 04:37:40.000000000 +0200
++++ thunderbird-91.11.0/python/mozbuild/mozpack/files.py 2022-07-11 19:19:40.372213866 +0200
+@@ -574,7 +574,7 @@ class PreprocessedFile(BaseFile):
+ pp = Preprocessor(defines=self.defines, marker=self.marker)
+ pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings)
+
+- with _open(self.path, "rU") as input:
++ with _open(self.path, "r") as input:
+ with _open(os.devnull, "w") as output:
+ pp.processFile(input=input, output=output)
+
+@@ -631,7 +631,7 @@ class PreprocessedFile(BaseFile):
+ pp = Preprocessor(defines=self.defines, marker=self.marker)
+ pp.setSilenceDirectiveWarnings(self.silence_missing_directive_warnings)
+
+- with _open(self.path, "rU") as input:
++ with _open(self.path, "r") as input:
+ pp.processFile(input=input, output=dest, depfile=deps_out)
+
+ dest.close()