7
0
Files
nodejs-electron/Partial-migration-from-imp-to-importlib.patch
Bruno Pitrus 4e42e601e4 Accepting request 1100204 from home:dziobian:gulgul-ultron:19
- New upstream release 22.3.17
  * Security fixes: CVE-2023-3422, CVE-2023-3421, CVE-2023-3420.
- Add fileutil-python3.12-imp.patch and Partial-migration-from-imp-to-importlib.patch to fix ftbfs on Rawhide

OBS-URL: https://build.opensuse.org/request/show/1100204
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=81
2023-07-23 18:53:08 +00:00

37 lines
1.2 KiB
Diff

From cbf5f7ad619a967bd54482e1d1df36d80b28145a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Thu, 13 Jul 2023 12:18:00 +0200
Subject: [PATCH] Partial migration from imp to importlib
---
.../resources/protobufs/binary_proto_generator.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
index 2a1802d..ba67251 100755
--- a/components/resources/protobufs/binary_proto_generator.py
+++ b/components/resources/protobufs/binary_proto_generator.py
@@ -9,7 +9,7 @@
"""
from __future__ import print_function
import abc
-import imp
+from importlib import util
import optparse
import os
import re
@@ -68,7 +68,9 @@ class GoogleProtobufModuleImporter:
raise ImportError(fullname)
filepath = self._fullname_to_filepath(fullname)
- return imp.load_source(fullname, filepath)
+ spec = util.spec_from_file_location(fullname, filepath)
+ loaded = util.module_from_spec(spec)
+ return spec.loader.exec_module(loaded)
class BinaryProtoGenerator:
--
2.41.0