관리-도구
편집 파일: makefile.cpython-35.pyc
��Re� � @ sA d Z d d l Z d d l m Z d d d d d d d � Z d S)z� backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. � N)�SocketIO�rc C s� t | � d d d h k s. t d | f � � d | k } d | k pJ | } | s_ | s_ t � d | k } d } | r� | d 7} | r� | d 7} t | | � } | j d 7_ | d k r� d } | d k r� t j } | d k r� | s� t d � � | S| r| rt j | | | � } n9 | r7t j | | � } n | sCt � t j | | � } | r_| St j | | | | � } | | _ | S)z: Backport of ``socket.makefile`` from Python 3.5. r �w�bz&invalid mode %r (only r, w, b allowed)� � Nr z!unbuffered streams must be binary���)�set� ValueError�AssertionErrorr Z_makefile_refs�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter� TextIOWrapper�mode) �selfr � buffering�encoding�errors�newline�writing�reading�binary�rawmode�raw�buffer�text� r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py�backport_makefile s@ r! )�__doc__r �socketr r! r r r r �<module> s