Skip to content

Commit dbd3cd0

Browse files
author
Joseph Curtis
committed
fix import reload for python<3.6
1 parent 05bc771 commit dbd3cd0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/past/builtins/misc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import unicode_literals
22

33
import inspect
4+
import sys
45

56
from future.utils import PY2, PY3, exec_
67

@@ -43,7 +44,10 @@ def oct(number):
4344

4445
raw_input = input
4546
# imp was deprecated in python 3.6
46-
from importlib import reload
47+
if sys.version_info >= (3, 6):
48+
from importlib import reload
49+
else:
50+
from imp import reload
4751
unicode = str
4852
unichr = chr
4953
xrange = range

0 commit comments

Comments
 (0)