관리-도구
편집 파일: makefile.cpython-310.pyc
o ƚRe� � @ s( d Z ddlZddlmZ ddd�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 C s t |�h d�kstd|f ��d|v }d|v p| }|s |s J �d|v }d} |r,| d7 } |r2| d7 } t| | �} | jd7 _|du rDd }|d k rKtj}|d krW|sUtd��| S |rc|rct�| | |�}n|rlt�| |�}n |spJ �t�| |�}|rz|S t� ||||�}||_ |S )z: Backport of ``socket.makefile`` from Python 3.5. > r �w�bz&invalid mode %r (only r, w, b allowed)r r r � � N���r z!unbuffered streams must be binary)�set� ValueErrorr 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-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py�backport_makefile s@ r )r NNNN)�__doc__r �socketr r r r r r �<module> s �