From eb9fbf5f24b5e41cadd1eac8ca970ba819ecb6a5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 23 Sep 2009 10:24:42 +0000 Subject: Features -------- - Speed up ``repoze.bfg.encode.urlencode`` (nee' ``repoze.bfg.url.urlencode``) slightly. - Speed up ``repoze.bfg.traversal.model_path`` and ``repoze.bfg.traversal.model_path_tuple`` slightly. Internal -------- - Move ``repoze.bfg.traversal._url_quote`` into ``repoze.bfg.encode`` as ``url_quote``. Backwards Incompatibilities --------------------------- - We previously had a Unicode-aware wrapper for the ``urllib.urlencode`` function named ``repoze.bfg.url.urlencode`` which delegated to the stdlib function, but which marshalled all unicode values to utf-8 strings before calling the stdlib version. A newer replacement now lives in ``repoze.bfg.encode`` (old imports will still work). The replacement does not delegate to the stdlib. The replacement diverges from the stdlib implementation and the previous ``repoze.bfg.url`` url implementation inasmuch as its ``doseq`` argument is a decoy: it always behaves in the ``doseq=True`` way (which is the only sane behavior) for speed purposes. The old import location (``repoze.bfg.url.urlencode``) still functions and has not been deprecated. --- repoze/bfg/urldispatch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'repoze/bfg/urldispatch.py') diff --git a/repoze/bfg/urldispatch.py b/repoze/bfg/urldispatch.py index c1d1f71e4..58ea192c6 100644 --- a/repoze/bfg/urldispatch.py +++ b/repoze/bfg/urldispatch.py @@ -1,9 +1,9 @@ import re from urllib import unquote -from repoze.bfg.traversal import _url_quote -from repoze.bfg.traversal import quote_path_segment from repoze.bfg.traversal import traversal_path +from repoze.bfg.traversal import quote_path_segment +from repoze.bfg.encode import url_quote _marker = object() @@ -111,7 +111,7 @@ def _compile_route(route): v = '/'.join([quote_path_segment(x) for x in v]) elif k != star: try: - v = _url_quote(v) + v = url_quote(v) except TypeError: pass newdict[k] = v -- cgit v1.2.3