U
    ÕCdl  ã                   @   sú   d Z ddlZzddlmZ W n  ek
r<   ddlmZ Y nX zddlmZ W n  ek
rn   ddlmZ Y nX zddlm	Z	 W n  ek
r    ddlm	Z	 Y nX dZ
dej  koºdk n  Zd	ej  koÔd
k n  ZerâeZddd„Zddd„ZdS )z0Compatibility module for Python 2 and 3 support.é    N)Úquote)Ú	parse_qsl)Ú	urlencode)Úto_bytesÚto_strÚurlquoter   r   )é   r   )é   r   )é   é   )r
   é   úutf-8c                 C   s"   t | dƒrt| tƒs|  |¡} | S )z0Ensure that b is text in the specified encoding.Údecode)ÚhasattrÚ
isinstanceÚunicoder   )ÚbÚencoding© r   ú2/tmp/pip-unpacked-wheel-79v45wuf/rfc3986/compat.pyr   1   s    
r   c                 C   s"   t | dƒrt| tƒs|  |¡} | S )z6Ensure that s is converted to bytes from the encoding.Úencode)r   r   Úbytesr   )Úsr   r   r   r   r   8   s    
r   )r   )r   )Ú__doc__ÚsysÚurllib.parser   r   ÚImportErrorÚurllibr   Úurlparser   Ú__all__Úversion_infoÚPY3ÚPY2Ústrr   r   r   r   r   r   r   Ú<module>   s(   
