HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/urllib3/packages/backports/__pycache__/makefile.cpython-38.pyc
U

�`'^��@s&dZddlZddlmZddd�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
Cst|�dddhks td|f��d|k}d|kp4|}|sB|sBt�d|k}d}	|rZ|	d7}	|rf|	d7}	t||	�}
|jd7_|dkr�d}|d	kr�tj}|d	kr�|s�td
��|
S|r�|r�t�|
|
|�}n&|r�t�|
|�}n|s�t�t�	|
|�}|r�|St�
||||�}||_|S)z:
    Backport of ``socket.makefile`` from Python 3.5.
    r�w�bz&invalid mode %r (only r, w, b allowed)��N���rz!unbuffered streams must be binary)�set�
ValueError�AssertionErrorrZ_makefile_refs�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter�
TextIOWrapper�mode)
�selfr�	buffering�encoding�errors�newlineZwritingZreading�binaryZrawmode�raw�buffer�text�r�E/usr/lib/python3/dist-packages/urllib3/packages/backports/makefile.py�backport_makefiles@
r)rNNNN)�__doc__rZsocketrrrrrr�<module>s�