Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
python3-setuptools.28684
importlib.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File importlib.patch of Package python3-setuptools.28684
Index: setuptools-41.6.0/setuptools/_imp.py =================================================================== --- setuptools-41.6.0.orig/setuptools/_imp.py +++ setuptools-41.6.0/setuptools/_imp.py @@ -19,7 +19,10 @@ PY_FROZEN = 7 def find_module(module, paths=None): """Just like 'imp.find_module()', but with package support""" - spec = importlib.util.find_spec(module, paths) + if isinstance(paths, list): + spec = importlib.machinery.PathFinder.find_spec(module, paths) + else: + spec = importlib.util.find_spec(module, paths) if spec is None: raise ImportError("Can't find %s" % module) if not spec.has_location and hasattr(spec, 'submodule_search_locations'): @@ -60,14 +63,20 @@ def find_module(module, paths=None): def get_frozen_object(module, paths=None): - spec = importlib.util.find_spec(module, paths) + if isinstance(paths, list): + spec = importlib.machinery.PathFinder.find_spec(module, paths) + else: + spec = importlib.util.find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return spec.loader.get_code(module) def get_module(module, paths, info): - spec = importlib.util.find_spec(module, paths) + if isinstance(paths, list): + spec = importlib.machinery.PathFinder.find_spec(module, paths) + else: + spec = importlib.util.find_spec(module, paths) if not spec: raise ImportError("Can't find %s" % module) return module_from_spec(spec)
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