diff options
author | 2019-11-24 08:58:05 +0100 | |
---|---|---|
committer | 2019-11-24 12:16:46 +0100 | |
commit | 5e0bf835798e4078e2eabcc3536c52aad2bf414c (patch) | |
tree | b1e04ebf039333f4d99b2f7d90d5d05cd2f3bdfc /dev-python/setuptools/files | |
parent | dev-python/hypothesis: Bump to 4.46.1 (diff) | |
download | gentoo-5e0bf835798e4078e2eabcc3536c52aad2bf414c.tar.gz gentoo-5e0bf835798e4078e2eabcc3536c52aad2bf414c.tar.bz2 gentoo-5e0bf835798e4078e2eabcc3536c52aad2bf414c.zip |
dev-python/setuptools: Bump to 42.0.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/setuptools/files')
-rw-r--r-- | dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch b/dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch new file mode 100644 index 000000000000..5c96016c92c3 --- /dev/null +++ b/dev-python/setuptools/files/setuptools-42.0.0-imp-fix.patch @@ -0,0 +1,51 @@ +From bbf825eee764cae0bc44077ccc957a733d53d095 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= + <mimi1vx@users.noreply.github.com> +Date: Fri, 15 Nov 2019 08:52:35 +0100 +Subject: [PATCH] Fix _imp module behaviour if is defined paths in find_spec + call + +fixes #1896 +--- + setuptools/_imp.py | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/setuptools/_imp.py b/setuptools/_imp.py +index a3cce9b28..6ccec5799 100644 +--- a/setuptools/_imp.py ++++ b/setuptools/_imp.py +@@ -19,7 +19,10 @@ + + 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) |