Skip to content

Commit d0a0100

Browse files
committed
Merge pull request #2335 from andreabedini/patch-5
make sure we only perform absolute imports on loading a backend
2 parents 271db8c + 7ebee32 commit d0a0100

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/backends/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ def pylab_setup():
2121
backend_name = 'backend_'+backend
2222
backend_name = backend_name.lower() # until we banish mixed case
2323
backend_name = 'matplotlib.backends.%s'%backend_name.lower()
24+
25+
# the last argument is specifies whether to use absolute or relative
26+
# imports. 0 means only perform absolute imports.
2427
backend_mod = __import__(backend_name,
25-
globals(),locals(),[backend_name])
28+
globals(),locals(),[backend_name],0)
2629

2730
# Things we pull in from all backends
2831
new_figure_manager = backend_mod.new_figure_manager

0 commit comments

Comments
 (0)