ó V!ķ\c@s@ddlZddlZddlZddlZddlZddlmZejjdƒrjd„Z n ej Z ej r”d„Z e ZdZnd„Z ejZejZd„Zd„Zd „Zejd dkr,ddlZddlZddlZddlZd ejjfd „ƒYZnddlmZdS(iĸĸĸĸN(tsixtwincCsSytj|ƒWn+tk r>}|jtjks?‚q?nXtj||ƒdS(N(tostremovetOSErrorterrnotENOENTtrename(tcurrent_filenamet new_filenamete((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyt rename_files  cCstj|ƒdS(Ni(tinspecttgetfullargspec(tfunc((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pytaccepts_kwargs&scCstj|ƒdS(Ni(R t getargspec(R((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyR2scCsqt|dƒr|jƒSt|dƒrmt|dƒrmy|jddƒtSWqmttfk ritSXntS(sŧBackwards compat function to determine if a fileobj is seekable :param fileobj: The file-like object to determine if seekable :returns: True, if seekable. False, otherwise. tseekabletseekttellii(thasattrRRtTrueRtIOErrortFalse(tfileobj((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyR9s  cCs&t|dƒr|jƒSt|dƒS(sīDetermines whether or not a file-like object is readable. :param fileobj: The file-like object to determine if readable :returns: True, if readable. False otherwise. treadabletread(RR(R((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyRQs cCs<ttdƒr+tj|jƒd|ƒn |j|ƒdS(Ntposix_fallocatei(RRRtfilenottruncate(Rtsize((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyt fallocate^siit BaseManagercBs,eZddd„Zeddd„ƒZRS(c Csy|jjtjjjks!t‚|d k rLt|dƒ rLt dƒ‚ntj dt ƒ\}}tj dt |ƒjd|j|j|j|j|||fƒ|_djd„|jjDƒƒ}t |ƒjd||j_|jjƒ|jƒ|jƒ|_|jƒtjjj|j_tjj|t |ƒjd|j|j|j|j|jfd d ƒ|_ d S( sH Spawn a server process for this manager object t__call__sinitializer must be a callabletduplexttargettargst:css|]}t|ƒVqdS(N(tstr(t.0ti((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pys ƒst-t exitpriorityiN(!t_statetvaluetmultiprocessingtmanagerstStatetINITIALtAssertionErrortNoneRt TypeErrortPipeRtProcessttypet _run_servert _registryt_addresst_authkeyt _serializert_processtjoint _identityt__name__tnametstarttclosetrecvtSTARTEDtutiltFinalizet_finalize_managert_Clienttshutdown(tselft initializertinitargstreadertwritertident((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyRAps*!      c Cso|dk r||Œn|j||||ƒ}|j|jƒ|jƒtjjd|jƒ|jƒdS(sH Create a server, report its address and run it smanager serving at %rN( R2t_ServertsendtaddressRBR-REtinfot serve_forever( tclstregistryRRtauthkeyt serializerRNRKRLtserver((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyR7•s   N(((R?t __module__R2RAt classmethodR7(((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyR os%(R (ii(R tsysRRtsockettbotocore.compatRtplatformt startswithR RtPY3RtConnectionErrort SOCKET_ERRORR2tMAXINTterrortmaxintRRRt version_infoR-tmultiprocessing.managerstmultiprocessing.connectiontmultiprocessing.utilR.R (((s7/tmp/pip-install-usGedi/s3transfer/s3transfer/compat.pyt s2                  >