Author: Maciej Fijalkowski <fij...@gmail.com> Branch: Changeset: r61125:dcc4f89c3872 Date: 2013-02-12 12:59 +0200 http://bitbucket.org/pypy/pypy/changeset/dcc4f89c3872/
Log: Merged in kostialopuhin/pypy/urlparse-unquote-faster (pull request #118) Make unquote from urllib and urlparse faster diff --git a/pypy/doc/config/translation.lldebug.txt b//doc/config/translation.lldebug.txt rename from pypy/doc/config/translation.lldebug.txt rename to /doc/config/translation.lldebug.txt diff --git a/pypy/goal/__init__.py b//goal/__init__.py rename from pypy/goal/__init__.py rename to /goal/__init__.py diff --git a/pypy/module/cpyext/include/ceval.h b//module/cpyext/include/ceval.h rename from pypy/module/cpyext/include/ceval.h rename to /module/cpyext/include/ceval.h diff --git a/pypy/module/micronumpy/arrayimpl/sort.py b//module/micronumpy/arrayimpl/sort.py rename from pypy/module/micronumpy/arrayimpl/sort.py rename to /module/micronumpy/arrayimpl/sort.py diff --git a/pypy/module/micronumpy/constants.py b//module/micronumpy/constants.py rename from pypy/module/micronumpy/constants.py rename to /module/micronumpy/constants.py diff --git a/pypy/module/test_lib_pypy/numpypy/core/test_shape_base.py b//module/test_lib_pypy/numpypy/core/test_shape_base.py rename from pypy/module/test_lib_pypy/numpypy/core/test_shape_base.py rename to /module/test_lib_pypy/numpypy/core/test_shape_base.py diff --git a/pypy/module/test_lib_pypy/pyrepl/test_keymap.py b//module/test_lib_pypy/pyrepl/test_keymap.py rename from pypy/module/test_lib_pypy/pyrepl/test_keymap.py rename to /module/test_lib_pypy/pyrepl/test_keymap.py diff --git a/pypy/module/test_lib_pypy/pyrepl/test_readline.py b//module/test_lib_pypy/pyrepl/test_readline.py rename from pypy/module/test_lib_pypy/pyrepl/test_readline.py rename to /module/test_lib_pypy/pyrepl/test_readline.py diff --git a/pypy/sandbox/__init__.py b//sandbox/__init__.py rename from pypy/sandbox/__init__.py rename to /sandbox/__init__.py diff --git a/lib-python/2.7/urllib.py b/lib-python/2.7/urllib.py --- a/lib-python/2.7/urllib.py +++ b/lib-python/2.7/urllib.py @@ -1205,15 +1205,16 @@ # fastpath if len(res) == 1: return s - s = res[0] + res_list = [res[0]] for item in res[1:]: try: - s += _hextochr[item[:2]] + item[2:] + x = _hextochr[item[:2]] + item[2:] except KeyError: - s += '%' + item + x = '%' + item except UnicodeDecodeError: - s += unichr(int(item[:2], 16)) + item[2:] - return s + x = unichr(int(item[:2], 16)) + item[2:] + res_list.append(x) + return ''.join(res_list) def unquote_plus(s): """unquote('%7e/abc+def') -> '~/abc def'""" diff --git a/lib-python/2.7/urlparse.py b/lib-python/2.7/urlparse.py --- a/lib-python/2.7/urlparse.py +++ b/lib-python/2.7/urlparse.py @@ -321,15 +321,16 @@ # fastpath if len(res) == 1: return s - s = res[0] + res_list = [res[0]] for item in res[1:]: try: - s += _hextochr[item[:2]] + item[2:] + x = _hextochr[item[:2]] + item[2:] except KeyError: - s += '%' + item + x = '%' + item except UnicodeDecodeError: - s += unichr(int(item[:2], 16)) + item[2:] - return s + x = unichr(int(item[:2], 16)) + item[2:] + res_list.append(x) + return ''.join(res_list) def parse_qs(qs, keep_blank_values=0, strict_parsing=0): """Parse a query given as a string argument. _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit