File seamonkey-py31-rU-fix.patch of Package seamonkey

diff -ruN seamonkey-2.53.16.webrtcfix/build/pymake/mkformat.py seamonkey-2.53.16.py31-rU-fix/build/pymake/mkformat.py
--- seamonkey-2.53.16.webrtcfix/build/pymake/mkformat.py	2020-02-17 18:37:47.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/build/pymake/mkformat.py	2023-07-09 16:01:46.560610755 -0400
@@ -6,7 +6,7 @@
 filename = sys.argv[1]
 source = None
 
-with open(filename, 'rU') as fh:
+with open(filename, 'r') as fh:
     source = fh.read()
 
 statements = pymake.parser.parsestring(source, filename)
diff -ruN seamonkey-2.53.16.webrtcfix/build/pymake/mkparse.py seamonkey-2.53.16.py31-rU-fix/build/pymake/mkparse.py
--- seamonkey-2.53.16.webrtcfix/build/pymake/mkparse.py	2020-02-17 18:37:47.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/build/pymake/mkparse.py	2023-07-09 16:01:49.256714683 -0400
@@ -5,7 +5,7 @@
 
 for f in sys.argv[1:]:
     print "Parsing %s" % f
-    fd = open(f, 'rU')
+    fd = open(f, 'r')
     s = fd.read()
     fd.close()
     stmts = pymake.parser.parsestring(s, f)
diff -ruN seamonkey-2.53.16.webrtcfix/build/pymake/pymake/parser.py seamonkey-2.53.16.py31-rU-fix/build/pymake/pymake/parser.py
--- seamonkey-2.53.16.webrtcfix/build/pymake/pymake/parser.py	2020-02-17 18:37:47.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/build/pymake/pymake/parser.py	2023-07-09 16:04:33.487045545 -0400
@@ -347,7 +347,7 @@
 _varsettokens = (':=', '+=', '?=', '=')
 
 def _parsefile(pathname):
-    fd = open(pathname, "rU")
+    fd = open(pathname, 'r')
     stmts = parsestring(fd.read(), pathname)
     stmts.mtime = os.fstat(fd.fileno()).st_mtime
     fd.close()
diff -ruN seamonkey-2.53.16.webrtcfix/build/pymake/tests/formattingtests.py seamonkey-2.53.16.py31-rU-fix/build/pymake/tests/formattingtests.py
--- seamonkey-2.53.16.webrtcfix/build/pymake/tests/formattingtests.py	2020-02-17 18:37:47.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/build/pymake/tests/formattingtests.py	2023-07-09 16:01:54.376912066 -0400
@@ -253,7 +253,7 @@
                 continue
 
             source = None
-            with open(makefile, 'rU') as fh:
+            with open(makefile, 'r') as fh:
                 source = fh.read()
 
             try:
diff -ruN seamonkey-2.53.16.webrtcfix/dom/base/usecounters.py seamonkey-2.53.16.py31-rU-fix/dom/base/usecounters.py
--- seamonkey-2.53.16.webrtcfix/dom/base/usecounters.py	2021-05-25 14:33:36.000000000 -0400
+++ seamonkey-2.53.16.py31-rU-fix/dom/base/usecounters.py	2023-07-09 16:01:30.856005369 -0400
@@ -10,7 +10,7 @@
 
 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):
diff -ruN seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/action/process_define_files.py seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/action/process_define_files.py
--- seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/action/process_define_files.py	2022-08-24 15:55:13.000000000 -0400
+++ seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/action/process_define_files.py	2023-07-09 16:02:26.918166488 -0400
@@ -36,7 +36,7 @@
             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)
         for l in input:
             m = r.match(l)
diff -ruN seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/backend/base.py seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/backend/base.py
--- seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/backend/base.py	2022-08-24 15:55:13.000000000 -0400
+++ seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/backend/base.py	2023-07-09 16:01:59.469108364 -0400
@@ -265,7 +265,7 @@
         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
diff -ruN seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/preprocessor.py seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/preprocessor.py
--- seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/preprocessor.py	2023-02-25 16:24:30.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/preprocessor.py	2023-07-09 16:02:12.405607047 -0400
@@ -517,7 +517,7 @@
 
         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()
@@ -806,7 +806,7 @@
                     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:
@@ -861,7 +861,7 @@
     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
 
diff -ruN seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/util.py seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/util.py
--- seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/util.py	2023-02-25 16:24:30.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/util.py	2023-07-09 16:02:16.837777900 -0400
@@ -227,7 +227,7 @@
     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
diff -ruN seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/virtualenv.py seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/virtualenv.py
--- seamonkey-2.53.16.webrtcfix/python/mozbuild/mozbuild/virtualenv.py	2023-02-25 16:24:30.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozbuild/virtualenv.py	2023-07-09 16:02:03.749273357 -0400
@@ -255,7 +255,7 @@
         return self.virtualenv_root
 
     def packages(self):
-        mode = 'rU' if PY2 else 'r'
+        mode = 'r' if PY2 else 'r'
         with open(self.manifest_path, mode) as fh:
             packages = [line.rstrip().split(':')
                         for line in fh]
diff -ruN seamonkey-2.53.16.webrtcfix/python/mozbuild/mozpack/files.py seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozpack/files.py
--- seamonkey-2.53.16.webrtcfix/python/mozbuild/mozpack/files.py	2022-08-24 15:55:13.000000000 -0400
+++ seamonkey-2.53.16.py31-rU-fix/python/mozbuild/mozpack/files.py	2023-07-09 16:02:32.770392081 -0400
@@ -522,7 +522,7 @@
         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)
 
@@ -578,7 +578,7 @@
         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()
diff -ruN seamonkey-2.53.16.webrtcfix/testing/mozharness/external_tools/virtualenv/site.py seamonkey-2.53.16.py31-rU-fix/testing/mozharness/external_tools/virtualenv/site.py
--- seamonkey-2.53.16.webrtcfix/testing/mozharness/external_tools/virtualenv/site.py	2020-02-17 18:38:04.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/testing/mozharness/external_tools/virtualenv/site.py	2023-07-09 16:03:38.368920820 -0400
@@ -163,7 +163,7 @@
         reset = 0
     fullname = os.path.join(sitedir, name)
     try:
-        f = open(fullname, "rU")
+        f = open(fullname, 'r')
     except IOError:
         return
     try:
@@ -427,7 +427,7 @@
             for filename in self.__files:
                 filename = os.path.join(dir, filename)
                 try:
-                    fp = open(filename, "rU")
+                    fp = open(filename, 'r')
                     data = fp.read()
                     fp.close()
                     break
diff -ruN seamonkey-2.53.16.webrtcfix/testing/mozharness/external_tools/virtualenv/virtualenv_embedded/site.py seamonkey-2.53.16.py31-rU-fix/testing/mozharness/external_tools/virtualenv/virtualenv_embedded/site.py
--- seamonkey-2.53.16.webrtcfix/testing/mozharness/external_tools/virtualenv/virtualenv_embedded/site.py	2020-02-17 18:38:04.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/testing/mozharness/external_tools/virtualenv/virtualenv_embedded/site.py	2023-07-09 16:03:26.652469158 -0400
@@ -162,7 +162,7 @@
         reset = 0
     fullname = os.path.join(sitedir, name)
     try:
-        f = open(fullname, "rU")
+        f = open(fullname, 'r')
     except IOError:
         return
     try:
@@ -426,7 +426,7 @@
             for filename in self.__files:
                 filename = os.path.join(dir, filename)
                 try:
-                    fp = open(filename, "rU")
+                    fp = open(filename, 'r')
                     data = fp.read()
                     fp.close()
                     break
diff -ruN seamonkey-2.53.16.webrtcfix/testing/web-platform/tests/tools/py/py/_path/common.py seamonkey-2.53.16.py31-rU-fix/testing/web-platform/tests/tools/py/py/_path/common.py
--- seamonkey-2.53.16.webrtcfix/testing/web-platform/tests/tools/py/py/_path/common.py	2020-02-17 18:38:55.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/testing/web-platform/tests/tools/py/py/_path/common.py	2023-07-09 16:01:38.196288326 -0400
@@ -136,10 +136,10 @@
         """ read and return a list of lines from the path. if cr is False, the
 newline will be removed from the end of each line. """
         if not cr:
-            content = self.read('rU')
+            content = self.read('r')
             return content.split('\n')
         else:
-            f = self.open('rU')
+            f = self.open('r')
             try:
                 return f.readlines()
             finally:
diff -ruN seamonkey-2.53.16.webrtcfix/testing/web-platform/tests/tools/py/py/_path/svnurl.py seamonkey-2.53.16.py31-rU-fix/testing/web-platform/tests/tools/py/py/_path/svnurl.py
--- seamonkey-2.53.16.webrtcfix/testing/web-platform/tests/tools/py/py/_path/svnurl.py	2020-02-17 18:38:55.000000000 -0500
+++ seamonkey-2.53.16.py31-rU-fix/testing/web-platform/tests/tools/py/py/_path/svnurl.py	2023-07-09 16:04:08.554084415 -0400
@@ -97,7 +97,7 @@
 
     def open(self, mode='r'):
         """ return an opened file with the given mode. """
-        if mode not in ("r", "rU",):
+        if mode not in ("r", "r",):
             raise ValueError("mode %r not supported" % (mode,))
         assert self.check(file=1) # svn cat returns an empty file otherwise
         if self.rev is None:
diff -ruN seamonkey-2.53.16.webrtcfix/third_party/python/py/py/_path/common.py seamonkey-2.53.16.py31-rU-fix/third_party/python/py/py/_path/common.py
--- seamonkey-2.53.16.webrtcfix/third_party/python/py/py/_path/common.py	2022-06-08 15:10:29.000000000 -0400
+++ seamonkey-2.53.16.py31-rU-fix/third_party/python/py/py/_path/common.py	2023-07-09 16:01:43.448490789 -0400
@@ -174,7 +174,7 @@
         """ read and return a list of lines from the path. if cr is False, the
 newline will be removed from the end of each line. """
         if sys.version_info < (3, ):
-            mode = 'rU'
+            mode = 'r'
         else:  # python 3 deprecates mode "U" in favor of "newline" option
             mode = 'r'
 
diff -ruN seamonkey-2.53.16.webrtcfix/third_party/python/py/py/_path/svnurl.py seamonkey-2.53.16.py31-rU-fix/third_party/python/py/py/_path/svnurl.py
--- seamonkey-2.53.16.webrtcfix/third_party/python/py/py/_path/svnurl.py	2022-06-08 15:10:29.000000000 -0400
+++ seamonkey-2.53.16.py31-rU-fix/third_party/python/py/py/_path/svnurl.py	2023-07-09 16:04:19.094490732 -0400
@@ -97,7 +97,7 @@
 
     def open(self, mode='r'):
         """ return an opened file with the given mode. """
-        if mode not in ("r", "rU",):
+        if mode not in ("r", "r",):
             raise ValueError("mode %r not supported" % (mode,))
         assert self.check(file=1) # svn cat returns an empty file otherwise
         if self.rev is None:
openSUSE Build Service is sponsored by