Vcp!cs ddlmZmZmZddlmZddlZgdZGddej j Z Gddej j Z Gd d e Z Gd d e ZddZdS))DEFAULT_PROTOCOLPickler Unpickler)BytesION)Shelf BsdDbShelfDbfilenameShelfopencs4eZdZ dZexZxZxZxZxZZ dZ dS) _ClosedDictcs td)Nz!invalid operation on closed shelf)Z ValueError)selfZargs /usr/lib64/python3.11/shelve.pyclosedz_ClosedDict.closedEs<===csdS)Nzr  r __repr__z_ClosedDict.__repr__Is$$rN) __name__ __module__ __qualname__r __iter____len__ __getitem__ __setitem__ __delitem__keysrrrr r r BsSD>>>JPPHPwPP{P[4%%%%%rr csfeZdZ ddZdZdZdZddZd Zd Z d Z d Z d Z dZ dZdZdS)rNFutf-8cs^||_|t}||_||_i|_||_dSN)dictr _protocol writebackcache keyencodingr rprotocolr r" r __init__zShelf.__init__Ts9  ('H!" &rc#szK|jD]}||jVdSr)rrdecoder")r Zkr r rzShelf.__iter__^sI!! - -A((4+,, , , , , - -rcs*t|jSr)Zlenrrrr rz Shelf.__len__bs49~~rcsD||j|jvSrencoder"rr keyr r __contains__zShelf.__contains__eszz$*++ty88rcsX||j|jvr||S|Srr()r r+Zdefault r getz Shelf.geths/ ::d& ' '49 4 9 rcs  |j|}nt#t$rgt|j||j}t |}|jr ||j|<YnwxYw|Sr) r!KeyErrorrrr)r"rloadr r r+valuef r rzShelf.__getitem__ms (JsOEE ( ( ( #**T-=">">?@@AaLL%%''E~ ("' 3  (  s A.BBcs|jr ||j|<t}t||j}||||j||j <dSr) r r!rrrZdumpZgetvaluerr)r")r r+r2r3Zpr%r rzShelf.__setitem__wsi > $#DJsO II At~ & & u 23**,, #**T-..///rcsz|j||j= |j|=dS#t$rYdSwxYwr)rr)r"r!r/r*r r rzShelf.__delitem__sO Icjj!122 3  3    DD s , ::cs|Srrrrr __enter__zShelf.__enter__s rcs.|dSr)close)r Ztyper2Z tracebackr4r __exit__zShelf.__exit__s rcs,|jdS | |jn#t$rYnwxYw t |_dS#d|_YdSxYw# t |_w#d|_YwxYwxYwr)rsyncr6ZAttributeErrorr rrr r6z Shelf.closes 9  F ! IIKKK  !!!!!      !'MM  !   !'MM  !  sOA/:A/ AA/AA/ A A,/B1BB BBcsRt|dsdS|dS)Nr )hasattrr6rrr __del__z Shelf.__del__s,t[))  F rcs|jr@|jr9d|_|jD] \}}|||< d|_i|_t|jdr|jdSdS)NFTr8)r r!Zitemsr9rr8)r r+Zentryr-r r8z Shelf.syncs > dj "DN"j..00 " " U!S !DNDJ 49f % %  INN       rNFrr)rrrr&rrr,r.rrrr5r7r6r:r8rrr rrMs 7<$''''---999 ???!!!"rrcs:eZdZ d dZdZdZdZdZd ZdS) rNFrcsBt|||||dSr)rr&r#r%r r&zBsdDbShelf.__init__s" tT8Y DDDDDrcs|j|\}}t|}||jt |fSr)r set_locationrr'r"rr0r1r4r r<zBsdDbShelf.set_locationsRy--c22 e ENN 4+,,ill.?.?.A.ABBrcst|j\}}t|}||jt |fSr)nextrrr'r"rr0r1r4r r=zBsdDbShelf.nextsJDI e ENN 4+,,ill.?.?.A.ABBrc|j\}}t|}||jt |fSr)rpreviousrr'r"rr0r1r4r r?zBsdDbShelf.previoussPy))++ e ENN 4+,,ill.?.?.A.ABBrcr>r)rfirstrr'r"rr0r1r4r r@zBsdDbShelf.firstsNy(( e ENN 4+,,ill.?.?.A.ABBrcr>r)rlastrr'r"rr0r1r4r rAzBsdDbShelf.lastsNy~~'' e ENN 4+,,ill.?.?.A.ABBrr;) rrrr&r<r=r?r@rArrr rrs 7<$EEEECCC CCC CCC CCC CCCCCrrcseZdZ ddZdS)rcNFcspddl}t||||||dS)Nr)dbmrr&r)r filenameflagr$r rCs r r&zDbfilenameShelf.__init__s7  tSXXh55xKKKKKrrBNF)rrrr&rrr rrs3 LLLLLLrrrBFcs( t||||Sr)r)rDrEr$r r4r rrs  8T8Y ? ??rrF)ZpicklerrrZiorZcollections.abcZ collectionsZ__all__ZabcZMutableMappingr rrrrrrr rGsD8t8777777777 < < <%%%%%+/0%%%_____KO *___D(C(C(C(C(C(C(C(CV L L L L Le L L L @ @ @ @ @ @r