8000 Move Python 3 import of reload() to the module that uses it. · matplotlib/matplotlib@4b08cf1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b08cf1

Browse files
committed
Move Python 3 import of reload() to the module that uses it.
1 parent 792972d commit 4b08cf1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/__init__.py

Lines changed: 6 additions & 0 deletions
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

Lines changed: 0 additions & 6 deletions
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)
0