Skip to content

Commit 890fd60

Browse files
committed
Remove dependency on importlib for Py2.6 support (issue #49)
1 parent 094a417 commit 890fd60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

future/standard_library/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
import types
7070
import copy
7171
import os
72-
import importlib
7372

7473
from future.utils import PY2, PY3
7574

@@ -696,6 +695,10 @@ def import_(module_name, backport=False):
696695
>>> from future.backports import http.client
697696
698697
"""
698+
# Python 2.6 doesn't have importlib in the stdlib, so it requires
699+
# the backported ``importlib`` package from PyPI as a dependency to use
700+
# this function:
701+
import importlib
699702

700703
if PY3:
701704
return __import__(module_name)

0 commit comments

Comments
 (0)