Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyc

ó
“tĆ_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((s`/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pytbackport_makefiles@

		(t__doc__R
tsocketRR	R(((s`/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyt<module>s
Back to Directory File Manager