2
Compatibility Support for Python 2.6 and earlier
8
from urllib.parse import splittag
10
from urllib import splittag
13
def strip_fragment(url):
15
In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
16
later was patched to disregard the fragment when making URL requests.
17
Do the same for Python 2.6 and earlier.
19
url, fragment = splittag(url)
23
if sys.version_info >= (2, 7):
24
strip_fragment = lambda x: x
27
from importlib import import_module
30
def import_module(module_name):
31
return __import__(module_name, fromlist=['__name__'])