%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyo

�
��4]c@@s dZddlmZddlZddlmZddlmZddlmZdd	lm	Z	e	j
e�Zd
�Z
defd��YZd
efd��YZdefd��YZd�Zd�Zde	jee�fd��YZdefd��YZdefd��YZdS(s�Base implementation classes.

The public-facing ``Events`` serves as the base class for an event interface;
its public attributes represent different kinds of events.   These attributes
are mirrored onto a ``_Dispatch`` class, which serves as a container for
collections of listener functions.   These collections are represented both
at the class level of a particular ``_Dispatch`` class as well as within
instances of ``_Dispatch``.

i(tabsolute_importNi(t_ClsLevelDispatch(t_EmptyListener(t_JoinedListeneri(tutilcC@s|jd�o|dkS(Nt_tdispatch(t
startswith(tname((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt_is_event_namest_UnpickleDispatchcB@seZdZd�ZRS(s�Serializable callable that re-generates an instance of
    :class:`_Dispatch` given a particular :class:`.Events` subclass.

    cC@sJxC|jD],}d|jkr
|jdjj|�Sq
Wtd��dS(NRs*No class with a 'dispatch' member present.(t__mro__t__dict__Rt
_for_classtAttributeError(tselft
_instance_clstcls((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt__call__)s
(t__name__t
__module__t__doc__R(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR
#st	_DispatchcB@s�eZdZdZej�Zdd�Zd�Z	e
d��Ze
d��Zd	�Z
d
�Zd�Zd�Zed
�Zd�ZRS(s;Mirror the event listening definitions of an Events class with
    listener collections.

    Classes which define a "dispatch" member will return a
    non-instantiated :class:`._Dispatch` subclass when the member
    is accessed at the class level.  When the "dispatch" member is
    accessed at the instance level of its owner, an instance
    of the :class:`._Dispatch` class is returned.

    A :class:`._Dispatch` class is generated for each :class:`.Events`
    class defined, by the :func:`._create_dispatcher_class` function.
    The original :class:`.Events` classes remain untouched.
    This decouples the construction of :class:`.Events` subclasses from
    the implementation used by the event internals, and allows
    inspecting tools like Sphinx to work in an unsurprising
    way against the public API.

    t_parentRRt_empty_listenersc@sw||_�|_�rjy|j�|_Wqstk
rf�fd�|jD�|_|j�<qsXn	i|_dS(Nc@s%i|]}t|��|j�qS((RR(t.0tls(tinstance_cls(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pys
<dictcomp>Xs	(RRt_empty_listener_regRtKeyErrort_event_descriptors(RtparentR((RsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt__init__Ms		
"cC@sLy|j|}Wntk
r0t|��nXt||j|�|SdS(N(RRRtsetattrR(RRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt__getattr__^s
cc@s&x|jD]}t||�Vq
WdS(N(t_event_namestgetattr(Rtk((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyRiscC@s
|jjS(N(t_eventst_listen(R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR'pscC@s|j||�S(N(t	__class__(RR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR
tscC@s|j}|j|�S(N(R(R
(RtinstanceR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt
_for_instancews	cC@sZd|jjkrJtd|jjtfi|jd6�}||j_n|j||�S(s�Create a 'join' of this :class:`._Dispatch` and another.

        This new dispatcher will dispatch events to both
        :class:`._Dispatch` objects.

        t_joined_dispatch_clssJoined%st	__slots__(R(RttypeRt_JoinedDispatcherR#R+(RtotherR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt_join{s
cC@st�|jffS(N(R
R(R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt
__reduce__�scC@sUxN|jD]C}t|t�r%q
nt||j�j|�j|d|�q
WdS(sMPopulate from the listeners in another :class:`_Dispatch`
            object.tonly_propagateN(Rt
isinstanceRR$Rt
for_modifyt_update(RR/R2R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR5�s
cC@s+x$|jD]}|j|�j�q
WdS(N(RR4tclear(RR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt_clear�s(RRRRN(RRRR,tweakreftWeakKeyDictionaryRtNoneR R"tpropertyRR'R
R*R0R1tTrueR5R7(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR3s					
t
_EventMetacB@seZdZd�ZRS(sKIntercept new Event subclasses and create
    associated _Dispatch classes.cC@s)t||||�tj||||�S(N(t_create_dispatcher_classR-R (Rt	classnametbasestdict_((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR �s(RRRR (((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR=�scC@sct|d�r|jj}nt}g|D]}t|�r+|^q+}td||fi|d6�}||_|j||�}x?|jD]4}t||t	|||��t
|j|�q�Wxo|jD]d}	t
|	t�r�|	tk	r�x@|	jjjD],}
t||
j|
�|jj|
j�qWq�q�Wt|dd�r_t|�|j_ndS(sRCreate a :class:`._Dispatch` class corresponding to an
    :class:`.Events` class.Rs
%sDispatchR,t_dispatch_targetN(thasattrRR(RR	R-R#t
_set_dispatchR!Rt_registrarstappendt	__bases__t
issubclassR&RRR$R:t
dispatcherRB(RR?R@RAt
dispatch_baseR%tevent_namestdispatch_clst
dispatch_insttsuper_R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR>�s$%	cC@s@x9|jjD]+}t|j|�t|s
t|=q
q
WdS(N(RR#REtremove(RR%((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt_remove_dispatcher�s
tEventscB@sbeZdZed��Zed��Zeeeed��Zed��Z	ed��Z
RS(s>Define event listening functions for a particular target type.cC@s|d�|_||_|jS(N(R:RR&(RRL((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyRD�s	c@s}�fd�}�fd�}t�d�ry||jj�sr|t|jj�sr|t�ry||jj�ry�SndS(Nc@st�fd�|D��S(Nc3@s!|]}t�j|�VqdS(N(R3R(Rtt(ttarget(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pys	<genexpr>�s(tall(ttypes(RS(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pytdispatch_is�sc@st�jj|�S(N(R3RR(RR(RS(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pytdispatch_parent_is�sR(RCRR(R-R.(RRSRVRW((RSsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt_accept_with�scC@s |jd|d|d|�dS(Nt	propagatetinserttnamed(tbase_listen(Rt	event_keyRYRZR[((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR'�scC@s|j�dS(N(RO(RR]((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt_remove�scC@s|jj�dS(N(RR7(R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR7�s(RRRtstaticmethodRDtclassmethodRXtFalseR'R^R7(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyRQ�sR.cB@sDeZdZdZd�Zd�Zed��Zed��ZRS(	s5Represent a connection between two _Dispatch objects.tlocalRRcC@s%||_||_|jj|_dS(N(RbRR(RRbR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR s		cC@sAt|j|�}t|j|j|�}t||j|�|S(N(R$RbRRRR!(RRRtjl((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR"
scC@s
|jjS(N(RR'(R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR'scC@s
|jjS(N(RR&(R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR&s(RbRR(	RRRR,R R"R;R'R&(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR.s		RIcB@s eZdZd�Zd�ZRS(s�Descriptor used by target classes to
    deliver the _Dispatch class at the class level
    and produce new _Dispatch instances for target
    instances.

    cC@s|j|_||_dS(N(Rtevents(RRd((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyR #scC@s4|dkr|jS|jj|�|jd<}|S(NR(R:RR*R(RtobjRtdisp((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt__get__'s(RRRR Rg(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyRIs	(Rt
__future__RR8tattrRRRtRtdefaultdicttlistRER	tobjectR
RR-R=R>RPtwith_metaclassRQR.RI(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt<module>s 	k		"	"0

Zerion Mini Shell 1.0