Skip to content

Commit bd5ca33

Browse files
committed
Merge pull request #1053 from takluyver/move_py3k_reload
Move Python 3 import of reload() to the module that uses it
2 parents 792972d + 4b08cf1 commit bd5ca33

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
import distutils.sysconfig
107107
import distutils.version
108108

109+
try:
110+
reload
111+
except NameError:
112+
# Python 3
113+
from imp import reload
114+
109115
# Needed for toolkit setuptools support
110116
if 0:
111117
try:

lib/matplotlib/pyplot.py

-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@
5555
LinearLocator, LogLocator, AutoLocator, MultipleLocator,\
5656
MaxNLocator
5757

58-
try:
59-
reload
60-
except NameError:
61-
# Python 3
62-
from imp import reload
63-
6458
## Backend detection ##
6559
def _backend_selection():
6660
""" If rcParams['backend_fallback'] is true, check to see if the

0 commit comments

Comments
 (0)