PK! __init__.pynu[PK!5 __init__.pycnu[ abc@sdS(N((((sS/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/__init__.pyttPK!5 __init__.pyonu[ abc@sdS(N((((sS/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/__init__.pyttPK!RW makefile.pynu[# -*- coding: utf-8 -*- """ backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. """ import io from socket import SocketIO def backport_makefile(self, mode="r", buffering=None, encoding=None, errors=None, newline=None): """ Backport of ``socket.makefile`` from Python 3.5. """ if not set(mode) <= set(["r", "w", "b"]): raise ValueError( "invalid mode %r (only r, w, b allowed)" % (mode,) ) writing = "w" in mode reading = "r" in mode or not writing assert reading or writing binary = "b" in mode rawmode = "" if reading: rawmode += "r" if writing: rawmode += "w" raw = SocketIO(self, rawmode) self._makefile_refs += 1 if buffering is None: buffering = -1 if buffering < 0: buffering = io.DEFAULT_BUFFER_SIZE if buffering == 0: if not binary: raise ValueError("unbuffered streams must be binary") return raw if reading and writing: buffer = io.BufferedRWPair(raw, raw, buffering) elif reading: buffer = io.BufferedReader(raw, buffering) else: assert writing buffer = io.BufferedWriter(raw, buffering) if binary: return buffer text = io.TextIOWrapper(buffer, encoding, errors, newline) text.mode = mode return text PK!9YY makefile.pycnu[ abc@s>dZddlZddlmZddddddZdS(s backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. iN(tSocketIOtrc Cst|tdddgks7td|fnd|k}d|kpS| }|sh|shtd|k}d} |r| d7} n|r| d7} nt|| } |jd7_|d krd}n|dkrtj}n|dkr|s td n| S|r4|r4tj| | |} n9|rOtj | |} n|s[ttj | |} |rw| Stj | |||} || _ | S( s: Backport of ``socket.makefile`` from Python 3.5. Rtwtbs&invalid mode %r (only r, w, b allowed)tiiis!unbuffered streams must be binaryN( tsett ValueErrortAssertionErrorRt_makefile_refstNonetiotDEFAULT_BUFFER_SIZEtBufferedRWPairtBufferedReadertBufferedWritert TextIOWrappertmode( tselfRt bufferingtencodingterrorstnewlinetwritingtreadingtbinarytrawmodetrawtbufferttext((sS/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pytbackport_makefilesB!            (t__doc__R tsocketRR R(((sS/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyts  PK!x$$ makefile.pyonu[ abc@s>dZddlZddlmZddddddZdS(s backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. iN(tSocketIOtrc Cs~t|tdddgks7td|fnd|k}d|kpS| }d|k}d} |r{| d7} n|r| d7} nt|| } |jd7_|d krd}n|dkrtj}n|dkr|std n| S|r"|r"tj| | |} n-|r=tj| |} ntj | |} |rY| Stj | |||} || _ | S( s: Backport of ``socket.makefile`` from Python 3.5. Rtwtbs&invalid mode %r (only r, w, b allowed)tiiis!unbuffered streams must be binaryN( tsett ValueErrorRt_makefile_refstNonetiotDEFAULT_BUFFER_SIZEtBufferedRWPairtBufferedReadertBufferedWritert TextIOWrappertmode( tselfRt bufferingtencodingterrorstnewlinetwritingtreadingtbinarytrawmodetrawtbufferttext((sS/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pytbackport_makefiles>!           (t__doc__R tsocketRRR(((sS/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyts  PK! __init__.pynu[PK!5 ;__init__.pycnu[PK!5 !__init__.pyonu[PK!RW makefile.pynu[PK!9YY makefile.pycnu[PK!x$$ makefile.pyonu[PK