summaryrefslogtreecommitdiff
path: root/repoze/bfg/urldispatch.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-09-23 10:24:42 +0000
committerChris McDonough <chrism@agendaless.com>2009-09-23 10:24:42 +0000
commiteb9fbf5f24b5e41cadd1eac8ca970ba819ecb6a5 (patch)
tree26afc97a9ddc53feca88bfac957bb376357edc6b /repoze/bfg/urldispatch.py
parent02e1fe45e4bb2d7473296d2b8c2114680d9c75c2 (diff)
downloadpyramid-eb9fbf5f24b5e41cadd1eac8ca970ba819ecb6a5.tar.gz
pyramid-eb9fbf5f24b5e41cadd1eac8ca970ba819ecb6a5.tar.bz2
pyramid-eb9fbf5f24b5e41cadd1eac8ca970ba819ecb6a5.zip
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.
Diffstat (limited to 'repoze/bfg/urldispatch.py')
-rw-r--r--repoze/bfg/urldispatch.py6
1 files changed, 3 insertions, 3 deletions
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