Hacked By AnonymousFox

Current Path : /opt/alt/python38/lib/python3.8/site-packages/urllib3/packages/backports/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib/python3.8/site-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�newline�writing�reading�binary�rawmode�raw�buffer�text�r�T/opt/alt/python38/lib/python3.8/site-packages/urllib3/packages/backports/makefile.py�backport_makefile
s@
r!)rNNNN)�__doc__r�socketrr!rrrr �<module>s�

Hacked By AnonymousFox1.0, Coded By AnonymousFox