From ce5c42f1b832b21405ffd40f61c74a5cfa040e8d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 28 Nov 2011 20:27:14 -0500 Subject: docs --- docs/api/config.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/api') diff --git a/docs/api/config.rst b/docs/api/config.rst index a8c193b60..9f130b7dc 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -94,6 +94,16 @@ .. automethod:: set_renderer_globals_factory(factory) + .. attribute:: introspector + + The :term:`introspector` associated with this configuration. + + .. attribute:: introspectable + + A shortcut attribute which points to the + :class:`pyramid.registry.Introspectable` class (used during + directives to provide introspection to actions). + .. attribute:: global_registries -- cgit v1.2.3 From 57a0d7765c54031e6ac83881b536712316f22c45 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Nov 2011 12:55:41 -0500 Subject: docs; todo; coverage for Introspector --- docs/api/config.rst | 15 +++++++++++---- docs/api/interfaces.rst | 6 ++++++ docs/api/registry.rst | 25 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) (limited to 'docs/api') diff --git a/docs/api/config.rst b/docs/api/config.rst index 9f130b7dc..dbfbb1761 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -94,16 +94,23 @@ .. automethod:: set_renderer_globals_factory(factory) - .. attribute:: introspector - - The :term:`introspector` associated with this configuration. - .. attribute:: introspectable A shortcut attribute which points to the :class:`pyramid.registry.Introspectable` class (used during directives to provide introspection to actions). + This attribute is new as of :app:`Pyramid` 1.3. + + .. attribute:: introspector + + The :term:`introspector` related to this configuration. It is an + instance implementing the :class:`pyramid.interfaces.IIntrospector` + interface. If the Configurator constructor was supplied with an + ``introspector`` argument, this attribute will be that value. + Otherwise, it will be an instance of a default introspector type. + + This attribute is new as of :app:`Pyramid` 1.3. .. attribute:: global_registries diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index b336e549d..64f2773d3 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -68,3 +68,9 @@ Other Interfaces .. autointerface:: IResponse :members: + .. autointerface:: IIntrospectable + :members: + + .. autointerface:: IIntrospector + :members: + diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 4d327370a..3dbf73a67 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -14,3 +14,28 @@ accessed as ``request.registry.settings`` or ``config.registry.settings`` in a typical Pyramid application. + .. attribute:: introspector + + When a registry is set up (or created) by a :term:`Configurator`, the + registry will be decorated with an instance named ``introspector`` + implementing the :class:`pyramid.interfaces.IIntrospector` interface. + See also :attr:`pyramid.config.Configurator.introspector``. + + When a registry is created "by hand", however, this attribute will not + exist until set up by a configurator. + + This attribute is often accessed as ``request.registry.introspector`` in + a typical Pyramid application. + + This attribute is new as of :app:`Pyramid` 1.3. + +.. class:: Introspectable + + The default implementation of the interface + :class:`pyramid.interfaces.IIntrospectable` used by framework exenders. + An instance of this class is is created when + :attr:`pyramid.config.Configurator.introspectable` is called. + + This class is new as of :app:`Pyramid` 1.3. + + -- cgit v1.2.3 From 57a9d679eb78e774c271bf68f6e805dc2b8186c4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Nov 2011 13:55:02 -0500 Subject: add tests for introspectable; add more interface docs and expose actioninfo --- docs/api/interfaces.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api') diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index 64f2773d3..5b190b53b 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -74,3 +74,5 @@ Other Interfaces .. autointerface:: IIntrospector :members: + .. autointerface:: IActionInfo + :members: -- cgit v1.2.3 From b40fb8b26fe37102b076cd2310ea7a3fe8b79311 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 3 Dec 2011 21:04:24 -0500 Subject: add a noop introspector (allow introspection to be turned off) --- docs/api/registry.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/api') diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 3dbf73a67..25192f3ed 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -38,4 +38,9 @@ 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). -- cgit v1.2.3