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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/lib64/python3.6/__pycache__
Viewing File: /usr/lib64/python3.6/__pycache__/tempfile.cpython-36.opt-1.pyc
3 ai�m�@sBdZddddddddd d d d d g ZddlZddlZddlZddlZ ddl Z ddl Z ddlmZddlZy ddlZWnek r�ddlZYnXejZe je jBe jBZee d�r�ee jOZeZee d�r�ee jOZee d�r�e j Z ndZ dZ!e�Z"ee d��re j#Z$nee d��re j%Z$ndd�Z$dd�Z&dd�Z'dd�Z(Gdd �d �Z)d!d"�Z*d#d$�Z+da,d%d&�Z-d'd(�Z.d)d*�Z/d+d,�Z0d-d �Z1d.d �Z2da3d/d �Z4d0d �Z5dDd2d�Z6dEd3d�Z7d4e!dfd5d�Z8Gd6d7�d7�Z9Gd8d9�d9�Z:dGd=d�Z;e j<d>k�se j=j>d?k�r e;Z?nee d@�a@dIdAd�Z?GdBd�d�ZAGdCd�deB�ZCdS)Ja�Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. All of the interfaces provided by this module can be used without fear of race conditions except for 'mktemp'. 'mktemp' is subject to race conditions and should not be used; it is provided for backward compatibility only. The default path names are returned as str. If you supply bytes as input, all return values will be in bytes. Ex: >>> tempfile.mkstemp() (4, '/tmp/tmptpu9nin8') >>> tempfile.mkdtemp(suffix=b'') b'/tmp/tmppbi8f0hy' This module also provides some data items to the user: TMP_MAX - maximum number of names that will be tried before giving up. tempdir - If this is set to a string before the first use of any routine from this module, it will be considered as another candidate location to store temporary files. �NamedTemporaryFile� TemporaryFile�SpooledTemporaryFile�TemporaryDirectory�mkstemp�mkdtemp�mktemp�TMP_MAX� gettempprefix�tempdir� gettempdir�gettempprefixb� gettempdirb�N)�Random� O_NOFOLLOW�O_BINARYi'Ztmp�lstat�statcCstj|tj�}tj|�dS)N)�_os�open�O_RDONLY�close)�fn�fd�r� /usr/lib64/python3.6/tempfile.py�_statTsrc Cs*y t|�Wntk r dSXdSdS)NFT)r�OSError)rrrr�_existsXs  rcGs`d}xJ|D]B}|dkrq t|t�r8|tkr2td��t}q |tkrHtd��t}q W|dkr\tS|S)zBLook at the type of all args and divine their implied return type.Nz1Can't mix bytes and non-bytes in path components.)� isinstance�bytes�str� TypeError)�argsZ return_type�argrrr�_infer_return_typeas  r%cCsdt|||�}|dkr|�}|dkr:|tkr0t}n tjt�}|dkrX|tkrRt�}nt�}||||fS)z9Common parameter processing for most APIs in this module.N)r%r!�templater�fsencoder r )�prefix�suffix�dir� output_typerrr�_sanitize_paramsvs  r,c@s0eZdZdZdZedd��Zdd�Zdd�Zd S) �_RandomNameSequencea,An instance of _RandomNameSequence generates an endless sequence of unpredictable strings which can safely be incorporated into file names. Each string is eight characters long. Multiple threads can safely use the same instance at the same time. _RandomNameSequence is an iterator.Z%abcdefghijklmnopqrstuvwxyz0123456789_cCs,tj�}|t|dd�kr&t�|_||_|jS)N�_rng_pid)r�getpid�getattr�_RandomZ_rngr.)�selfZcur_pidrrr�rng�s z_RandomNameSequence.rngcCs|S)Nr)r2rrr�__iter__�sz_RandomNameSequence.__iter__cs0|j�|jj���fdd�td�D�}dj|�S)Ncsg|] }����qSrr)�.0Zdummy)�c�chooserr� <listcomp>�sz0_RandomNameSequence.__next__.<locals>.<listcomp>��)� charactersr3Zchoice�range�join)r2Zlettersr)r6r7r�__next__�sz_RandomNameSequence.__next__N) �__name__� __module__� __qualname__�__doc__r;�propertyr3r4r>rrrrr-�s  r-c Cs�g}x$dD]}tj|�}|r |j|�q Wtjdkr\|jtjjd�tjjd�ddd d g�n|jd d d g�y|jtj��Wn$t t fk r�|jtj �YnX|S)z[Generate a list of candidate temporary directories which _get_default_tempdir will try.�TMPDIR�TEMP�TMP�ntz~\AppData\Local\Tempz%SYSTEMROOT%\Tempzc:\tempzc:\tmpz\tempz\tmpz/tmpz/var/tmpz/usr/tmp)rDrErF) r�getenv�append�name�extend�path� expanduser� expandvars�getcwd�AttributeErrorr�curdir)�dirlistZenvname�dirnamerrr�_candidate_tempdir_list�s    rTcCs4t�}t�}�x|D�]}|tjkr0tjj|�}x�td�D]�}t|�}tjj||�}y\tj |t d�}z<z*t j |ddd��}|j d�WdQRXWdtj |�XWdtj|�X|Stk r�Yq:tk �rtjdkr�tjj|�r�tj|tj�r�w:PYq:tk �rPYq:Xq:WqWttjd |��dS) aqCalculate the default directory to use for temporary files. This routine should be called exactly once. We determine whether or not a candidate temp dir is usable by trying to create and write to a file in that directory. If this is successful, the test file is deleted. To prevent denial of service, the name of the test file must be randomized.�di��wbF)�closefdsblatNrGz)No usable temporary directory found in %s)r-rTrrQrL�abspathr<�nextr=r�_bin_openflags�_io�writer�unlink�FileExistsError�PermissionErrorrJ�isdir�access�W_OKr�FileNotFoundError�_errno�ENOENT)ZnamerrRr*�seqrJ�filenamer�fprrr�_get_default_tempdir�s:    ric Cs2tdkr.tj�ztdkr t�aWdtj�XtS)z7Common setup sequence for all user-callable interfaces.N)�_name_sequence� _once_lock�acquirer-�releaserrrr�_get_candidate_names�s  rnc Cs�t�}|tkrttj|�}x�tt�D]�}t|�}tjj ||||�}ytj ||d�} WnRt k rnw$Yn>t k r�tj dkr�tjj|�r�tj|tj�r�w$n�YnX| tjj|�fSWt tjd��dS)z>Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.i�rGz#No usable temporary file name foundN)rnr �maprr'r<rrYrLr=rr^r_rJr`rarbrXrd�EEXIST) r*ZpreZsuf�flagsr+�namesrfrJ�filerrrr�_mkstemp_inner�s$ rtcGsJ|tjkr ||f|�ddi�n&tjdks8tjj|� rF||f|��dS)N�follow_symlinksFrG)r�supports_follow_symlinksrJrL�islink)�funcrLr#rrr�_dont_follow_symlinkss ryc Cs>y tj}Wntk rYnXt||d�ttj|d�dS)Nri�)r�chflagsrPry�chmod)rLrzrrr� _resetpermss   r|cCstS)z-The default prefix for temporary directories.)r&rrrrr *scCs tjt��S)z6The default prefix for temporary directories as bytes.)rr'r rrrrr .sc Cs2tdkr.tj�ztdkr t�aWdtj�XtS)zAccessor for tempfile.tempdir.N)r rkrlrirmrrrrr 4s  cCs tjt��S)z)A bytes version of tempfile.gettempdir().)rr'r rrrrr @sFcCs2t|||�\}}}}|rt}nt}t|||||�S)a�User-callable function to create and return a unique temporary file. The return value is a pair (fd, name) where fd is the file descriptor returned by os.open, and name is the filename. If 'suffix' is not None, the file name will end with that suffix, otherwise there will be no suffix. If 'prefix' is not None, the file name will begin with that prefix, otherwise a default prefix is used. If 'dir' is not None, the file will be created in that directory, otherwise a default directory is used. If 'text' is specified and true, the file is opened in text mode. Else (the default) the file is opened in binary mode. On some operating systems, this makes no difference. If any of 'suffix', 'prefix' and 'dir' are not None, they must be the same type. If they are bytes, the returned name will be bytes; str otherwise. The file is readable and writable only by the creating user ID. If the operating system uses permission bits to indicate whether a file is executable, the file is executable by no one. The file descriptor is not inherited by children of this process. Caller is responsible for deleting the file when done with it. )r,�_text_openflagsrZrt)r)r(r*�textr+rqrrrrDs c Cs�t|||�\}}}}t�}|tkr.ttj|�}x�tt�D]�}t|�}tj j ||||�}ytj |d�WnRt k r�w8Yn>t k r�tjdkr�tj j|�r�tj|tj�r�w8n�YnX|SWt tjd��dS)aUser-callable function to create and return a unique temporary directory. The return value is the pathname of the directory. Arguments are as for mkstemp, except that the 'text' argument is not accepted. The directory is readable, writable, and searchable only by the creating user. Caller is responsible for deleting the directory when done with it. i�rGz(No usable temporary directory name foundN)r,rnr rorr'r<rrYrLr=�mkdirr^r_rJr`rarbrdrp)r)r(r*r+rrrfrJrsrrrrls&  r:cCs`|dkrt�}t�}x:tt�D].}t|�}tjj||||�}t|�s|SqWt t j d��dS)a�User-callable function to return a unique temporary file name. The file is not created. Arguments are similar to mkstemp, except that the 'text' argument is not accepted, and suffix=None, prefix=None and bytes file names are not supported. THIS FUNCTION IS UNSAFE AND SHOULD NOT BE USED. The file name may refer to a file that did not exist at some point, but by the time you get around to creating it, someone else may have beaten you to the punch. Nz"No usable temporary filename found) r rnr<rrYrrLr=rr^rdrp)r)r(r*rrrfrJrsrrrr�sc@sLeZdZdZdZdZd dd�Zejdkr@ej fdd �Z d d �Z nd d �Z dS)�_TemporaryFileCloserz�A separate object allowing proper closing of a temporary file's underlying file object, without adding a __del__ method to the temporary file.NFTcCs||_||_||_dS)N)rsrJ�delete)r2rsrJr�rrr�__init__�sz_TemporaryFileCloser.__init__rGc Cs>|j r:|jdk r:d|_z|jj�Wd|jr8||j�XdS)NT)� close_calledrsrr�rJ)r2r]rrrr�s z_TemporaryFileCloser.closecCs |j�dS)N)r)r2rrr�__del__�sz_TemporaryFileCloser.__del__cCs|jsd|_|jj�dS)NT)r�rsr)r2rrrr�s)T) r?r@rArBrsr�r�rrJr]rr�rrrrr��s   r�c@sBeZdZdZddd�Zdd�Zdd�Zd d �Zd d �Zd d�Z dS)�_TemporaryFileWrapperz�Temporary file wrapper This class provides a wrapper around files opened for temporary use. In particular, it seeks to automatically remove the file when it is no longer needed. TcCs$||_||_||_t|||�|_dS)N)rsrJr�r��_closer)r2rsrJr�rrrr��sz_TemporaryFileWrapper.__init__cs^|jd}t||�}t|d�rD|�tj���fdd��}|j|_|}t|t�sZt|||�|S)Nrs�__call__cs �||�S)Nr)r#�kwargs)rxrr� func_wrapper�sz7_TemporaryFileWrapper.__getattr__.<locals>.func_wrapper) �__dict__r0�hasattr� _functools�wrapsr�r�int�setattr)r2rJrs�ar�r)rxr� __getattr__�s     z!_TemporaryFileWrapper.__getattr__cCs|jj�|S)N)rs� __enter__)r2rrrr�s z_TemporaryFileWrapper.__enter__cCs|jj|||�}|j�|S)N)rs�__exit__r)r2�exc�value�tb�resultrrrr�sz_TemporaryFileWrapper.__exit__cCs|jj�dS)zA Close the temporary file, possibly deleting it. N)r�r)r2rrrr sz_TemporaryFileWrapper.closeccsx|jD] }|VqWdS)N)rs)r2�linerrrr4s z_TemporaryFileWrapper.__iter__N)T) r?r@rArBr�r�r�r�rr4rrrrr��s r��w+b�Tc Cs�t|||�\}}}}t} tjdkr0|r0| tjO} t|||| |�\} } y tj| ||||d�} t| | |�St k r�tj | �tj | ��YnXdS)a�Create and return a temporary file. Arguments: 'prefix', 'suffix', 'dir' -- as for mkstemp. 'mode' -- the mode argument to io.open (default "w+b"). 'buffering' -- the buffer size argument to io.open (default -1). 'encoding' -- the encoding argument to io.open (default None) 'newline' -- the newline argument to io.open (default None) 'delete' -- whether the file is deleted on close (default True). The file is created as mkstemp() would do it. Returns an object with a file-like interface; the name of the file is accessible as its 'name' attribute. The file will be automatically deleted when it is closed unless the 'delete' argument is set to False. rG)� buffering�newline�encodingN) r,rZrrJZ O_TEMPORARYrtr[rr�� BaseExceptionr]r) �moder�r�r�r)r(r*r�r+rqrrJrsrrrrs      �posix�cygwin� O_TMPFILEc Cs�t|||�\}}}}t}tr�y$|tjBtj@} tj|| d�} Wn*tk rXdaYnBtk rjYn0Xyt j| ||||d�Stj | ��YnXt |||||�\} } ytj | �t j| ||||d�Stj | ��YnXdS)a>Create and return a temporary file. Arguments: 'prefix', 'suffix', 'dir' -- as for mkstemp. 'mode' -- the mode argument to io.open (default "w+b"). 'buffering' -- the buffer size argument to io.open (default -1). 'encoding' -- the encoding argument to io.open (default None) 'newline' -- the newline argument to io.open (default None) The file is created as mkstemp() would do it. Returns an object with a file-like interface. The file has no name, and will cease to exist when it is closed. i�F)r�r�r�N) r,rZ�_O_TMPFILE_WORKSrr��O_CREATr�IsADirectoryErrorrr[rrtr]) r�r�r�r�r)r(r*r+rqZflags2rrJrrrrNs0       c@s�eZdZdZdZd8dd�Zd d �Zd d �Zd d�Zdd�Z dd�Z dd�Z e dd��Z e dd��Zdd�Zdd�Zdd�Ze dd ��Ze d!d"��Ze d#d$��Zd%d&�Zd'd(�Zd)d*�Zd+d,�Ze d-d.��Zd/d0�Zd9d1d2�Zd3d4�Zd5d6�ZdS):rz�Temporary file wrapper, specialized to switch from BytesIO or StringIO to a real file when it exceeds a certain size or when a fileno is needed. Fr�w+br�Nc CsHd|krtj�|_ntjdd�|_||_d|_|||||||d�|_dS)N�b� )r�F)r�r�r)r(r�r�r*)r[�BytesIO�_file�StringIO� _max_size�_rolled�_TemporaryFileArgs) r2�max_sizer�r�r�r�r)r(r*rrrr��s zSpooledTemporaryFile.__init__cCs,|jr dS|j}|r(|j�|kr(|j�dS)N)r�r��tell�rollover)r2rsr�rrr�_check�s zSpooledTemporaryFile._checkcCsN|jr dS|j}tf|j�}|_|`|j|j��|j|j�d�d|_dS)NrT)r�r�rr�r\�getvalue�seekr�)r2rsZnewfilerrrr��szSpooledTemporaryFile.rollovercCs|jjrtd��|S)Nz%Cannot enter context with closed file)r��closed� ValueError)r2rrrr��szSpooledTemporaryFile.__enter__cCs|jj�dS)N)r�r)r2r�r�r�rrrr��szSpooledTemporaryFile.__exit__cCs |jj�S)N)r�r4)r2rrrr4�szSpooledTemporaryFile.__iter__cCs|jj�dS)N)r�r)r2rrrr�szSpooledTemporaryFile.closecCs|jjS)N)r�r�)r2rrrr��szSpooledTemporaryFile.closedc Cs8y|jjStk r2d|jdkr(�|jdSXdS)Nr�r�r�)r�r�rPr�)r2rrrr��s zSpooledTemporaryFile.encodingcCs|j�|jj�S)N)r�r��fileno)r2rrrr��szSpooledTemporaryFile.filenocCs|jj�dS)N)r��flush)r2rrrr��szSpooledTemporaryFile.flushcCs |jj�S)N)r��isatty)r2rrrr��szSpooledTemporaryFile.isattyc Cs(y|jjStk r"|jdSXdS)Nr�)r�r�rPr�)r2rrrr��szSpooledTemporaryFile.modec Cs"y|jjStk rdSXdS)N)r�rJrP)r2rrrrJ�szSpooledTemporaryFile.namec Cs8y|jjStk r2d|jdkr(�|jdSXdS)Nr�r�r�)r��newlinesrPr�)r2rrrr��s zSpooledTemporaryFile.newlinescGs |jj|�S)N)r��read)r2r#rrrr��szSpooledTemporaryFile.readcGs |jj|�S)N)r��readline)r2r#rrrr��szSpooledTemporaryFile.readlinecGs |jj|�S)N)r�� readlines)r2r#rrrr��szSpooledTemporaryFile.readlinescGs|jj|�dS)N)r�r�)r2r#rrrr��szSpooledTemporaryFile.seekcCs|jjS)N)r�� softspace)r2rrrr�szSpooledTemporaryFile.softspacecCs |jj�S)N)r�r�)r2rrrr�szSpooledTemporaryFile.tellcCs6|dkr|jj�n||jkr&|j�|jj|�dS)N)r��truncater�r�)r2�sizerrrr�s   zSpooledTemporaryFile.truncatecCs|j}|j|�}|j|�|S)N)r�r\r�)r2�srs�rvrrrr\s  zSpooledTemporaryFile.writecCs|j}|j|�}|j|�|S)N)r�� writelinesr�)r2�iterablersr�rrrr�s  zSpooledTemporaryFile.writelines���)rr�r�NNNNN)N)r?r@rArBr�r�r�r�r�r�r4rrCr�r�r�r�r�r�rJr�r�r�r�r�r�r�r�r\r�rrrrr�s8        c@sReZdZdZddd�Zedd��Zedd��Zd d �Zd d �Z d d�Z dd�Z dS)ra+Create and return a temporary directory. This has the same behavior as mkdtemp but can be used as a context manager. For example: with TemporaryDirectory() as tmpdir: ... Upon exiting the context, the directory and everything contained in it are removed. NcCs0t|||�|_tj||j|jdj|�d�|_dS)NzImplicitly cleaning up {!r})� warn_message)rrJ�_weakref�finalize�_cleanup�format� _finalizer)r2r)r(r*rrrr�(s zTemporaryDirectory.__init__cs ��fdd�}tj�|d�dS)Ncs�t|dt�r|yV|�kr(ttjj|��t|�ytj|�Wn"ttfk r`�j|�YnXWq�t k rxYq�Xnt|dt �r�n�dS)Nr) � issubclassr_r|rrLrSr]r��_rmtreerc)rxrL�exc_info)�clsrJrr�onerror0sz+TemporaryDirectory._rmtree.<locals>.onerror)r�)�_shutilZrmtree)r�rJr�r)r�rJrr�.szTemporaryDirectory._rmtreecCs|j|�tj|t�dS)N)r�� _warnings�warn�ResourceWarning)r�rJr�rrrr�Es zTemporaryDirectory._cleanupcCsdj|jj|j�S)Nz <{} {!r}>)r�� __class__r?rJ)r2rrr�__repr__JszTemporaryDirectory.__repr__cCs|jS)N)rJ)r2rrrr�MszTemporaryDirectory.__enter__cCs |j�dS)N)�cleanup)r2r�r�r�rrrr�PszTemporaryDirectory.__exit__cCs|jj�r|j|j�dS)N)r��detachr�rJ)r2rrrr�Ss zTemporaryDirectory.cleanup)NNN) r?r@rArBr�� classmethodr�r�r�r�r�r�rrrrrs    )NNNF)NNNr�)r�r�NNNNNTr�)r�r�NNNNN)DrB�__all__� functoolsr��warningsr��ior[�osrZshutilr��errnordZrandomrr1�weakrefr��_thread� ImportErrorZ _dummy_thread� allocate_lockZ_allocate_lock�O_RDWRr��O_EXCLr}r�rrZrrr&rkrrrrr%r,r-rTrirjrnrtryr|r r r r r rrrr�r�rrJ�sys�platformrr�r�objectrrrrr�<module>s�          -   ( ' +? $  8