Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/zope/component/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/zope/component/interfaces.pyo
�
6j/Qc@sdZddlmZddlmZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
dd
lmZddlmZddlm
Z
dd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZdefd��YZdefd��YZdefd��YZdefd ��YZd!efd"��YZd#e fd$��YZ!d%efd&��YZ"d'S((s0Component and Component Architecture Interfaces
i����(t	Attribute(t	Interface(t
implements(tComponentLookupError(tInvalid(tIObjectEvent(tObjectEvent(tIComponentLookup(t
IRegistration(tIUtilityRegistration(t_IBaseAdapterRegistration(tIAdapterRegistration(t ISubscriptionAdapterRegistration(tIHandlerRegistration(tIRegistrationEvent(tRegistrationEvent(tIRegistered(t
Registered(t
IUnregistered(tUnregistered(tIComponentRegistry(tIComponents(t_BLANKtIComponentArchitecturecBs%eZdZd�Zdd�Zddd�Zdddd�Zddd�Zdd�Z	dd�Z
dd	�Zee
dd
�Zd�Zeddd�Zee
ddd
�Zdd�Zee
ddd�Zdd�Zdd�Zd�Zd�Zd�Zdd�Zdd�ZRS(s�The Component Architecture is defined by two key components: Adapters
    and Utiltities. Both are managed by site managers. All other components
    build on top of them.
    cCsdS(s�Return the global site manager.

        This function should never fail and always return an object that
        provides `IGlobalSiteManager`.
        N((((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetGlobalSiteManager3scCsdS(sHGet the nearest site manager in the given context.

        If `context` is `None`, return the global site manager.

        If the `context` is not `None`, it is expected that an adapter
        from the `context` to `IComponentLookup` can be found. If no
        adapter is found, a `ComponentLookupError` is raised.

        N((tcontext((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetSiteManager:stcCsdS(s�Get the utility that provides interface

        Returns the nearest utility to the context that implements the
        specified interface.  If one is not found, raises
        ComponentLookupError.
        N((t	interfacetnameR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyt
getUtilityGscCsdS(s�Look for the utility that provides interface

        Returns the nearest utility to the context that implements
        the specified interface.  If one is not found, returns default.
        N((RRtdefaultR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytqueryUtilityOscCsdS(s�Query for the next available utility.
    
        Find the next available utility providing `interface` and having the
        specified name. If no utility was found, return the specified `default`
        value.
        N((RRRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytqueryNextUtilityVscCsdS(srGet the next available utility.
    
        If no utility was found, a `ComponentLookupError` is raised.
        N((RRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetNextUtility^scCsdS(suReturn the utilities that provide an interface

        An iterable of utility name-value pairs is returned.
        N((RR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetUtilitiesFordscCsdS(s�Return all registered utilities for an interface

        This includes overridden utilities.

        An iterable of utility instances is returned.  No names are
        returned.
        N((RR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetAllUtilitiesRegisteredForjscCsdS(s�Get a named adapter to an interface for an object

        Returns an adapter that can adapt object to interface.  If a matching
        adapter cannot be found, raises ComponentLookupError.

        If context is None, an application-defined policy is used to choose
        an appropriate service manager from which to get an 'Adapters' service.

        If 'context' is not None, context is adapted to IServiceService,
        and this adapter's 'Adapters' service is used.
        N((tobjectRRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyt
getAdapteruscCsdS(s)Get a special adapter to an interface for an object

        NOTE: This method should only be used if a custom context
        needs to be provided to provide custom component
        lookup. Otherwise, call the interface, as in::

           interface(object)

        Returns an adapter that can adapt object to interface.  If a matching
        adapter cannot be found, raises ComponentLookupError.

        Context is adapted to IServiceService, and this adapter's
        'Adapters' service is used.

        If the object has a __conform__ method, this method will be
        called with the requested interface.  If the method returns a
        non-None value, that value will be returned. Otherwise, if the
        object already implements the interface, the object will be
        returned.
        N((R%RR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetAdapterInContext�scCsdS(s�Look for a multi-adapter to an interface for an objects

        Returns a multi-adapter that can adapt objects to interface.  If a
        matching adapter cannot be found, raises ComponentLookupError.

        If context is None, an application-defined policy is used to choose
        an appropriate service manager from which to get an 'Adapters' service.

        If 'context' is not None, context is adapted to IServiceService,
        and this adapter's 'Adapters' service is used.

        The name consisting of an empty string is reserved for unnamed
        adapters. The unnamed adapter methods will often call the
        named adapter methods with an empty string for a name.
        N((tobjectsRRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetMultiAdapter�scCsdS(s�Look for a named adapter to an interface for an object

        Returns an adapter that can adapt object to interface.  If a matching
        adapter cannot be found, returns the default.

        If context is None, an application-defined policy is used to choose
        an appropriate service manager from which to get an 'Adapters' service.

        If 'context' is not None, context is adapted to IServiceService,
        and this adapter's 'Adapters' service is used.
        N((R%RRRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytqueryAdapter�scCsdS(s/Look for a special adapter to an interface for an object

        NOTE: This method should only be used if a custom context
        needs to be provided to provide custom component
        lookup. Otherwise, call the interface, as in::

           interface(object, default)

        Returns an adapter that can adapt object to interface.  If a matching
        adapter cannot be found, returns the default.

        Context is adapted to IServiceService, and this adapter's
        'Adapters' service is used.

        If the object has a __conform__ method, this method will be
        called with the requested interface.  If the method returns a
        non-None value, that value will be returned. Otherwise, if the
        object already implements the interface, the object will be
        returned.
        N((R%RRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytqueryAdapterInContext�scCsdS(s�Look for a multi-adapter to an interface for objects

        Returns a multi-adapter that can adapt objects to interface.  If a
        matching adapter cannot be found, returns the default.

        If context is None, an application-defined policy is used to choose
        an appropriate service manager from which to get an 'Adapters' service.

        If 'context' is not None, context is adapted to IServiceService,
        and this adapter's 'Adapters' service is used.

        The name consisting of an empty string is reserved for unnamed
        adapters. The unnamed adapter methods will often call the
        named adapter methods with an empty string for a name.
        N((R(RRRR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytqueryMultiAdapter�scCsdS(s�Look for all matching adapters to a provided interface for objects

        Return a list of adapters that match. If an adapter is named, only the
        most specific adapter of a given name is returned.

        If context is None, an application-defined policy is used to choose
        an appropriate service manager from which to get an 'Adapters'
        service.

        If 'context' is not None, context is adapted to IServiceService,
        and this adapter's 'Adapters' service is used.
        N((R(tprovidedR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetAdapters�scCsdS(s�Get subscribers

        Subscribers are returned that provide the provided interface
        and that depend on and are computed from the sequence of
        required objects.

        If context is None, an application-defined policy is used to choose
        an appropriate service manager from which to get an 'Adapters'
        service.

        If 'context' is not None, context is adapted to IServiceService,
        and this adapter's 'Adapters' service is used.
        N((trequiredR-R((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytsubscribers�scGsdS(s�Call all of the handlers for the given objects

        Handlers are subscription adapter factories that don't produce
        anything.  They do all of their work when called.  Handlers
        are typically used to handle events.

        N((R(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pythandlescGsdS(s�Declare that a class adapts the given interfaces.

        This function can only be used in a class definition.

        (TODO, allow classes to be passed as well as interfaces.)
        N((t
interfaces((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytadaptsscOsdS(s�Create an object using a factory

        Finds the named factory in the current site and calls it with
        the given arguments.  If a matching factory cannot be found
        raises ComponentLookupError.  Returns the created object.

        A context keyword argument can be provided to cause the
        factory to be looked up in a location other than the current
        site.  (Of course, this means that it is impossible to pass a
        keyword argument named "context" to the factory.
        N((tfactory_nametargstkwargs((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytcreateObjectscCsdS(s�Get interfaces implemented by a factory

        Finds the factory of the given name that is nearest to the
        context, and returns the interface or interface tuple that
        object instances created by the named factory will implement.
        N((RR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetFactoryInterfaces#scCsdS(s�Return a tuple (name, factory) of registered factories that
        create objects which implement the given interface.
        N((RR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytgetFactoriesFor+sN(t__name__t
__module__t__doc__RtNoneRRR R!R"R#R$RRR&R'R)R*R+R,R.R0R1R3R7R8R9(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyR,s6	

	
	
	
	
t	IRegistrycBseZdZd�ZRS(s,Object that supports component registry
    cCsdS(s6Return an iterable of component registrations
        N((((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyt
registrations5s(R:R;R<R?(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyR>1st!IComponentRegistrationConveniencecBsJeZdZded�Zdded�Zddd�Zdd�ZRS(s�API for registering components.

    CAUTION: This API should only be used from test or
    application-setup code. This api shouldn't be used by regular
    library modules, as component registration is a configuration
    activity.
    cCsdS(sBRegister a utility globally

        A utility is registered to provide an interface with a
        name. If a component provides only one interface, then the
        provides argument can be omitted and the provided interface
        will be used. (In this case, provides argument can still be
        provided to provide a less specific interface.)

        CAUTION: This API should only be used from test or
        application-setup code. This API shouldn't be used by regular
        library modules, as component registration is a configuration
        activity.

        N((t	componenttprovidesR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytprovideUtilityBscCsdS(s=Register an adapter globally

        An adapter is registered to provide an interface with a name
        for some number of object types. If a factory implements only
        one interface, then the provides argument can be omitted and
        the provided interface will be used. (In this case, a provides
        argument can still be provided to provide a less specific
        interface.)

        If the factory has an adapts declaration, then the adapts
        argument can be omitted and the declaration will be used.  (An
        adapts argument can be provided to override the declaration.)

        CAUTION: This API should only be used from test or
        application-setup code. This API shouldn't be used by regular
        library modules, as component registration is a configuration
        activity.
        N((tfactoryR3RBR((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytprovideAdapterRscCsdS(s@Register a subscription adapter

        A subscription adapter is registered to provide an interface
        for some number of object types. If a factory implements only
        one interface, then the provides argument can be omitted and
        the provided interface will be used. (In this case, a provides
        argument can still be provided to provide a less specific
        interface.)

        If the factory has an adapts declaration, then the adapts
        argument can be omitted and the declaration will be used.  (An
        adapts argument can be provided to override the declaration.)

        CAUTION: This API should only be used from test or
        application-setup code. This API shouldn't be used by regular
        library modules, as component registration is a configuration
        activity.
        N((RDR3RB((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytprovideSubscriptionAdapterfscCsdS(s~Register a handler

        Handlers are subscription adapter factories that don't produce
        anything.  They do all of their work when called.  Handlers
        are typically used to handle events.

        If the handler has an adapts declaration, then the adapts
        argument can be omitted and the declaration will be used.  (An
        adapts argument can be provided to override the declaration.)

        CAUTION: This API should only be used from test or
        application-setup code. This API shouldn't be used by regular
        library modules, as component registration is a configuration
        activity.
        N((thandlerR3((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytprovideHandlerzsN(	R:R;R<R=RRCRERFRH(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyR@9s
t
IPossibleSitecBs eZdZd�Zd�ZRS(s$An object that could be a site.
    cCsdS(s/Sets the site manager for this object.
        N((tsitemanager((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pytsetSiteManager�scCsdS(s}Returns the site manager contained in this object.

        If there isn't a site manager, raise a component lookup.
        N((((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyR�s(R:R;R<RKR(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyRI�s	tISitecBseZdZRS(s0Marker interface to indicate that we have a site(R:R;R<(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyRL�stMisusedcBseZdZRS(s?A component is being used (registered) for the wrong interface.(R:R;R<(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyRM�stIFactorycBs8eZdZed�Zed�Zd�Zd�ZRS(s7A factory is responsible for creating other components.sThe factory title.s#A brief description of the factory.cOsdS(s6Return an instance of the objects we're a factory for.N((R5tkw((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyt__call__�scCsdS(sGet the interfaces implemented by the factory

        Return the interface(s), as an instance of Implements, that objects
        created by this factory will implement. If the callable's Implements
        instance cannot be created, an empty Implements instance is returned.
        N((((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyt
getInterfaces�s(R:R;R<RttitletdescriptionRPRQ(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyRN�s
	N(#R<tzope.interfaceRRRtzope.interface.interfacesRRRRRRR	R
RRR
RRRRRRRRtzope.component._compatRRR>R@RIRLt	ExceptionRMRN(((s=/usr/lib/python2.7/site-packages/zope/component/interfaces.pyt<module>s>�S

Spamworldpro Mini