/usr/lib/python2.6/site-packages/stevedore
Edit: /usr/lib/python2.6/site-packages/stevedore/named.pyc (5209B)
Ñò
yDVc @ s* d d k l Z d e f d „ ƒ YZ d S( i ( t ExtensionManagert NamedExtensionManagerc B sk e Z d Z e d h e e d e d „ Z e d e d e d „ ƒ Z e e d d „ Z d „ Z d „ Z
RS( s† Loads only the named extensions.
This is useful for explicitly enabling extensions in a
configuration file, for example.
:param namespace: The namespace for the entry points.
:type namespace: str
:param names: The names of the extensions to load.
:type names: list(str)
:param invoke_on_load: Boolean controlling whether to invoke the
object returned by the entry point after the driver is loaded.
:type invoke_on_load: bool
:param invoke_args: Positional arguments to pass when invoking
the object returned by the entry point. Only used if invoke_on_load
is True.
:type invoke_args: tuple
:param invoke_kwds: Named arguments to pass when invoking
the object returned by the entry point. Only used if invoke_on_load
is True.
:type invoke_kwds: dict
:param name_order: If true, sort the loaded extensions to match the
order used in ``names``.
:type name_order: bool
:param propagate_map_exceptions: Boolean controlling whether exceptions
are propagated up through the map call or whether they are logged and
then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will be called when
a entrypoint can not be loaded. The arguments that will be provided
when this is called (when an entrypoint fails to load) are
(manager, entrypoint, exception)
:type on_load_failure_callback: function
:param verify_requirements: Use setuptools to enforce the
dependencies of the plugin(s) being loaded. Defaults to False.
:type verify_requirements: bool
c
C sK | i | | d | d | d | ƒ| i | | | | ƒ }
| i |
ƒ d S( Nt
name_ordert propagate_map_exceptionst on_load_failure_callback( t _init_attributest
_load_pluginst
_init_plugins( t selft namespacet namest invoke_on_loadt invoke_argst invoke_kwdsR R R t verify_requirementst
extensions( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyt __init__+ s t TESTINGc
C s` | i | ƒ } g } | D] } | | i q ~ } | i | | d | d | ƒ| i | ƒ | S( s Construct a test NamedExtensionManager
Test instances are passed a list of extensions to use rather than
loading them from entry points.
:param extensions: Pre-configured Extension instances
:type extensions: list of :class:`~stevedore.extension.Extension`
:param namespace: The namespace for the manager; used only for
identification since the extensions are passed in.
:type namespace: str
:param propagate_map_exceptions: Boolean controlling whether exceptions
are propagated up through the map call or whether they are logged
and then ignored
:type propagate_map_exceptions: bool
:param on_load_failure_callback: Callback function that will
be called when a entrypoint can not be loaded. The
arguments that will be provided when this is called (when
an entrypoint fails to load) are (manager, entrypoint,
exception)
:type on_load_failure_callback: function
:param verify_requirements: Use setuptools to enforce the
dependencies of the plugin(s) being loaded. Defaults to False.
:type verify_requirements: bool
:return: The manager instance, initialized for testing
R R ( t __new__t nameR R (
t clsR R R R R t ot _[1]t eR
( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyt make_test_instance: s $
c C s8 t t | ƒ i | d | d | ƒ| | _ | | _ d S( NR R ( t superR R t _namest _name_order( R R R
R R R ( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyR b s
c C sS t t | ƒ i | ƒ | i o/ g } | i D] } | | | q. ~ | _ n d S( N( R R R R R R ( R R R t n( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyR l s
c C s: | i | i j o d St t | ƒ i | | | | | ƒ S( N( R R t NoneR R t _load_one_plugin( R t epR R R
R ( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyR r s
( N( t __name__t
__module__t __doc__t FalseR R t classmethodR R R R ( ( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyR s % $ N( t extensionR R ( ( ( s2 /tmp/pip-build-lt8jXN/stevedore/stevedore/named.pyt
s