From dbd3cd0270ce48bb27a633b9b88a1a9bb287011d Mon Sep 17 00:00:00 2001 From: Joseph Curtis Date: Wed, 16 Sep 2020 11:35:23 -0700 Subject: [PATCH] fix import reload for python<3.6 --- src/past/builtins/misc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/past/builtins/misc.py b/src/past/builtins/misc.py index eaaef410..78210d37 100644 --- a/src/past/builtins/misc.py +++ b/src/past/builtins/misc.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals import inspect +import sys from future.utils import PY2, PY3, exec_ @@ -43,7 +44,10 @@ def oct(number): raw_input = input # imp was deprecated in python 3.6 - from importlib import reload + if sys.version_info >= (3, 6): + from importlib import reload + else: + from imp import reload unicode = str unichr = chr xrange = range