관리-도구
편집 파일: makefile.cpython-311.pyc
� �Re� � �( � d Z ddlZddlmZ dd�ZdS )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 � � t |� � h d�k st d|�d�� � �d|v }d|v p| }|s|sJ �d|v }d} |r| dz } |r| dz } t | | � � } | xj dz c_ |�d }|dk rt j }|dk r|st d� � �| S |r|rt j | | |� � }n1|rt j | |� � }n|sJ �t j | |� � }|r|S t j ||||� � }||_ |S ) z: Backport of ``socket.makefile`` from Python 3.5. > �br �wz invalid mode z (only r, w, b allowed)r r r � � N���r z!unbuffered streams must be binary)�set� ValueErrorr �_makefile_refs�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter� TextIOWrapper�mode) �selfr � buffering�encoding�errors�newline�writing�reading�binary�rawmode�raw�buffer�texts ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py�backport_makefiler"