diff options
author | Marcel Hellkamp <marc@gsites.de> | 2011-07-25 16:40:11 +0200 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2011-07-27 21:40:11 +0200 |
commit | 2ac17828c0a8face5548d4b3474ca8450ea89a7c (patch) | |
tree | 0892bfc1176ffd4c62e8abb936a3d45090bc0ebf | |
parent | 351f22a541c22fc1ff08eb9229ed0aeac3d30223 (diff) | |
download | bottle-2ac17828c0a8face5548d4b3474ca8450ea89a7c.tar.gz |
fix: Workaround for a bug in some versions of lib2to3 (fix #175)
-rwxr-xr-x | bottle.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -40,9 +40,14 @@ import warnings from Cookie import SimpleCookie from tempfile import TemporaryFile from traceback import format_exc -from urllib import urlencode, quote as urlquote, unquote as urlunquote from urlparse import urlunsplit, urljoin, SplitResult as UrlSplitResult +# Workaround for a bug in some versions of lib2to3 (fixed on CPython 2.7 and 3.2) +import urllib +urlencode = urllib.urlencode +urlquote = urllib.quote +urlunquote = urllib.unquote + try: from collections import MutableMapping as DictMixin except ImportError: # pragma: no cover from UserDict import DictMixin |