summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-20 12:41:47 -0500
committerChris McDonough <chrism@plope.com>2012-02-20 12:41:47 -0500
commit844ed90133f051d013330cb0ed4c95dbb29eecc1 (patch)
tree0ae7eb619b2ec3192a0a50caaffaacc9c59c0702 /docs
parent51919e05d9c251f7f80a4736be2b822eafc5d189 (diff)
downloadpyramid-844ed90133f051d013330cb0ed4c95dbb29eecc1.tar.gz
pyramid-844ed90133f051d013330cb0ed4c95dbb29eecc1.tar.bz2
pyramid-844ed90133f051d013330cb0ed4c95dbb29eecc1.zip
Features
-------- - Add an ``introspection`` boolean to the Configurator constructor. If this is ``True``, actions registered using the Configurator will be registered with the introspector. If it is ``False``, they won't. The default is ``True``. Setting it to ``False`` during action processing will prevent introspection for any following registration statements, and setting it to ``True`` will start them up again. This addition is to service a requirement that the debug toolbar's own views and methods not show up in the introspector. Backwards Incompatibilities --------------------------- - Remove ``pyramid.config.Configurator.with_context`` class method. It was never an API, it is only used by ``pyramid_zcml`` and its functionality has been moved to that package's latest release. This means that you'll need to use the latest release of ``pyramid_zcml`` with this release of Pyramid. - The ``introspector`` argument to the ``pyramid.config.Configurator`` constructor API has been removed. It has been replaced by the boolean ``introspection`` flag. - The ``pyramid.registry.noop_introspector`` API object has been removed.
Diffstat (limited to 'docs')
-rw-r--r--docs/api/registry.rst7
-rw-r--r--docs/narr/introspector.rst15
2 files changed, 6 insertions, 16 deletions
diff --git a/docs/api/registry.rst b/docs/api/registry.rst
index e18d1b6c2..e62e2ba6f 100644
--- a/docs/api/registry.rst
+++ b/docs/api/registry.rst
@@ -38,10 +38,3 @@
This class is new as of :app:`Pyramid` 1.3.
-.. class:: noop_introspector
-
- An introspector which throws away all registrations, useful for disabling
- introspection altogether (pass as ``introspector`` to the
- :term:`Configurator` constructor).
-
- This class is new as of :app:`Pyramid` 1.3.
diff --git a/docs/narr/introspector.rst b/docs/narr/introspector.rst
index d465c47d9..74595cac8 100644
--- a/docs/narr/introspector.rst
+++ b/docs/narr/introspector.rst
@@ -576,17 +576,14 @@ relationships. It looks something like this:
Disabling Introspection
-----------------------
-You can disable Pyramid introspection by passing the object
-:attr:`pyramid.registry.noop_introspector` to the :term:`Configurator`
-constructor in your application setup:
+You can disable Pyramid introspection by passing the flag
+``introspection=False`` to the :term:`Configurator` constructor in your
+application setup:
.. code-block:: python
from pyramid.config import Configurator
- from pyramid.registry import noop_introspector
- config = Configurator(..., introspector=noop_introspector)
+ config = Configurator(..., introspection=False)
-When the noop introspector is active, all introspectables generated by
-configuration directives are thrown away. A noop introspector behaves just
-like a "real" introspector, but the methods of a noop introspector do nothing
-and return null values.
+When ``introspection`` is ``False``, all introspectables generated by
+configuration directives are thrown away.