B -<`€ ã@s¤ddlZddlZddlZddlZddlZddlmZej d¡rJdd„Z nej Z ej rhdd„Z e ZdZndd„Z ejZejZd d „Zd d „Zd d„ZddlmZdS)éN)ÚsixÚwinc CsPyt |¡Wn0tk r>}z|jtjks.‚Wdd}~XYnXt ||¡dS)N)ÚosÚremoveÚOSErrorÚerrnoÚENOENTÚrename)Zcurrent_filenameZ new_filenameÚe©r ú8/tmp/pip-target-7cdyy134/lib/python/s3transfer/compat.pyÚ rename_files  r cCst |¡dS)Né)ÚinspectÚgetfullargspec)Úfuncr r r Úaccepts_kwargs&srcCst |¡dS)Nr)rÚ getargspec)rr r r r2sc CsTt|dƒr| ¡St|dƒrPt|dƒrPy| dd¡dSttfk rNdSXdS)z»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. ÚseekableÚseekÚtellréTF)ÚhasattrrrrÚIOError)Úfileobjr r r r9s  rcCst|dƒr| ¡St|dƒS)z´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. ÚreadableÚread)rr)rr r r rQs rcCs,ttdƒrt | ¡d|¡n | |¡dS)NÚposix_fallocater)rrrÚfilenoÚtruncate)rÚsizer r r Ú fallocate^s r!)Ú BaseManager)rÚsysrrÚsocketZbotocore.compatrÚplatformÚ startswithr r ÚPY3rÚConnectionErrorZ SOCKET_ERRORÚMAXINTÚerrorZmaxintrrr!Zmultiprocessing.managersr"r r r r Ú s&