/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event
NameSizeModeActions
api.py62790644editdlrm
api.pyc70560644editdlrm
api.pyo70560644editdlrm
attr.py129940644editdlrm
attr.pyc184920644editdlrm
attr.pyo182240644editdlrm
base.py97600644editdlrm
base.pyc125410644editdlrm
base.pyo125410644editdlrm
legacy.py59040644editdlrm
legacy.pyc62100644editdlrm
legacy.pyo61760644editdlrm
registry.py80660644editdlrm
registry.pyc76510644editdlrm
registry.pyo76100644editdlrm
__init__.py5960644editdlrm
__init__.pyc6250644editdlrm
__init__.pyo6250644editdlrm
Edit: /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyc (12541B)
σ ΓΜ4]c@@s dZddlmZddlZddlmZddlmZddlmZdd lm Z e j e ƒZ d „Z d efd „ƒ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„ƒZ e 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ˆ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=žsc C@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%t event_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 αs(tall(ttypes(RS(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyt dispatch_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(t base_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 staticmethodRDt classmethodRXtFalseR'R^R7(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyRQΠs R.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__RR8tattrRRRtRt defaultdicttlistRER tobjectR RR-R=R>RPtwith_metaclassRQR.RI(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/base.pyts   k " "0