ó V!ś\c@s>dZddlZddlmZdddddd„ZdS(s backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. i˙˙˙˙N(tSocketIOtrc Cs–t|ƒdddhks1td|fƒ‚nd|k}d|kpM| }|sb|sbt‚d|k}d} |r‡| d7} n|rš| d7} nt|| ƒ} |jd7_|d krÍd}n|dkrĺtj}n|dkr |std ƒ‚n| S|r.|r.tj| | |ƒ} n9|rItj | |ƒ} n|sUt‚tj | |ƒ} |rq| Stj | |||ƒ} || _ | S( s: Backport of ``socket.makefile`` from Python 3.5. Rtwtbs&invalid mode %r (only r, w, b allowed)tii˙˙˙˙is!unbuffered streams must be binaryN( tsett ValueErrortAssertionErrorRt_makefile_refstNonetiotDEFAULT_BUFFER_SIZEtBufferedRWPairtBufferedReadertBufferedWritert TextIOWrappertmode( tselfRt bufferingtencodingterrorstnewlinetwritingtreadingtbinarytrawmodetrawtbufferttext((sF/tmp/pip-install-usGedi/urllib3/urllib3/packages/backports/makefile.pytbackport_makefilesB            (t__doc__R tsocketRR R(((sF/tmp/pip-install-usGedi/urllib3/urllib3/packages/backports/makefile.pyts