public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/chromium] epel9-next: more fixes for python-3.12 issue
@ 2026-08-07 16:05 Than Ngo
0 siblings, 0 replies; 2+ messages in thread
From: Than Ngo @ 2026-08-07 16:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/chromium
Branch : epel9-next
Commit : f3f21ea6f14b3ef7d69fd98fbc411475c137fceb
Author : Than Ngo <than@redhat.com>
Date : 2023-07-22T15:31:48+02:00
Stats : +152/-24 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/chromium/c/f3f21ea6f14b3ef7d69fd98fbc411475c137fceb?branch=epel9-next
Log:
more fixes for python-3.12 issue
---
diff --git a/chromium-115-python-3.12-deprecated.patch b/chromium-115-python-3.12-deprecated.patch
new file mode 100644
index 0000000..9d22f25
--- /dev/null
+++ b/chromium-115-python-3.12-deprecated.patch
@@ -0,0 +1,149 @@
+diff -up chromium-115.0.5790.102/base/write_build_date_header.py.me chromium-115.0.5790.102/base/write_build_date_header.py
+--- chromium-115.0.5790.102/base/write_build_date_header.py.me 2023-07-22 14:23:42.620679397 +0200
++++ chromium-115.0.5790.102/base/write_build_date_header.py 2023-07-22 15:24:46.833310310 +0200
+@@ -17,7 +17,7 @@ def main():
+ args = argument_parser.parse_args()
+
+ date_val = int(args.timestamp)
+- date = datetime.datetime.utcfromtimestamp(date_val)
++ date = datetime.datetime.fromtimestamp(date_val, datetime.timezone.utc)
+ output = ('// Generated by //base/write_build_date_header.py\n'
+ '#ifndef BASE_GENERATED_BUILD_DATE_TIMESTAMP \n'
+ f'#define BASE_GENERATED_BUILD_DATE_TIMESTAMP {date_val}'
+diff -up chromium-115.0.5790.102/build/write_buildflag_header.py.me chromium-115.0.5790.102/build/write_buildflag_header.py
+--- chromium-115.0.5790.102/build/write_buildflag_header.py.me 2023-07-22 14:16:14.196975451 +0200
++++ chromium-115.0.5790.102/build/write_buildflag_header.py 2023-07-22 14:20:24.977239994 +0200
+@@ -44,7 +44,7 @@ def GetOptions():
+ header_guard = cmdline_options.output.upper()
+ if header_guard[0].isdigit():
+ header_guard = '_' + header_guard
+- header_guard = re.sub('[^\w]', '_', header_guard)
++ header_guard = re.sub(r'[^\w]', '_', header_guard)
+ header_guard += '_'
+
+ # The actual output file is inside the gen dir.
+diff -up chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py
+--- chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me 2023-07-22 14:47:34.230764210 +0200
++++ chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py 2023-07-22 15:11:50.360983383 +0200
+@@ -9,7 +9,8 @@
+ """
+ from __future__ import print_function
+ import abc
+-import imp
++import types
++import importlib
+ import optparse
+ import os
+ import re
+@@ -40,6 +41,12 @@ class GoogleProtobufModuleImporter:
+ return filepath
+ return None
+
++ def load_source(name: str, path: str) -> types.ModuleType:
++ spec = importlib.util.spec_from_file_location(name, path)
++ module = importlib.util.module_from_spec(spec)
++ spec.loader.exec_module(module)
++ return module
++
+ def _module_exists(self, fullname):
+ return self._fullname_to_filepath(fullname) is not None
+
+@@ -68,7 +75,7 @@ class GoogleProtobufModuleImporter:
+ raise ImportError(fullname)
+
+ filepath = self._fullname_to_filepath(fullname)
+- return imp.load_source(fullname, filepath)
++ return load_source(fullname, filepath)
+
+ class BinaryProtoGenerator:
+
+diff -up chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py
+--- chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me 2023-07-22 15:17:19.114258801 +0200
++++ chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py 2023-07-22 15:17:43.368200491 +0200
+@@ -32,7 +32,7 @@ def FilterLine(filename, line, output):
+ return
+
+ if line.startswith("goog.provide"):
+- match = re.match("goog.provide\('([^']+)'\);", line)
++ match = re.match(r"goog.provide\('([^']+)'\);", line)
+ if not match:
+ print("Invalid goog.provide line in %s:\n%s" % (filename, line))
+ sys.exit(1)
+diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.me chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py
+--- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.me 2023-07-22 14:10:40.372979365 +0200
++++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-07-22 14:13:31.200453442 +0200
+@@ -2,7 +2,6 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
+-import imp
+ import os.path
+ import sys
+
+diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py
+--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me 2023-07-22 15:12:41.850895179 +0200
++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py 2023-07-22 15:12:55.844871207 +0200
+@@ -18,7 +18,7 @@ class HTMLGenerationController(object):
+
+ def GetHTMLForInlineStylesheet(self, contents):
+ if self.current_module is None:
+- if re.search('url\(.+\)', contents):
++ if re.search(r'url\(.+\)', contents):
+ raise Exception(
+ 'Default HTMLGenerationController cannot handle inline style urls')
+ return contents
+diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py
+--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me 2023-07-22 15:14:06.923717910 +0200
++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py 2023-07-22 15:18:03.704150614 +0200
+@@ -4,4 +4,4 @@
+
+
+ def EscapeJSIfNeeded(js):
+- return js.replace('</script>', '<\/script>')
++ return js.replace(r'</script>', r'<\/script>')
+diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py
+--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me 2023-07-22 15:14:30.105662532 +0200
++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py 2023-07-22 15:14:57.977595950 +0200
+@@ -293,6 +293,6 @@ class HTMLModuleParser():
+ html = ''
+ else:
+ if html.find('< /script>') != -1:
+- raise Exception('Escape script tags with <\/script>')
++ raise Exception(r'Escape script tags with <\/script>')
+
+ return HTMLModuleParserResults(html)
+diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py
+--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me 2023-07-22 15:13:12.316842990 +0200
++++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py 2023-07-22 15:13:49.684759091 +0200
+@@ -60,7 +60,7 @@ class ParsedStyleSheet(object):
+ return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8'))
+
+ # I'm assuming we only have url()'s associated with images
+- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
++ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
+ InlineUrl, self.contents)
+
+ def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
+@@ -72,7 +72,7 @@ class ParsedStyleSheet(object):
+ raise Exception('@imports are not supported')
+
+ matches = re.findall(
+- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
++ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
+ self.contents)
+
+ def resolve_url(url):
+diff -up chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py
+--- chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me 2023-07-22 15:11:56.826972306 +0200
++++ chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py 2023-07-22 15:12:37.550902545 +0200
+@@ -119,8 +119,8 @@ class _PreprocessingLoader(jinja2.BaseLo
+ source = self.preprocess(f.read())
+ return source, path, lambda: mtime == os.path.getmtime(path)
+
+- blockstart = re.compile('{%-?\s*(if|elif|else|for|block|macro)[^}]*%}')
+- blockend = re.compile('{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}')
++ blockstart = re.compile(r'{%-?\s*(if|elif|else|for|block|macro)[^}]*%}')
++ blockend = re.compile(r'{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}')
+
+ def preprocess(self, source):
+ lines = source.split('\n')
diff --git a/chromium-115-python-imp-deprecated.patch b/chromium-115-python-imp-deprecated.patch
deleted file mode 100644
index ee318d7..0000000
--- a/chromium-115-python-imp-deprecated.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py.me chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py
---- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py.me 2023-07-22 13:48:01.726074705 +0200
-+++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py 2023-07-22 13:50:50.886575507 +0200
-@@ -3,7 +3,6 @@
- # found in the LICENSE file.
-
- import errno
--import imp
- import os.path
- import sys
-
-diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.me chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py
---- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.me 2023-07-22 14:10:40.372979365 +0200
-+++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-07-22 14:13:31.200453442 +0200
-@@ -2,7 +2,6 @@
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
-
--import imp
- import os.path
- import sys
-
diff --git a/chromium.spec b/chromium.spec
index 7ded837..80c72c9 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -387,8 +387,9 @@ Patch310: chromium-115-wayland-load_default_cursor_theme.patch
# clang warnings
Patch311: chromium-115-clang-warnings.patch
+
# imp module is removed in python-3.12
-Patch312: chromium-115-python-imp-deprecated.patch
+Patch312: chromium-115-python-3.12-deprecated.patch
# Qt issue
Patch321: chromium-114-qt-handle_scale_factor_changes.patch
@@ -1005,7 +1006,7 @@ udev.
%patch -P309 -p1 -b .include_contains_h_header_for_V4L2StatefulVideoDecoder
%patch -P310 -p1 -b .wayland_load_default_cursor_theme
%patch -P311 -p1 -b .clang-warnings
-%patch -P312 -p1 -b .python-imp-deprecated
+%patch -P312 -p1 -b .python-3.12-deprecated
%patch -P321 -p1 -b .handle_scale_factor_changes
%patch -P322 -p1 -b .fix_font_double_scaling
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [rpms/chromium] epel9-next: more fixes for python-3.12 issue
@ 2026-08-07 16:05 Than Ngo
0 siblings, 0 replies; 2+ messages in thread
From: Than Ngo @ 2026-08-07 16:05 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/chromium
Branch : epel9-next
Commit : 647392087870303044a9f5af0cd59ba206f06d44
Author : Than Ngo <than@redhat.com>
Date : 2023-07-22T17:23:12+02:00
Stats : +22/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/chromium/c/647392087870303044a9f5af0cd59ba206f06d44?branch=epel9-next
Log:
more fixes for python-3.12 issue
---
diff --git a/chromium-115-python-3.12-deprecated.patch b/chromium-115-python-3.12-deprecated.patch
index 25d2dbd..d586d89 100644
--- a/chromium-115-python-3.12-deprecated.patch
+++ b/chromium-115-python-3.12-deprecated.patch
@@ -159,3 +159,25 @@ diff -up chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-validation-layer
return [s.replace('\\', '/') for s in glob.glob(dirname)]
def main():
+diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py.python-imp-deprecated chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py
+--- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py.python-imp-deprecated 2023-07-21 05:41:02.000000000 +0200
++++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py 2023-07-22 14:45:20.440127549 +0200
+@@ -3,7 +3,6 @@
+ # found in the LICENSE file.
+
+ import errno
+-import imp
+ import os.path
+ import sys
+
+diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.python-imp-deprecated chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py
+--- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.python-imp-deprecated 2023-07-21 05:41:02.000000000 +0200
++++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-07-22 14:45:20.432127571 +0200
+@@ -2,7 +2,6 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
+-import imp
+ import os.path
+ import sys
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-07 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 16:05 [rpms/chromium] epel9-next: more fixes for python-3.12 issue Than Ngo
2026-08-07 16:05 Than Ngo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox