From 10d94aebab631235cc939eedf39b7ceb382b5ab0 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Thu, 29 Dec 2016 18:01:13 +0000 Subject: [PATCH] BF: Convert namespace path to list For some reason, on some systems, the ``__path__`` attribute of a module is a _NamespacePath, not a list, as we expected - see: https://github.com/MacPython/matplotlib-wheels/issues/2 --- lib/matplotlib/testing/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py index 7930e0b47935..6af18dd59609 100644 --- a/lib/matplotlib/testing/decorators.py +++ b/lib/matplotlib/testing/decorators.py @@ -461,7 +461,7 @@ def find_dotted_module(module_name, path=None): file.close() except ImportError: # assume namespace package - path = sys.modules[sub_mod].__path__ + path = list(sys.modules[sub_mod].__path__) res = None, path, None return res