U
    6³d­  ã                   @   sR   zd dl m Z mZ W n$ ek
r8   d dlm Z mZ Y nX d dlmZ dd„ ZdS )é    )ÚurlparseÚparse_qs)Úadd_params_to_uric                    s   ‡ fdd„}ˆ   d|¡ ˆ S )Nc                    sˆ   t tt| ƒjƒƒ}| d¡}|s4t|t ƒr4| d¡}|rB| ||fS |sRdˆ ji}n,t|t ƒrhˆ j|d< ndˆ jfg}t| |ƒ} | ||fS )NÚtoken)Údictr   r   ÚqueryÚgetÚ
isinstanceZaccess_tokenr   )ÚurlÚheadersÚdataZ	url_queryr   ©Úsession© úL/tmp/pip-unpacked-wheel-h5x5xq8v/requests_oauthlib/compliance_fixes/slack.pyÚ_non_compliant_param_name
   s    




z7slack_compliance_fix.<locals>._non_compliant_param_nameZprotected_request)Zregister_compliance_hook)r   r   r   r   r   Úslack_compliance_fix	   s    r   N)r   r   ÚImportErrorÚurllib.parseZoauthlib.commonr   r   r   r   r   r   Ú<module>   s
   