ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 4]c@sUdZddlmZddlmZddlZddlmZddlZddlm Z ddlm Z d d lm Z d d lm Z d d l m Z d e jfdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdS(sAttribute implementation for _Dispatch classes. The various listener targets for a particular event class are represented as attributes, which refer to collections of listeners to be fired off. These collections can exist at the class level as well as at the instance level. An event is fired off using code like this:: some_object.dispatch.first_connect(arg1, arg2) Above, ``some_object.dispatch`` would be an instance of ``_Dispatch`` and ``first_connect`` is typically an instance of ``_ListenerCollection`` if event listeners are present, or ``_EmptyListener`` if none are present. The attribute mechanics here spend effort trying to ensure listener functions are available with a minimum of function call overhead, that unnecessary objects aren't created (i.e. many empty per-instance listener collections), as well as that everything is garbage collectable when owning references are lost. Other features such as "propagation" of listener functions across many ``_Dispatch`` instances, "joining" of multiple ``_Dispatch`` instances, as well as support for subclass propagation (e.g. events assigned to ``Pool`` vs. ``QueuePool``) are all implemented here. i(tabsolute_import(twith_statementN(tchaini(tlegacy(tregistryi(texc(tutil(t threadingt RefCollectioncBseZdZdZRS(trefcCstj|tjS(N(tweakrefR Rt_collection_gced(tself((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyt_memoized_attr_ref1s(R (t__name__t __module__t __slots__R (((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyR.st_empty_collectioncBs5eZdZdZdZdZdZRS(cCsdS(N((R telement((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytappend6scCsdS(N((R tother((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytextend9scCsdS(N((R R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytremove<scCs tgS(N(titer(R ((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyt__iter__?scCsdS(N((R ((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytclearBs(RRRRRRR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyR5s     t_ClsLevelDispatchcBsneZdZdZdZdZd Zd Zd Zd Z d Z dZ dZ dZ RS(s2Class-level events on :class:`._Dispatch` classes.tnamet arg_namesthas_kwtlegacy_signaturest _clslevelt __weakref__cCs|j|_tj|}|jd|_t|j|_t t t t |dgdd|_ tj||||_tj|_dS(Nit_legacy_signaturestkeycSs|dS(Ni((ts((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytZt(RRRtinspect_getfullargspectargsRtbooltvarkwRtlisttreversedtsortedtgetattrRRt_augment_fn_docst__doc__R tWeakKeyDictionaryR(R tparent_dispatch_clstfntargspec((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyt__init__Rs 'cCsj|r|j|}n|jrfytj|dt}Wntk rMqfXtj|||}n|S(Ntno_self(t_wrap_fn_for_kwRRtget_callable_argspectTruet TypeErrorRt_wrap_fn_for_legacy(R R2tnamedR3((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyt_adjust_fn_specbs  csfd}|S(Ncs/ttj|}|j||S(N(tdicttzipRtupdate(R'tkwtargdict(R2R (sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytwrap_kwos ((R R2RB((R2R sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyR6nscCs|j}t|ts$tdt|dtsLtjd|n|g}x|r|jd}|j |j ||k r||j kr|j |qX||j kr|j |n|j |j|jqXWtj||dS(Ns*Class-level Event targets must be classes.t_sa_propagate_class_eventss.Can't assign an event directly to the %s classi(tdispatch_targett isinstancettypetAssertionErrorR-R8RtInvalidRequestErrortpopRt__subclasses__Rtupdate_subclasst_assign_cls_collectiont appendleftt _listen_fnRt_stored_in_collection(R t event_keyt propagatettargettstacktcls((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pytinsertvs"    cCs|j}t|ts$tdt|dtsLtjd|n|g}x|r|jd}|j |j ||k r||j kr|j |qX||j kr|j |n|j |j|jqXWtj||dS(Ns*Class-level Event targets must be classes.RCs.Can't assign an event directly to the %s classi(RDRERFRGR-R8RRHRIRRJRRKRLRRNRRO(R RPRQRRRSRT((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/event/attr.pyRs"    cCs<t|dtr(tj|j|s$  =&O