diff options
| author | Chris McDonough <chrism@plope.com> | 2012-02-20 12:41:47 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-02-20 12:41:47 -0500 |
| commit | 844ed90133f051d013330cb0ed4c95dbb29eecc1 (patch) | |
| tree | 0ae7eb619b2ec3192a0a50caaffaacc9c59c0702 /docs/narr/introspector.rst | |
| parent | 51919e05d9c251f7f80a4736be2b822eafc5d189 (diff) | |
| download | pyramid-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/narr/introspector.rst')
| -rw-r--r-- | docs/narr/introspector.rst | 15 |
1 files changed, 6 insertions, 9 deletions
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. |
