summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-01-23 16:22:15 +0000
committerChris McDonough <chrism@agendaless.com>2009-01-23 16:22:15 +0000
commit1b4e9b5d5e6ee1199b998c49e322ca0c4e540ac6 (patch)
tree1b74b3b43496064bec3e1f1b418e2a56eb770d40
parentdc16fa3fed6bfde513cdf2f9ebdccb23e1a4e5f4 (diff)
downloadpyramid-1b4e9b5d5e6ee1199b998c49e322ca0c4e540ac6.tar.gz
pyramid-1b4e9b5d5e6ee1199b998c49e322ca0c4e540ac6.tar.bz2
pyramid-1b4e9b5d5e6ee1199b998c49e322ca0c4e540ac6.zip
Path elements are always unicode during traversal now.
-rw-r--r--docs/narr/models.rst10
-rw-r--r--docs/narr/traversal.rst18
2 files changed, 12 insertions, 16 deletions
diff --git a/docs/narr/models.rst b/docs/narr/models.rst
index 74cb9d50a..c07dfbe18 100644
--- a/docs/narr/models.rst
+++ b/docs/narr/models.rst
@@ -77,11 +77,11 @@ instances. :mod:`repoze.bfg` imposes the following policy on model
instance nodes in the graph:
- Nodes which contain other nodes (aka "container" nodes) must supply
- a ``__getitem__`` method which is willing to resolve a string or
- unicode name to a subobject. If a subobject by that name does not
- exist in the container, ``__getitem__`` must raise a ``KeyError``.
- If a subobject by that name *does* exist, the container should
- return the subobject (another model instance).
+ a ``__getitem__`` method which is willing to resolve a unicode name
+ to a subobject. If a subobject by that name does not exist in the
+ container, ``__getitem__`` must raise a ``KeyError``. If a
+ subobject by that name *does* exist, the container should return the
+ subobject (another model instance).
- Nodes which do not contain other nodes (aka "leaf" nodes) must not
implement a ``__getitem__``, or if they do, their ``__getitem__``
diff --git a/docs/narr/traversal.rst b/docs/narr/traversal.rst
index d77667355..9ff7329c5 100644
--- a/docs/narr/traversal.rst
+++ b/docs/narr/traversal.rst
@@ -285,14 +285,10 @@ context object implied by the current request.
Unicode and Traversal
---------------------
-By default, the traversal machinery by default attempts to decode each
-path element in ``PATH_INFO`` from its natural byte string (``str``
-type) representation into Unicode using the UTF-8 encoding before
-passing it to the ``__getitem__`` of a model object. If any path
-segment in ``PATH_INFO`` is not decodeable using the UTF-8 decoding, a
-TypeError is raised.
-
-The option named ``unicode_path_segments`` in
-:ref:`environment_chapter` provides a mechanism that will disable this
-behavior, causing traversal to pass path segments as plain byte string
-objects to all model ``__getitem__`` methods.
+The traversal machinery by default attempts to decode each path
+element in ``PATH_INFO`` from its natural byte string (``str`` type)
+representation into Unicode using the UTF-8 encoding before passing it
+to the ``__getitem__`` of a model object. If any path segment in
+``PATH_INFO`` is not decodeable using the UTF-8 decoding, a TypeError
+is raised.
+