
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
•�abc           @   s>   d  Z  d d l Z d d l m Z d d d d d d „ Z d S(   s�   
backports.makefile
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.
iÿÿÿÿN(   t   SocketIOt   rc         C   sœ  t  | ƒ t  d d d g ƒ k s7 t d | f ƒ ‚ n  d | k } d | k pS | } | sh | sh t ‚ d | k } d }	 | r� |	 d 7}	 n  | r  |	 d 7}	 n  t |  |	 ƒ }
 |  j d 7_ | d
 k rÓ d } n  | d k  rë t j } n  | d k r| st d	 ƒ ‚ n  |
 S| r4| r4t j |
 |
 | ƒ } n9 | rOt j	 |
 | ƒ } n | s[t ‚ t j
 |
 | ƒ } | rw| St j | | | | ƒ } | | _ | S(   s:   
    Backport of ``socket.makefile`` from Python 3.5.
    R   t   wt   bs&   invalid mode %r (only r, w, b allowed)t    i   iÿÿÿÿi    s!   unbuffered streams must be binaryN(   t   sett
   ValueErrort   AssertionErrorR    t   _makefile_refst   Nonet   iot   DEFAULT_BUFFER_SIZEt   BufferedRWPairt   BufferedReadert   BufferedWritert   TextIOWrappert   mode(   t   selfR   t	   bufferingt   encodingt   errorst   newlinet   writingt   readingt   binaryt   rawmodet   rawt   buffert   text(    (    sS   /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyt   backport_makefile   sB    !		(   t   __doc__R
   t   socketR    R	   R   (    (    (    sS   /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.pyt   <module>   s   	