Chris McDonough
2010-11-18 a66593d25e77f1a0e749f5590b45498bbaa66755
refs
author Chris McDonough <chrism@plope.com>
Thursday, November 18, 2010 22:56 +0100
committer Chris McDonough <chrism@plope.com>
Thursday, November 18, 2010 22:56 +0100
commita66593d25e77f1a0e749f5590b45498bbaa66755
tree ea935aba1b7985e2bd9397b6f467f680db73ce1e tree | zip | gz
parent 1e467e1bacc915d1e00bdce189e35f5afb568132 view | diff
- Fix apparent failures when calling ``pyramid.traversal.find_model(root,
path)`` or ``pyramid.traversal.traverse(path)`` when ``path`` is
(erroneously) a Unicode object. The user is meant to pass these APIs a
string object, never a Unicode object. In practice, however, users indeed
pass Unicode. Because the string that is passed must be ASCII encodeable,
now, if they pass a Unicode object, its data is eagerly converted to an
ASCII string rather than being passed along to downstream code as a
convenience to the user and to prevent puzzling second-order failures from
cropping up (all failures will occur within ``pyramid.traversal.traverse``
rather than later down the line as the result of calling
``traversal_path``).
3 files modified
51 ■■■■■ changed files
CHANGES.txt 12 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_traversal.py 26 ●●●●● diff | view | raw | blame | history
pyramid/traversal.py 13 ●●●●● diff | view | raw | blame | history