summaryrefslogtreecommitdiff
path: root/dev-python/numpy/files/numpy-1.11.2-import-module-fix.patch
blob: 80b710b5b53289c0db7d3cb3ae555884ee38a84f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 5d0ce36e5be134bb5ead03cab1edeaa60fa355aa Mon Sep 17 00:00:00 2001
From: Jonathan Helmus <jjhelmus@gmail.com>
Date: Wed, 12 Oct 2016 13:07:42 -0500
Subject: [PATCH] BUG: import full module path in npy_load_module

Use the full module path when importing importlib.machinery for use in the
npy_load_module function. Just importing importlib is not sufficient in certain
cases, for example Python 3.4.

closes #8147
---
 numpy/compat/py3k.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/numpy/compat/py3k.py b/numpy/compat/py3k.py
index 25cc535..d5bb2e4 100644
--- a/numpy/compat/py3k.py
+++ b/numpy/compat/py3k.py
@@ -118,7 +118,7 @@ def npy_load_module(name, fn, info=None):
         mod : module
 
         """
-        import importlib
+        import importlib.machinery
         return importlib.machinery.SourceFileLoader(name, fn).load_module()
 else:
     def npy_load_module(name, fn, info=None):