Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:obsgeek0:branches:devel:tools:ide:vscode:dev
nodejs-electron
Partial-migration-from-imp-to-importlib.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File Partial-migration-from-imp-to-importlib.patch of Package nodejs-electron
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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor