grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jsã@s gd¢ZddlZddlZddlZddlZddl Z ddl Z ddl mZddlZddlZddlZddlZejZejejBejBZeedƒrIeejOZeZeedƒrUeej OZeedƒr^ej!Z!ndZ!dZ"eƒZ#d d „Z$d d „Z%d d„Z&Gdd„dƒZ'dd„Z(dd„Z)da*dd„Z+dd„Z,dd„Z-dd„Z.dd„Z/dd „Z0da1d!d"„Z2d#d$„Z3d%d&„Z4dBd(d)„Z5dCd*d+„Z6d,e"dfd-d.„Z7Gd/d0„d0ƒZ8Gd1d2„d2ƒZ9   5dDdd6œd7d8„Z:ej;d9ksÝej   dEdd6œdd?„d?ƒZ?Gd@dA„dAƒZ@dS)F) ÚNamedTemporaryFileÚ TemporaryFileÚSpooledTemporaryFileÚTemporaryDirectoryÚmkstempÚmkdtempÚmktempÚTMP_MAXÚ gettempprefixÚtempdirÚ gettempdirÚgettempprefixbÚ gettempdirbéN)ÚRandomÚ O_NOFOLLOWÚO_BINARYri'ÚtmpcCs&zt |¡WdStyYdSw)NFT)Ú_osÚlstatÚOSError)Úfn©rú//opt/alt/python310/lib64/python3.10/tempfile.pyÚ_existsLs   ýÿrcGsŠ d}|D],}|dur qt|tjƒrt |¡}t|tƒr'|tur$tdƒ‚t}q|tur/tdƒ‚t}q|durCtdus?tttƒrAtStS|S)Nz1Can't mix bytes and non-bytes in path components.)Ú isinstancerÚPathLikeÚfspathÚbytesÚstrÚ TypeErrorr )ÚargsZ return_typeÚargrrrÚ_infer_return_typeUs&   r"cCsf t|||ƒ}|dur|ƒ}|dur|turt}nt t¡}|dur-|tur*tƒ}ntƒ}||||fS©N)r"rÚtemplaterÚfsencoder r )ÚprefixÚsuffixÚdirÚ output_typerrrÚ_sanitize_paramsrs   r*c@s.eZdZ dZedd„ƒZdd„Zdd„ZdS) Ú_RandomNameSequenceZ%abcdefghijklmnopqrstuvwxyz0123456789_cCs,t ¡}|t|ddƒkrtƒ|_||_|jS)NÚ_rng_pid)rÚgetpidÚgetattrÚ_RandomZ_rngr,)ÚselfZcur_pidrrrÚrngŽs z_RandomNameSequence.rngcCs|Sr#r©r0rrrÚ__iter__–sz_RandomNameSequence.__iter__cCsd |jj|jdd�¡S)NÚé)Úk)Újoinr1ÚchoicesÚ charactersr2rrrÚ__next__™sz_RandomNameSequence.__next__N)Ú__name__Ú __module__Ú __qualname__r9Úpropertyr1r3r:rrrrr+„s  r+c Cs¢ g}dD]}t |¡}|r| |¡qtjdkr-| tj d¡tj d¡ddddg¡n| gd ¢¡z | t ¡¡W|St t fyP| tj ¡Y|Sw) N)ZTMPDIRZTEMPZTMPÚntz~\AppData\Local\Tempz%SYSTEMROOT%\Tempzc:\tempzc:\tmpz\tempz\tmp)z/tmpz/var/tmpz/usr/tmp) rÚgetenvÚappendÚnameÚextendÚpathÚ expanduserÚ expandvarsÚgetcwdÚAttributeErrorrÚcurdir)ÚdirlistZenvnameÚdirnamerrrÚ_candidate_tempdir_listœs& €  þýýrLc Cs  tƒ}tƒ}|D]~}|tjkrtj |¡}tdƒD]l}t|ƒ}tj ||¡}z0t  |t d¡}zz t  |d¡Wt  |¡nt  |¡wWt  |¡nt  |¡w|WSty`Yqty}tjdkrztj |¡rzt |tj¡rzYqYn ty†Ynwq ttjd|ƒ‚)Nédé€sblatr?z)No usable temporary directory found in %s)r+rLrrIrDÚabspathÚrangeÚnextr7ÚopenÚ_bin_openflagsÚwriteÚcloseÚunlinkÚFileExistsErrorÚPermissionErrorrBÚisdirÚaccessÚW_OKrÚFileNotFoundErrorÚ_errnoZENOENT)ZnamerrJr(ÚseqrBÚfilenameÚfdrrrÚ_get_default_tempdir·sD      ÿ ÿ€ÿÿracCóL tdur$t ¡ztdurtƒaWt ¡tSWt ¡tSt ¡wtSr#)Ú_name_sequenceÚ _once_lockÚacquirer+ÚreleaserrrrÚ_get_candidate_namesåsü ÿrgc CsÒ tj |¡}tƒ}|turttj|ƒ}ttƒD]J}t |ƒ}tj  ||||¡}t   d|¡z t  ||d¡} Wn$tyAYqty\tjdkr[tj |¡r[t |tj¡r[Yq‚w| |fSttjdƒ‚)Nztempfile.mkstemprNr?z#No usable temporary file name found)rrDrOrgrÚmapr%rPrrQr7Ú_sysÚauditrRrWrXrBrYrZr[r]ÚEEXIST) r(ZpreZsufÚflagsr)Únamesr^rBÚfiler`rrrÚ_mkstemp_innerós0       ÿù ÿrocGsR|tjvr||g|¢RddiŽdStjdkstj |¡s'||g|¢RŽdSdS)NÚfollow_symlinksFr?)rÚsupports_follow_symlinksrBrDÚislink)ÚfuncrDr rrrÚ_dont_follow_symlinkss ÿrtcCs<ztj}Wn tyYnwt||dƒttj|dƒdS)NréÀ)rÚchflagsrHrtÚchmod)rDrvrrrÚ _resetpermss  ÿ rxcCó t t¡Sr#)rÚfsdecoder$rrrrr #ó r cCryr#)rr%r$rrrrr 'r{r cCrbr#)r rdrerarfrrrrÚ _gettempdir-sü ÿr|cCó t tƒ¡Sr#)rrzr|rrrrr 9ó r cCr}r#)rr%r|rrrrr =r~r FcCs4 t|||ƒ\}}}}|rt}nt}t|||||ƒSr#)r*Ú_text_openflagsrSro)r'r&r(Útextr)rlrrrrAs rc CsÒ t|||ƒ\}}}}tƒ}|turttj|ƒ}ttƒD]F}t|ƒ}tj   ||||¡}t   d|¡z t  |d¡W|StyGYqtybtjdkratj  |¡rat |tj¡raYq‚wttjdƒ‚)Nztempfile.mkdtemprur?z(No usable temporary directory name found)r*rgrrhrr%rPrrQrDr7rirjÚmkdirrWrXrBrYrZr[r]rk)r'r&r(r)rmr^rBrnrrrrhs0     ö  ÿù ÿrr4cCs^ |durtƒ}tƒ}ttƒD]}t|ƒ}tj ||||¡}t|ƒs(|Sqt t j dƒ‚)Nz"No usable temporary filename found) r rgrPrrQrrDr7rrWr]rk)r'r&r(rmr^rBrnrrrr�s ÿÿrc@sLeZdZ dZdZd dd„Zejdkr ejfdd„Z d d „Z dSd d„Z dS) Ú_TemporaryFileCloserNFTcCs||_||_||_dSr#)rnrBÚdelete©r0rnrBrƒrrrÚ__init__¸s z_TemporaryFileCloser.__init__r?cCsX|js(|jdur*d|_z|j ¡W|jr||jƒdSdS|jr'||jƒwwdSdS©NT)Ú close_calledrnrUrƒrB)r0rVrrrrUÇs  ÿ ÿûz_TemporaryFileCloser.closecCó | ¡dSr#)rUr2rrrÚ__del__Ñó z_TemporaryFileCloser.__del__cCs|js d|_|j ¡dSdSr†)r‡rnrUr2rrrrUÕsþ©T) r;r<r=rnr‡r…rrBrVrUr‰rrrrr‚°s   r‚c@s@eZdZ ddd„Zdd„Zdd„Zdd „Zd d „Zd d „ZdS)Ú_TemporaryFileWrapperTcCs$||_||_||_t|||ƒ|_dSr#)rnrBrƒr‚Ú_closerr„rrrr…ãsz_TemporaryFileWrapper.__init__cs^|jd}t||ƒ}t|dƒr"|‰t ˆ¡‡fdd„ƒ}|j|_|}t|tƒs-t|||ƒ|S)NrnÚ__call__csˆ|i|¤ŽSr#r)r Úkwargs©rsrrÚ func_wrapperñsz7_TemporaryFileWrapper.__getattr__..func_wrapper) Ú__dict__r.ÚhasattrÚ _functoolsÚwrapsr�rÚintÚsetattr)r0rBrnÚar‘rr�rÚ __getattr__és     z!_TemporaryFileWrapper.__getattr__cCs|j ¡|Sr#)rnÚ __enter__r2rrrršþs z_TemporaryFileWrapper.__enter__cCs|j |||¡}| ¡|Sr#)rnÚ__exit__rU)r0ÚexcÚvalueÚtbÚresultrrrr›sz_TemporaryFileWrapper.__exit__cCs |j ¡dSr#)r�rUr2rrrrU sz_TemporaryFileWrapper.closeccs�|jD]}|VqdSr#)rn)r0Úlinerrrr3s€ ÿz_TemporaryFileWrapper.__iter__Nr‹) r;r<r=r…r™ršr›rUr3rrrrrŒÛs  rŒúw+béÿÿÿÿT©Úerrorsc sà tˆˆˆƒ\‰‰‰‰t‰tjdkr|rˆtjO‰d|vr"t |¡}d‰‡‡‡‡‡‡fdd„} z,tjˆ|||||| d�} zt| d| ƒ} t| d| ƒ} ˆ| _t | ˆ|ƒWWS|   ¡‚ˆdurotjdkrj|sot  ˆ¡‚)Nr?Úbcstˆˆˆˆˆƒ\}‰|Sr#)ro)r r`©r(rlrBr)r&r'rrÚopener:sz"NamedTemporaryFile..opener©Ú bufferingÚnewlineÚencodingr¤r§ÚbufferÚraw) r*rSrrBZ O_TEMPORARYÚ_ioÚ text_encodingrRr.rŒrUrV) Úmoder©r«rªr'r&r(rƒr¤r§rnr­rr¦rrs4   þ   rÚposixÚcygwinÚ O_TMPFILEc sü d|vr t |¡}tˆˆˆƒ\‰‰‰‰t‰trTd‰‡‡‡fdd„}ztjˆ||||||d�} t| d| ƒ} t| d| ƒ} ˆ| _| WStyKdaYn t ySYnwd‰‡‡‡‡‡‡fdd„}tjˆ||||||d�} t| d| ƒ} t| d| ƒ} ˆ| _| S) Nr¥cs$ˆtjBtj@}t ˆ|d¡‰ˆS)NrN)rr³ÚO_CREATrR)r Zflags2)r(r`rlrrr§tszTemporaryFile..openerr¨r¬r­Fc sJtˆˆˆˆˆƒ\‰}zt |¡WˆSty$}zt ˆ¡‚d}~wwr#)rorrVÚ BaseExceptionrU)r rBÚe©r(r`rlr)r&r'rrr§”s ý €þ) r®r¯r*rSÚ_O_TMPFILE_WORKSrRr.rBÚIsADirectoryErrorr) r°r©r«rªr'r&r(r¤r§rnr­rr·rrZs@  þ    ø  þ  rc@seZdZ dZ   d7ddœdd„ZeejƒZd d „Z d d „Z d d„Z dd„Z dd„Z dd„Zedd„ƒZedd„ƒZedd„ƒZdd„Zdd„Zdd „Zed!d"„ƒZed#d$„ƒZed%d&„ƒZd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd8d1d2„Zd3d4„Zd5d6„Z dS)9rFrr¡r¢Nr£c  Cs^d|vr t ¡|_nt |¡}tjt ¡|| |d�|_||_d|_|||||||| dœ|_dS)Nr¥)r«r¤rªF)r°r©r'r&r«rªr(r¤)r®ÚBytesIOÚ_filer¯Ú TextIOWrapperÚ _max_sizeÚ_rolledÚ_TemporaryFileArgs) r0Úmax_sizer°r©r«rªr'r&r(r¤rrrr…¬s   þ ýzSpooledTemporaryFile.__init__cCs4|jrdS|j}|r| ¡|kr| ¡dSdSdSr#)r¾r½ÚtellÚrollover)r0rnrÀrrrÚ_check¿s  ÿzSpooledTemporaryFile._checkcCsv|jrdS|j}tdi|j¤Ž}|_|`| ¡}t|dƒr)|j | ¡  ¡¡n| |  ¡¡|  |d¡d|_dS)Nr¬rTr) r¾r»rr¿rÁr“r¬rTÚdetachÚgetvalueÚseek)r0rnZnewfileÚposrrrrÂÅs    zSpooledTemporaryFile.rollovercCs|jjrtdƒ‚|S)Nz%Cannot enter context with closed file)r»ÚclosedÚ ValueErrorr2rrrršÚszSpooledTemporaryFile.__enter__cCó|j ¡dSr#©r»rU©r0rœr�ržrrrr›ßózSpooledTemporaryFile.__exit__cCó |j ¡Sr#)r»r3r2rrrr3ãó zSpooledTemporaryFile.__iter__cCrÊr#rËr2rrrrUærÍzSpooledTemporaryFile.closecCó|jjSr#)r»rÈr2rrrrÈéózSpooledTemporaryFile.closedcCrÐr#)r»r«r2rrrr«írÑzSpooledTemporaryFile.encodingcCrÐr#)r»r¤r2rrrr¤ñrÑzSpooledTemporaryFile.errorscCs| ¡|j ¡Sr#)rÂr»Úfilenor2rrrrÒõs zSpooledTemporaryFile.filenocCrÊr#)r»Úflushr2rrrrÓùrÍzSpooledTemporaryFile.flushcCrÎr#)r»Úisattyr2rrrrÔürÏzSpooledTemporaryFile.isattycCs(z|jjWSty|jdYSw)Nr°)r»r°rHr¿r2rrrr°ÿs   ÿzSpooledTemporaryFile.modecCs z|jjWStyYdSwr#)r»rBrHr2rrrrBs   ÿzSpooledTemporaryFile.namecCrÐr#)r»Únewlinesr2rrrrÕ rÑzSpooledTemporaryFile.newlinescGó |jj|ŽSr#)r»Úread©r0r rrrr×rŠzSpooledTemporaryFile.readcGrÖr#)r»ÚreadlinerØrrrrÙrŠzSpooledTemporaryFile.readlinecGrÖr#)r»Ú readlinesrØrrrrÚrŠzSpooledTemporaryFile.readlinescGrÖr#)r»rÆrØrrrrÆrŠzSpooledTemporaryFile.seekcCrÎr#)r»rÁr2rrrrÁrÏzSpooledTemporaryFile.tellcCs8|dur |j ¡dS||jkr| ¡|j |¡dSr#)r»Útruncater½rÂ)r0ÚsizerrrrÛ s  zSpooledTemporaryFile.truncatecCó|j}| |¡}| |¡|Sr#)r»rTrÃ)r0ÚsrnÚrvrrrrT(ó  zSpooledTemporaryFile.writecCrÝr#)r»Ú writelinesrÃ)r0Úiterablernrßrrrrá.ràzSpooledTemporaryFile.writelines)rr¡r¢NNNNNr#)!r;r<r=r¾r…Ú classmethodÚ_typesÚ GenericAliasÚ__class_getitem__rÃrÂršr›r3rUr>rÈr«r¤rÒrÓrÔr°rBrÕr×rÙrÚrÆrÁrÛrTrárrrrr¥sNþ þ         rc@sbeZdZ  ddd„Zeddd„ƒZeddd„ƒZd d „Zd d „Zd d„Z dd„Z ee j ƒZ dS)rNFcCs:t|||ƒ|_||_tj||j|jd |¡|jd�|_dS)NzImplicitly cleaning up {!r})Ú warn_messageÚ ignore_errors)rrBÚ_ignore_cleanup_errorsÚ_weakrefZfinalizeÚ_cleanupÚformatÚ _finalizer)r0r'r&r(Zignore_cleanup_errorsrrrr…As  ýzTemporaryDirectory.__init__cs"‡‡‡fdd„}tjˆ|d�dS)Nc sžt|dtƒrAz/|ˆkrttj |¡ƒt|ƒz t |¡WWdSttfy3ˆj|ˆd�YnwWdSt y@YdSwt|dt ƒrJdSˆsM‚dS)Nr©rè) Ú issubclassrXrxrrDrKrVr¹Ú_rmtreer\)rsrDÚexc_info©ÚclsrèrBrrÚonerrorLs&ÿ ÿÿz+TemporaryDirectory._rmtree..onerror)rô)Ú_shutilZrmtree)rórBrèrôrròrrðJszTemporaryDirectory._rmtreecCs|j||d�t |t¡dS©Nrî)rðÚ _warningsÚwarnÚResourceWarning)rórBrçrèrrrrëbszTemporaryDirectory._cleanupcCsd |jj|j¡S)Nz <{} {!r}>)rìÚ __class__r;rBr2rrrÚ__repr__gszTemporaryDirectory.__repr__cCs|jSr#)rBr2rrrršjszTemporaryDirectory.__enter__cCrˆr#)ÚcleanuprÌrrrr›mrŠzTemporaryDirectory.__exit__cCs2|j ¡s tj |j¡r|j|j|jd�dSdSrö)rírÄrrDÚexistsrBrðrér2rrrrüpsÿzTemporaryDirectory.cleanup©NNNF)F)r;r<r=r…rãrðrërûršr›rürärårærrrrr5s  ÿ  rrþ)NNN)r¡r¢NNNNNT)r¡r¢NNNNN)AÚ__all__Ú functoolsr”Úwarningsr÷Úior®ÚosrZshutilrõÚerrnor]Zrandomrr/ÚsysriÚtypesräÚweakrefrêÚ_threadÚ allocate_lockZ_allocate_lockÚO_RDWRr´ÚO_EXCLrr“rrSrrr$rdrr"r*r+rLrarcrgrortrxr r r r|r r rrrr‚rŒrrBÚplatformrr¸rrrrrrÚs‚        ,    '( +?þ þ5 þ þK