ÿØÿà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@sddlZddlmZddlmZddlmZddlmZdefdYZd efd YZ d efd YZ dS( iNi(t attributes(tutili(texct IdentityMapcBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZddZdZdZdZdZRS(cCs+i|_t|_tj||_dS(N(t_dicttsett _modifiedtweakreftreft_wr(tself((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt__init__s  cCs |jjS(N(Rtkeys(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR scCs tdS(N(tNotImplementedError(R tstate((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytreplacescCs tdS(N(R (R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytaddscCs|j|dS(sUoptional inlined form of add() which can assume item isn't present in the mapN(R(R Rtkey((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt_add_unpresentscCstddS(Ns%IdentityMap uses add() to insert data(R (R tdict_((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytupdate$scCstddS(Ns(IdentityMap uses remove() to remove data(R (R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytclear'scCs,|j|_|jr(|jj|ndS(N(R t_instance_dicttmodifiedRR(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt_manage_incoming_state*s  cCs&|`|jr"|jj|ndS(N(RRRtdiscard(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt_manage_removed_state0s cCs|jS(N(R(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt _dirty_states5scCs t|jS(s[return True if any InstanceStates present have been marked as 'modified'. (tboolR(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytcheck_modified8scCs ||kS(N((R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pythas_key?scCstddS(Ns(IdentityMap uses remove() to remove data(R (R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytpopitemBscGstddS(Ns(IdentityMap uses remove() to remove data(R (R Rtargs((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytpopEscCstddS(Ns%IdentityMap uses add() to insert data(R (R Rtdefault((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt setdefaultHscCs t|jS(N(tlenR(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt__len__KscCs tdS(N(R (R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytcopyNscCstddS(Ns%IdentityMap uses add() to insert data(R (R Rtvalue((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt __setitem__QscCstddS(Ns(IdentityMap uses remove() to remove data(R (R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt __delitem__TsN(t__name__t __module__R R RRRRRRRRRRRR!tNoneR#R%R&R(R)(((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRs&                  tWeakInstanceDictcBseZdZdZdZdZdZdZddZ dZ dZ d Z e jrd Zd Znd Zd ZdZdZdZRS(cCs8|j|}|j}|dkr4t|n|S(N(RtobjR,tKeyError(R RRto((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt __getitem__Ys    cCsVy3||jkr.|j|}|j}ntSWntk rGtSX|dk SdS(N(RR.tFalseR/R,(R RRR0((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt __contains__`s  cCsJ|j|jkrBy|j|j|kSWqFtk r>tSXntSdS(N(RRR/R2(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytcontains_statels  cCs~|j|jkr]y|j|j}Wntk r9q]X||k rV|j|q]dSn||j|j<|j|dS(N(RRR/RR(R Rtexisting((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRus  cCs|j}||jkry|j|}Wntk r<qX||k r|j}|dk rtjdtj||jfqqt Sn||j|<|j |t S(NsZCan't attach instance %s; another instance with key %s is already present in this session.( RRR/R.R,tsa_exctInvalidRequestErrortorm_utilt state_strR2RtTrue(R RRtexisting_stateR0((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRs      "  cCs||j|<|j|_dS(N(RR R(R RR((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRs cCs]||jkr|Sy|j|}Wntk r8|SX|j}|dkrU|S|SdS(N(RR/R.R,(R RR"RR0((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytgets   cCsX|j}g}x?|D]7}|j}|dk r|j|j|fqqW|S(N(t all_statesR.R,tappendR(R tvaluestresultRR'((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytitemss    cCsO|j}g}x6|D].}|j}|dk r|j|qqW|S(N(R=R.R,R>(R R?R@RR'((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR?s    cCst|jS(N(titerR (R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt__iter__scCst|jS(N(RBRA(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt iteritemsscCst|jS(N(RBR?(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt itervaluesscCs-tjr|jjSt|jjSdS(N(Rtpy2kRR?tlist(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR=s  cCsQy|j|j}Wntk r'n&X||krM|jj|jdndS(N(RRR/R!R,(R Rtst((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyt _fast_discards   cCs|j|dS(N(t safe_discard(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRscCss|j|jkroy|j|j}Wntk r9qoX||kro|jj|jd|j|qondS(N(RRR/R!R,R(R RRH((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRJs  cCsdS(Ni((R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pytprunesN(R*R+R1R3R4RRRR,R<RAR?RCRRFRDRER=RIRRJRK(((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR-Xs$            tStrongInstanceDictcBseZdZejr*dZdZndZdZdZ ddZ dZ dZ d Zd Zd Zd Zd ZdZdZdZdZRS(s&A 'strong-referencing' version of the identity map. .. deprecated 1.1:: The strong reference identity map is legacy. See the recipe at :ref:`session_referencing_behavior` for an event-based approach to maintaining strong identity references. cCs |jjS(N(RRE(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyREscCs |jjS(N(RRD(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRDscCs t|jS(N(RBR(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRC scCs |j|S(N(R(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR1 scCs ||jkS(N(R(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR3scCs|jj||S(N(RR<(R RR"((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR<scCs |jjS(N(RR?(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR?scCs |jjS(N(RRA(R ((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRAscCs&g|jD]}tj|^q S(N(R?Rtinstance_state(R R0((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR=scCs)|j|ko(tj||j|kS(N(RRRM(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR4scCs{|j|jkrT|j|j}tj|}||k rM|j|qTdSn|j|j|j<|j|dS(N(RRRRMRR.R(R RR5((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR$s cCs|j|krZtj|j|j|k rVtjdtj||jfntS|j |j|j<|j |t SdS(NsZCan't attach instance %s; another instance with key %s is already present in this session.( RRRMRR6R7R8R9R2R.RR:(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR0s cCs#|j|j|<|j|_dS(N(R.RR R(R RR((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyR?scCsZy|j|j}Wntk r'n/Xtj||krV|jj|jdndS(N(RRR/RRMR!R,(R RR.((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRIDs  cCs|j|dS(N(RJ(R R((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRPscCsj|j|jkrf|j|j}tj|}||krf|jj|jd|j|qfndS(N(RRRRMR!R,R(R RR.RH((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRJSs  cCst|}g|jD]}|jr|j^q}tj}|j||jj|jj|t ||_|t|S(s%prune unreferenced, non-dirty states.( R$R=RR.RtWeakValueDictionaryRRRR(R t ref_counttstdirtytkeepers((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRK[s .   N(R*R+t__doc__RRFRERDRCR1R3R,R<R?RAR=R4RRRRIRRJRK(((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyRLs&                ( RtRRR8RR6tobjectRR-RL(((sJ/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/identity.pyts H